FTObjectLibrary provides a collection of reference counted Fortran 2003 classes to facilitate writing generic object oriented Fortran programs. Reference counting is implemented to assist with memory management so that the lifespans of objects are properly maintained and are so that objects are deleted only when no other references are made to them.
The library includes three categories of classes:
Value classes include the base class, FTObject and at the current time, a subclass, FTValue.
Container classes let you store any subclass of the base class FTObject in them. This makes it easy to store, for instance, a linked list of linked lists, or an array of dictionaries.
Included in the library are the following standard container classes:
The library also contains classes for testing (FTAssertions, TestSuiteManagerClass) and for reporting errors through the FTException class.
Documentation can be found in the user's guide.
Examples can be found in the Examples directory and in the Testing directory. The examples include a simple reverse Polish calculator using a stack, and another showing the use of a linked list. The testing directory includes tests that can be run on the library, which themselves serve as examples of the use of all of the classes.
The library (.a) can be built with either CMake or default make.
To install the FTObjectLibrary with CMake,
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/install ../
make
make install
cd to the directory "makeLibrary" and type
make
That will create the necessary files in that directory, which can be moved to somewhere else as desired.