#include "SIM_Data.h"#include "SIM_DataFactory.h"#include "SIM_Utils.h"Go to the source code of this file.
Defines | |
| #define | DECLARE_CLASSNAME(DataClass, SuperClass) |
| #define | DECLARE_STANDARD_GETCASTTOTYPE() |
| #define | DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms) |
| #define | IMPLEMENT_DATAFACTORY(DataClass) |
| #define DECLARE_CLASSNAME | ( | DataClass, | |||
| SuperClass | ) |
Value:
private: \ typedef SuperClass BaseClass; \ typedef DataClass ThisClass; \ static const char *classname() { return #DataClass; } \ virtual const UT_String &getDataTypeSubclass() const \ { \ static UT_String theType(classname()); \ return theType; \ }
Definition at line 23 of file SIM_DataUtils.h.
| #define DECLARE_DATAFACTORY | ( | DataClass, | |||
| SuperClass, | |||||
| Description, | |||||
| DopParms | ) |
This macro simplifies the calling and casting the return value from This macro quickly defines all the static functions needed to declare a SIM_DataFactory for a SIM_Data subclass.
Definition at line 51 of file SIM_DataUtils.h.
| #define DECLARE_STANDARD_GETCASTTOTYPE | ( | ) |
Value:
protected: \ virtual void *getCastToType(const char *totype) const \ { \ if( strcmp(classname(), totype) == 0 ) \ return (void *)this; \ return BaseClass::getCastToType(totype); \ }
Definition at line 39 of file SIM_DataUtils.h.
| #define IMPLEMENT_DATAFACTORY | ( | DataClass | ) |
Value:
static SIM_DataFactoryCreator \ DataClass##Creator(DataClass::createDataFactory);
Definition at line 87 of file SIM_DataUtils.h.
1.5.9