![]() |
VR-Forces Development_Version Class Documentation
|
Contains DT_VIRTUAL_CTR DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFINE DT_VIRTUAL_COPY_ASSIGN_DEFINE DT_VIRTUAL_BASE_CTR_DEFINE DT_PURE_VIRTUAL_CTR_DEFINE macros. More...
Go to the source code of this file.
Macros | |
| #define | DT_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST) |
| Declare a Virtual Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME = the name of the class being declared Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types. | |
| #define | DT_VIRTUAL_COPY_ASSIGN(CLASS_NAME) |
| Declare a Virtual Copy Constructor Create using DT_VIRTUAL_COPY_CTR(CLASS_NAME) Where CLASS_NAME = the name of the class being declared. | |
| #define | DT_VIRTUAL_BASE_CTR(BASE_NAME, ARG_TYPES_LIST) |
| Declare a Virtual Base Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where BASE_NAME = the name of the base class being created Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types. | |
| #define | DT_PURE_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST) |
| Declare a pure virtual constructor. | |
| #define | DT_VIRTUAL_CTR_DEFINE(CLASS_NAME, ARG_TYPES_AND_NAMES_LIST, ARG_NAMES_LIST) |
| Define Virtual Constructor call using DT_VIRTUAL_CTR_DEFINE( CLASS_NAME , ARG_TYPES_AND_NAMES_LIST , ARG_NAMES_LIST) Where CLASS_NAME = the name of the class that is being defined Where ARG_TYPES_AND_NAMES_LIST = a list (ie in side parentheses) of comma separated type id pairs. | |
| #define | DT_VIRTUAL_COPY_ASSIGN_DEFINE(CLASS_NAME) |
| Define Virtual Copy Constructor call using DT_VIRTUAL_COPY_CTR_DEFINE( CLASS_NAME ) Where CLASS_NAME = the name of the class that is being defined. | |
| #define | DT_VIRTUAL_BASE_CTR_DEFINE(CLASS_NAME, BASE_NAME, ARG_TYPES_AND_NAMES_LIST, ARG_NAMES_LIST) |
| #define | DT_PURE_VIRTUAL_CTR_DEFINE(CLASS_NAME, ARG_TYPES_AND_NAMES_LIST, ARG_NAMES_LIST) |
| Define Pure Virtual Constructor. | |
Contains DT_VIRTUAL_CTR DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFINE DT_VIRTUAL_COPY_ASSIGN_DEFINE DT_VIRTUAL_BASE_CTR_DEFINE DT_PURE_VIRTUAL_CTR_DEFINE macros.
| #define DT_VIRTUAL_CTR | ( | CLASS_NAME, | |
| ARG_TYPES_LIST | |||
| ) |
Declare a Virtual Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME = the name of the class being declared Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types.
Example: DT_VIRTUAL_CTR( foo, (int,float,void*) )
The code generated is equivalent to this:
typedef foo* (creatorFunction)(int,float,void); static foo* create(int,float,void*); static void setCreator(creatorFunction); protected: foo(int,float,void*); public:
| #define DT_VIRTUAL_COPY_ASSIGN | ( | CLASS_NAME | ) |
Declare a Virtual Copy Constructor Create using DT_VIRTUAL_COPY_CTR(CLASS_NAME) Where CLASS_NAME = the name of the class being declared.
Example: DT_VIRTUAL_COPY_CTR( foo )
The code generated is equivalent to this:
typedef foo* (copierFunction)(const foo&); typedef foo& (*assignerFunction)(foo&,const foo&); static foo copy(const foo&); static foo& assign(foo&,const foo&); static void setCopier(copierFunction); static void setAssigner(assignerFunction); protected: foo(const foo&); foo& operator=(const foo&); public:
| #define DT_VIRTUAL_BASE_CTR | ( | BASE_NAME, | |
| ARG_TYPES_LIST | |||
| ) |
Declare a Virtual Base Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where BASE_NAME = the name of the base class being created Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types.
Example: DT_VIRTUAL_BASE_CTR( bar, (int,float,void*) )
The code generated is equivalent to this:
static bar* createBase(int,float,void*); static void overrideCreator();
| #define DT_PURE_VIRTUAL_CTR | ( | CLASS_NAME, | |
| ARG_TYPES_LIST | |||
| ) |
Declare a pure virtual constructor.
Essentially the same as DT_VIRTUAL_CTR, but does not contain a constructor declaration. Declare DT_PURE_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME = the name of the class being declared Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types
Example: DT_PURE_VIRTUAL_CTR( foo, (int,float,void*) )
The code generated is equivalent to this:
typedef foo* (creatorFunction)(int,float,void); static foo* create(int,float,void*); static void setCreator(creatorFunction); public:
| #define DT_VIRTUAL_CTR_DEFINE | ( | CLASS_NAME, | |
| ARG_TYPES_AND_NAMES_LIST, | |||
| ARG_NAMES_LIST | |||
| ) |
Define Virtual Constructor call using DT_VIRTUAL_CTR_DEFINE( CLASS_NAME , ARG_TYPES_AND_NAMES_LIST , ARG_NAMES_LIST) Where CLASS_NAME = the name of the class that is being defined Where ARG_TYPES_AND_NAMES_LIST = a list (ie in side parentheses) of comma separated type id pairs.
Where ARG_NAMES_LIST = is the same comma seperated list but with only the names not the types
Example: DT_VIRTUAL_CTR_DEFINE( foo, (int a,float b, void* c) , ( a , b, c ) )
The code generated is equivalent to this:
foo::creatorFunction foo::theCreator = 0;
void foo::setCreator(foo::creatorFunction aCreatorFunc) { theCreator = aCreatorFunc; }
foo* foo::create(int a,float b, void* c) { if(theCreator) return theCreator( a , b, c ); else return new foo( a , b, c ); }
| #define DT_VIRTUAL_COPY_ASSIGN_DEFINE | ( | CLASS_NAME | ) |
Define Virtual Copy Constructor call using DT_VIRTUAL_COPY_CTR_DEFINE( CLASS_NAME ) Where CLASS_NAME = the name of the class that is being defined.
Example: DT_VIRTUAL_COPY_CTR_DEFINE( foo )
The code generated is equivalent to this:
foo::copierFunction foo::theCopier = 0;
void foo::setCopier(foo::copierFunction aCopierFunc) { theCopier = aCopierFunc; }
foo* foo::copy( const foo & orig) { if(theCopier) return theCopier( orig ); else return new foo( orig ); }
| #define DT_VIRTUAL_BASE_CTR_DEFINE | ( | CLASS_NAME, | |
| BASE_NAME, | |||
| ARG_TYPES_AND_NAMES_LIST, | |||
| ARG_NAMES_LIST | |||
| ) |
| #define DT_PURE_VIRTUAL_CTR_DEFINE | ( | CLASS_NAME, | |
| ARG_TYPES_AND_NAMES_LIST, | |||
| ARG_NAMES_LIST | |||
| ) |
Define Pure Virtual Constructor.
Essentially the same as the DT_VIRTUAL_CTR_DEFINE, except instead of calling a constructor if the static constructor function is not defined it throws an exception DtAbstractInterfaceUndefined.
call using DT_PURE_VIRTUAL_CTR_DEFINE( CLASS_NAME , ARG_TYPES_AND_NAMES_LIST , ARG_NAMES_LIST) Where CLASS_NAME = the name of the class that is being defined Where ARG_TYPES_AND_NAMES_LIST = a list (ie in side parentheses) of comma separated type id pairs. Where ARG_NAMES_LIST = is the same comma seperated list but with only the names not the types
Example: DT_VIRTUAL_CTR_DEFINE( foo, (int a,float b, void* c) , ( a , b, c ) )
The code generated is equivalent to this:
foo::creatorFunction foo::theCreator = 0;
void foo::setCreator(foo::creatorFunction aCreatorFunc) { theCreator = aCreatorFunc; }
foo* foo::create(int a,float b, void* c) { if(theCreator) return theCreator( a , b, c ); else throw DtCorruptedState("Class: foo has not be defined\n"); }