Operation classes

applications create instances of public operation classes, which contain pointers to private implementation classes.

Although this interface/implementation approach adds an extra level of indirection, it provides important benefits:
  • Applications do not depend on the implementation of the underlying class because the implementation class is inaccessible.
  • Performance of copy operations is improved because applications copy only the implementation pointer of the object and not the entire object.
  • Applications can easily use automatic variables as opposed to heap-allocated variables. Automatic variables are automatically deallocated when they pass out of scope, which helps avoid memory leaks. The implementation class tracks references to objects, removing objects only when they are no longer referenced.
The following figure illustrates the relationship between the public interface classes and private implementation classes.
Figure 1: Public interface and private implementation of operation classes

begin figure description - ITObject is a public interface class and has a pointer to a private implementation. ITTypeInfo is a public interface class that is a type of ITObject and has a pointer to a private implementation. ITDBInfo is a public interface class that is a type of ITObject and has a pointer to a private implementation. - end figure description

The Object Interface for C++ defines the following operation classes.
Operation class Description See
ITConnection Manages a database connection. The ITConnection class
ITConnectionStamp Maintains stamp information about a connection. The ITConnectionStamp class
ITContainerIter Extracts C++ base-type values (such as int, long, or double) from a container value object. The ITContainerIter class
ITCursor Defines cursors and manages results. The ITCursor class
ITDBInfo Stores database information. The ITDBInfo class
ITDBNameList Allows the user to obtain database names. The ITDBNameList class
ITErrorManager Provides base class functionality for managing error callbacks. The ITErrorManager class
ITFactoryList Adds mappings from HCL Informix® data types to functions that build value objects to represent instances of these data types. The ITFactoryList class
ITInt8 Provides an 8-byte integer class. The ITInt8 class
ITLargeObjectManager Supports large objects. The ITLargeObjectManager class
ITLocale Provides GLS support. Online notes
ITMVDesc Not an operation class, but a descriptor that holds the instance information necessary to create a value object. The ITMVDesc class
ITObject Provides the base class for public operation class interface objects. The ITObject class
ITPreserveData Provides an interface for maintaining a reference to database data received from the server, for use by the implementer of a value object. The ITPreserveData class
ITQuery Issues SQL queries to the HCL Informix database. The ITQuery class
ITRoutineManager Provides fast path execution of DataBlade® API functions. The ITRoutineManager class
ITStatement Provides support for the execution of prepared queries that return no rows. The ITStatement class
ITString Provides a string class. The ITString class
ITSystemNameList Allows the user to obtain host system names. The ITSystemNameList class
ITTypeInfo Stores information about database types. The ITTypeInfo class

For detailed descriptions of these operation classes, see Operation class reference.