AfrFoundation Macro CATImplementConfigurationFactory

Macro CATImplementConfigurationFactory (Config,CFactory)
Defines the source file of the workbench factory class.
Role: To create an instance of your workbench, you must define a factory interface which derives from CATIGenericFactory.
This interface is implemented using a factory class as an extension of the CATApplicationFrame class and is created by the two macros and CATImplementConfigurationFactory.
Parameters:
Config
The name of the workbench's class. This class must implement an interface which derives from
CFactory
The name of the workbench factory interface deriving from CATIGenericFactory.

Example: MyWorkbenchFactory is a class which implements the IMyWorkbenchFactory factory interface, creates the MyWorkbench workbench and is defined in the shared library myModule.dll
 
 1) The header file MyWorkbenchFactory.h must contain these two lines:

       #include "CATWorkshopConfigurationFactory.h"
       CATDeclareConfigurationFactory(MyWorkbench);

 2) The source file MyWorkbenchFactory.cpp must contain these lines:

       #include "MyWorkbench.h"
       #include "MyWorkbenchFactory.h"

       #include "TIE_IMyWorkbenchFactory.h"

       CATImplementConfigurationFactory(MyWorkbench, IMyWorkbenchFactory);

 3) To declare that CATApplicationFrame implements IMyWorkbenchFactory,  
       insert the following line in the interface dictionary:

       CATApplicationFrame    IMyWorkbenchFactory  myModule 

 4) To declare that the factory creates an instance of the MyWorkbench class, 
       insert the following line in the factory dictionary:
 
       MyWorkbench            IMyWorkbenchFactory      
 
See also:
,

This object is included in the file: CATWorkshopConfigurationFactory.h
If needed, your Imakefile.mk should include the module: CATAfrFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.