System Macro CATCreateAndAddOMFactoryFunction
Macro CATCreateAndAddOMFactoryFunction (class)
Set of macro used to register a factory function that will be used to create implementation instances.
These macros associate a factory function to a string identifier and register this couple in the in-session functions table.
The factory function is either implemented by the macro itself either given to the macro as an argument.
Choose the right macro for your need, depending if you want
- customizing the creation of the instance or not.
- giving a specific identifier to this function or let the default one (the implementation name).
It's also mandatory to create a new entry in the .func dictionary of your framework in order ObjectModeler could load the
implementation library if necessary. This entry will be as this : "IdentifierName OMFactoryFunctionType libMyImplLibrary"
If your framework doesn't already have a .func file, create it in the dictionaries directory (same as for .dic files).
The two instantiation by name methods, CATInstantiateComponent and CATCreateClassInstance, will query first to the in-session functions
table if such factory function exists before trying to use the CATICreateInstance mechanism. This means that implementations of CATICreateInstance
can be replaced by these macros with a big gain in code size.
This object is included in the file: CATCreateClassInstance.h
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.