Custom Platform Support Development Kit  1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FCMMacros.h File Reference

This file contains the macros used in FCM. More...

#include "FCMPreConfig.h"
#include "FCMPostConfig.h"

Go to the source code of this file.

Namespaces

 FCM
 The definitions contained in this namespace define a framework called Flash Component Model (FCM), which is responsible for plug-in management. The FCM framework manages loading, unloading and registration of the plug-in. It also manages service instantiation, object instantiation and object lifetime management.
 

Macros

#define FCM_VERSION_MAJOR   0x01
 Major version of the framework.
 
#define FCM_VERSION_MINOR   0x03
 Minor version of the framework.
 
#define FCM_VERSION_MAINTENANCE   0x00
 Maintenance number of the framework.
 
#define FCM_VERSION_BUILD   0x00
 Build number of the framework.
 
#define FCM_VERSION
 Complete version of the framework. More...
 
#define DEFINE_FCMIID
 Defines interface with name name and ID whose textual representation is l - w1 - w2 - b1 b2 - b3 b4 b5 b6 b7 b8. More...
 
#define IID(ifx)   IID_##ifx
 Utility macro to define interface ID easily.
 
#define _FCM_SIMPLEMAPENTRY   ((_FCM_CREATORARGFUNC*)0)
 This macro makes debugging asserts easier.
 
#define FORWARD_DECLARE_INTERFACE(ifx)
 Used to forward declare an interface ifx. More...
 
#define BEGIN_DECLARE_INTERFACE_COMMON(ifx, iid)
 Used to begin any interface ifx with ID iid. More...
 
#define BEGIN_DECLARE_INTERFACE_INHERIT(ifx, iid, baseifx)
 Used to begin the interface ifx with ID iid , which inherits from baseifx. More...
 
#define BEGIN_DECLARE_INTERFACE(ifx, iid)   BEGIN_DECLARE_INTERFACE_INHERIT(ifx, iid, FCM::IFCMUnknown);
 Used to begin the interface ifx with ID iid, which inherits from IFCMUnknown.
 
#define BEGIN_DECLARE_BASE_INTERFACE(ifx, iid)
 Used to begin the interface ifx with ID iid, which inherits from IFCMUnknown. More...
 
#define END_DECLARE_INTERFACE   };
 Ends an interface.
 
#define _FCMCALL   __stdcall
 Defines calling convention for interface methods.
 
#define FCM_ADDREF(intPtr)   if(intPtr){(intPtr)->AddRef();}
 If intPtr exists, increment its reference count.
 
#define FCM_RELEASE(intPtr)   if(intPtr){(intPtr)->Release();(intPtr)=0;}
 If intPtr exists, decrement its reference count.
 
#define _FCM_PACKING   1
 Used for internal purpose.
 
#define offsetofclass(base, derived)   ((FCM::S_Int64)(static_cast<base*>((derived*)_FCM_PACKING))-_FCM_PACKING)
 Utility macro to get offset of a derived class. Used for internal purposes.
 
#define offsetofclasscustom(base, custom, derived)   ((FCM::S_Int64)(static_cast<base*>((custom*)((derived*)_FCM_PACKING)))-_FCM_PACKING)
 Custom Class offset. Used for internal purposes.
 
#define offsetofmem(m, s)   (FCM::S_Int64)&(((s *)0)->m)
 Memory Offset.
 
#define BEGIN_INTERFACE_MAP(impl, implVersion)
 Format to begin Interface map. More...
 
#define BEGIN_MULTI_INTERFACE_MAP(impl, implVersion)
 Format to Begin multi-interface map. This should be used if a implementation class is inheriting from multiple interfaces. More...
 
#define INTERFACE_ENTRY(ifx)   {IID(ifx),offsetofclass(ifx,_ClassImpl),_FCM_SIMPLEMAPENTRY},
 Add an interface.
 
#define INTERFACE_ENTRY_CUSTOM(ifx, custom)   {IID(ifx),offsetofclasscustom(ifx,custom,_ClassImpl),_FCM_SIMPLEMAPENTRY},
 Add custom interface. Used to avoid the "diamond problem" of multiple inheritance.
 
#define INTERFACE_ENTRY_AGGREGATE(ifx, punk)   {IID(ifx),offsetofmem(punk,_ClassImpl),_Delegate},
 Add interface with aggregation.
 
#define END_INTERFACE_MAP
 Format to end the interface map. More...
 
#define BEGIN_MODULE(usrModule)   class usrModule : public FCM::FCMPluginModule {
 Format to mark the beginning of a module. A module contains a list of class map with name ursModule.
 
#define BEGIN_CLASS_ENTRY
 Format to mark the beginning of class map. More...
 
#define CLASS_ENTRY(clsid, ursClass)   addClassEntry(clsid,&FCMClassFactory<ursClass>::GetFactory,&ursClass::GetInterfaceMap,ursClass::GetVersion());
 Add class entry with class id clsid and classobject ursClass to classFactory.
 
#define END_CLASS_ENTRY   return res; }
 Format to mark the end of a class map.
 
#define END_MODULE   };
 Format to end the module.
 
#define DllExport   __declspec( dllexport )
 Used to export a function from a plug-in.
 
#define FCMPLUGIN_IMP_EXP   DllExport
 Used to export a function from the plug-in.
 

Detailed Description

This file contains the macros used in FCM.

Macro Definition Documentation

#define BEGIN_CLASS_ENTRY
Value:
public: \
FCM::Result init(FCM::PIFCMCallback pCallback) { FCM::Result res = FCMPluginModule::init(pCallback);
U_Int32 Result
Type to define a result. This is usually the return type for most APIs.
Definition: FCMTypes.h:126

Format to mark the beginning of class map.

#define BEGIN_DECLARE_BASE_INTERFACE (   ifx,
  iid 
)
Value:
class ifx { public: inline static FCM::FCMIID GetIID() {return IID(ifx);}
#define BEGIN_DECLARE_INTERFACE_COMMON(ifx, iid)
Used to begin any interface ifx with ID iid.
Definition: FCMMacros.h:125
Represents a 128 bit or 16-byte GUID (Globally Unique IDentifier) value.
Definition: FCMTypes.h:189
#define IID(ifx)
Utility macro to define interface ID easily.
Definition: FCMMacros.h:97

Used to begin the interface ifx with ID iid, which inherits from IFCMUnknown.

#define BEGIN_DECLARE_INTERFACE_COMMON (   ifx,
  iid 
)
Value:
const FCM::FCMIID IID_##ifx = (iid); \
using namespace FCM;
#define FORWARD_DECLARE_INTERFACE(ifx)
Used to forward declare an interface ifx.
Definition: FCMMacros.h:114
The definitions contained in this namespace define a framework called Flash Component Model (FCM)...
Definition: IGroup.h:36
Represents a 128 bit or 16-byte GUID (Globally Unique IDentifier) value.
Definition: FCMTypes.h:189

Used to begin any interface ifx with ID iid.

#define BEGIN_DECLARE_INTERFACE_INHERIT (   ifx,
  iid,
  baseifx 
)
Value:
class ifx : public baseifx { public: inline static FCM::FCMIID GetIID() {return IID(ifx);}
#define BEGIN_DECLARE_INTERFACE_COMMON(ifx, iid)
Used to begin any interface ifx with ID iid.
Definition: FCMMacros.h:125
Represents a 128 bit or 16-byte GUID (Globally Unique IDentifier) value.
Definition: FCMTypes.h:189
#define IID(ifx)
Utility macro to define interface ID easily.
Definition: FCMMacros.h:97

Used to begin the interface ifx with ID iid , which inherits from baseifx.

#define BEGIN_INTERFACE_MAP (   impl,
  implVersion 
)
Value:
public: \
virtual FCM::PIFCMCallback GetCallback()=0; \
typedef impl _ClassImpl; \
static FCM::U_Int32 GetVersion(){ return (FCM::U_Int32)implVersion;} \
static FCM::FCMInterfaceMap* GetInterfaceMap() \
{ static FCM::FCMInterfaceMap _pInterfaceMap [] ={ \
INTERFACE_ENTRY(IFCMUnknown)
unsigned _int32 U_Int32
Type to define an unsigned 32-bit value.
Definition: FCMTypes.h:81
#define INTERFACE_ENTRY(ifx)
Add an interface.
Definition: FCMMacros.h:267

Format to begin Interface map.

#define BEGIN_MULTI_INTERFACE_MAP (   impl,
  implVersion 
)
Value:
public: \
virtual FCM::PIFCMCallback GetCallback()=0; \
typedef impl _ClassImpl; \
static FCM::U_Int32 GetVersion(){ return (FCM::U_Int32)implVersion;} \
static FCM::FCMInterfaceMap* GetInterfaceMap() \
{ static FCM::FCMInterfaceMap _pInterfaceMap [] ={
unsigned _int32 U_Int32
Type to define an unsigned 32-bit value.
Definition: FCMTypes.h:81

Format to Begin multi-interface map. This should be used if a implementation class is inheriting from multiple interfaces.

#define DEFINE_FCMIID
Value:
(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const FCMID name = {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}

Defines interface with name name and ID whose textual representation is l - w1 - w2 - b1 b2 - b3 b4 b5 b6 b7 b8.

#define END_INTERFACE_MAP
Value:
return _pInterfaceMap;}
const FCMIID FCMIID_NULL
Represents an invalid Interface Identifier (IID).
Definition: FCMTypes.h:392
#define _FCM_SIMPLEMAPENTRY
This macro makes debugging asserts easier.
Definition: FCMMacros.h:105

Format to end the interface map.

#define FCM_VERSION
Value:
((FCM_VERSION_MAJOR << 24) | (FCM_VERSION_MINOR << 16) | \
#define FCM_VERSION_MINOR
Minor version of the framework.
Definition: FCMMacros.h:54
#define FCM_VERSION_MAINTENANCE
Maintenance number of the framework.
Definition: FCMMacros.h:62
#define FCM_VERSION_MAJOR
Major version of the framework.
Definition: FCMMacros.h:46
#define FCM_VERSION_BUILD
Build number of the framework.
Definition: FCMMacros.h:70

Complete version of the framework.

#define FORWARD_DECLARE_INTERFACE (   ifx)
Value:
class ifx; \
typedef ifx* P##ifx;

Used to forward declare an interface ifx.