#ifndef __CATMacForIUnknown #define __CATMacForIUnknown // COPYRIGHT DASSAULT SYSTEMES 1999 /** * @CAA2Level L1 * @CAA2Usage U1 */ #include#include "JS0CORBA.h" #include "CATFillDictionary.h" #include "CATMetaClass.h" #ifdef _WINDOWS_SOURCE #define Exported __declspec(dllexport) #define Imported __declspec(dllimport) #else #define Exported #define Imported #endif ... /** * Continues an extension declaration sequence. * <b>Role</b>: Declares that the current class is an extension of the impl class. * To be used in conjunction with the @href CATBeginImplementClass macro to begin * the extension declaration sequence and * @href CATEndImplementClass macro to end it. * Use this macro in the class source (.cpp) file. * Do not end it with a semicolon. * @param impl * The implementation class for which the current class is an extension */ #define CATAddClassExtension(impl) \ meta_object->SetExtensionOf(fct_FindMetaObject(#impl)) /** * Declares an implementation or extension class. * <b>Role</b>: Declares that the current class is either * an implementation or an extension class. * The class must derive from @href CATBaseUnknown. * Use this macro in the class header file in conjunction with @href CATImplementClass * in the class source (.cpp) file. * End it with a semicolon. */ #define CATDeclareClass \ ... /** * Begins an extension declaration sequence. * <b>Role</b>: Begins a macro sequence for <tt>Class</tt> to declare that it implements * interfaces as an extension of the <tt>Impmeta</tt> class. * Replaces the @href CATImplementClass macro when <tt>Class</tt> extends several * implementation classes. * To be used in conjunction with the @href CATAddClassExtension macro to declare other * extended implementation classes and * @href CATEndImplementClass macro to end the extension declaration sequence. * Use this macro in the <tt>Class</tt> source (.cpp) file. * Do not end it with a semicolon. * @param Class * The current extension class * @param Typeofclass * The extension type * <br><b>Legal values</b>: it can be set to <tt>DataExtension</tt>, * <tt>CodeExtension</tt> or <tt>CacheExtension</tt> * @param Basemeta * The class from which <tt>Class</tt> OM-derives. * <br><b>Legal values:</b>: must be set to @href CATBaseUnknown or <tt>CATNull</tt> * @param Impmeta * The implementation class for which <tt>Class</tt> is an extension */ #define CATBeginImplementClass(Class,Typeofclass,Basemeta,Impmeta) \ ... /** * Ends an extension declaration sequence. * <b>Role</b>: Ends the declaration sequence for the <tt>Class</tt> class which implements * interfaces as an extension of several other implementation classes. * To be used in conjunction with @href CATBeginImplementClass macro to begin * the extension declaration sequence and * @href CATAddClassExtension macro to declare other * extended implementation classes. * Use this macro in the <tt>Class</tt> source (.cpp) file. * Do not end it with a semicolon. * @param Class * The current extension class */ #define CATEndImplementClass(Class) \ ... /** * Continues an extension declaration sequence. * <b>Role</b>: Declares that the current class is an extension of the <tt>impl</tt> class. * To be used in conjunction with the @href CATBeginImplementClass macro to begin * the extension declaration sequence and * @href CATEndImplementClass macro to end it. * Use this macro in the class source (.cpp) file. * Do not end it with a semicolon. * @param impl * The implementation class for which the current class is an extension */ #define CATAddClassExtension(impl) \ meta_object->SetExtensionOf(fct_FindMetaObject(#impl)) /** * Declares an implementation or extension class. * <b>Role</b>: Declares that the current class is either * an implementation or an extension class. * The class must derive from CATBaseUnknown. * Use this macro in the class source (.cpp) file in conjunction with @href CATDeclareClass * in the class header file. * End it with a semicolon. * @param Class * The name of the class * @param Typeofclass * The class type. * <br><b>Legal values</b>: it can be set to <tt>Implementation</tt>, <tt>DataExtension</tt>, * <tt>CodeExtension</tt> or <tt>CacheExtension</tt> * @param Basemeta * The class from which <tt>Class</tt> OM-derives. * <br><b>Legal values</b>: it makes sense for implementation classes only. * Set it to the name of the base class for an implementation, and to * @href CATBaseUnknown or <tt>CATNull</tt> for the three extension types * @param Impmeta * The class for which <tt>Class</tt> is an extension. * <br><b>Legal values</b>: it makes sense for extension classes only. * Set it to the implementation class name for the three extension types, * and to <tt>CATNull</tt> for an implementation */ #define CATImplementClass(Class,Typeofclass,Basemeta,Impmeta) \ CATBeginImplementClass(Class,Typeofclass,Basemeta,Impmeta); \ CATEndImplementClass(Class) #endif