Defines the source file of the workshop factory class. Role: To create an instance of your workshop, 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 CATDeclareWorkshopFactory and CATImplementWorkshopFactory.
Parameters:
Workshop
The name of the workshop's class. This class must implement
The name of the workshop factory interface deriving from CATIGenericFactory.
Example:MyWorkshopFactory is a class which implements the IMyWorkshopFactory
factory interface, creates the MyWorkshop workshop and is defined in the
shared library myModule.dll
1) The header file MyWorkshopFactory.h must contain these two lines:
#include "CATWorkshopFactory.h"
CATDeclareWorkshopFactory(MyWorkshop);
2) The source file MyWorkshopFactory.cpp must contain these lines:
#include "MyWorkshop.h"
#include "MyWorkshopFactory.h"
#include "TIE_IMyWorkshopFactory.h"
CATImplementWorkshopFactory(MyWorkshop, IMyWorkshopFactory);
3) To declare that CATApplicationFrame implements IMyWorkshopFactory,
insert the following line in the interface dictionary:
CATApplicationFrame IMyWorkshopFactory myModule
4) To declare that the factory creates an instance of the MyWorkshop class,
insert the following line in the factory dictionary:
MyWorkshop IMyWorkshopFactory