All Frameworks  Class Hierarchy  This Framework  Indexes

ApplicationFrame Macro CATDeclareWorkshopFactory

Macro CATDeclareWorkshopFactory (Workshop)
Defines the header file of a 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
CATIWorkshop.
  • Once CATDeclareHeaderSpecialResources has been used in a class D1, all derived classes fr.

    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      
     
    See also:
    CATImplementWorkshopFactory, CATIWorkshop

  • This object is included in the file: CATWorkshopFactory.h
    If needed, your Imakefile.mk should include the module: CATApplicationFrame

    Copyright © 2003, Dassault Systèmes. All rights reserved.