All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

ObjectModelerBase Interface CATIGenericFactory

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIGenericFactory
 

Usage: you can freely reimplement this interface.


interface CATIGenericFactory

Interface to generically define factories.
Role: some commands like Edit/Properties or Tools/Options need to instanciate components programmed by applications. These applications has to provide a factory to enable the instantiation of a component. Usually, an object factory creates one and only one object type.
Note: There is no adapter to implement this interface, but some commands provide macro to generate such factories.
Usage: In order to create a factory, an application defines a new interface derived from CATIGenericFactory, implements this interface as an extension of a given component, and inserts apropriate declarations in .dic and .fact dictionnaries.


Method Index


o Create(CATUnicodeString&)
Creates object and returns a pointer to a given interface.
o Support(CATUnicodeString&)
Returns whether a given object type can be created using the factory.

Methods


o Create
public virtual CATBaseUnknown* Create( const CATUnicodeString& iIntfName)const = 0
Creates object and returns a pointer to a given interface.
Note that the given interface is supposed to be implemented by the created object.
o Support
public virtual unsigned char Support( const CATUnicodeString& iEditName)const = 0
Returns whether a given object type can be created using the factory.
Parameters:
iEditName
name of object.
Returns:
1 if the object type is supported.

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

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