OTL 4.0, OTL classes

OTL classes

OTL 4.0 was built more like an appliance rather than just another traditional C++ class library: more complex [than in C++ libraries] internals but a very simple and self-contained interface on the outside. OTL 4.0 was influenced a lot by the paradigm of generic programming promoted by the author of the Standard Template Library (STL), Alexander Stepanov. The STL was adopted as part of the C++ standard of 1998.

OTL 4.0 has a completely template framework which implements the OTL stream concept. The framework is comprised of template classes and inline functions. The template classes have ordinary classes as parameters. The parameters of the class type form a set of classes that provide the framework with an actual implementation of a database API.

Such an implementation is called the OTL-adaptor for a given database API. In OTL 4.0, OTL-adaptors for the following database APIs were implemented:

The adaptors are low level / thin wrappers around the database APIs. The adaptor classes are substituted directly into the framework, so the OTL 4.0 works almost at the level of the database APIs because the OTL templates get expanded literally into the database API function calls.

The template framework and an OTL-adaptor substituted into the framework generate an instance of the following concrete OTL classes:

These classes, together with the otl_long_string class, form a complete API for a given database.

This kind of generic approach makes the OTL 4.0 an extendable library. Possible candidates to extend the OTL to may be Sybase (DB or CT library) or Informix.


Prev Next Contents Go Home

Copyright © 1996, 2007, Sergei Kuchin, email: skuchin@ispwest.com, skuchin@gmail.com.

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies.