The ITFactoryList class

Base class: none

This functionality provided by this class is only supported with Informix® databases.

Adds mappings from Informix® data types to functions that build value objects to represent instances of these data types. For more details, see Build simple value objects.

Developers of value objects can either use this class and compile the value object code into applications or, for greater reusability, use dynamic loading as described in Dynamic loading.

This class provides the following methods.
Method Description
ITFactoryList(const char *name, ITFactoryFuncPtr func, ITBool flushable = false); Declares a mapping from the specified server type (the name parameter) to the specific factory function pointer (func).
static void ReloadMapFiles(ITErrorManager *errobj); Forces a reload of the factory object map files. The map files map server types to dynamically loadable libraries that contain functions for building value objects. If the map changes, an application can call this procedure to reload the maps.
static ITBool FlushDynamicFactories(ITErrorManager *errobj); Unloads all the dynamically loaded libraries and clears dynamic entries from the list of factories To retain the ability to scan the map files after dumping, applications call ReloadMapFiles() instead of FlushDynamicFactories.
static void Init() Initializes the built-in factory list in case the compiler does not perform this initialization automatically.
static ITValue *DatumToValue (ITMVDesc &) Creates the instance of the value object by using the provided ITMVDesc. Returns the pointer to the ITValue interface of the created object. Returns NULL if it fails.

In the absence of the factory for the constructed type, DatumToValue() uses the factory of the constructor. For example, it would use the built-in set factory for the type set (integer not null).

GetInitState() Verifies that the library loaded into memory is properly initialized. For more information and an example, see Successful initialization verification.