Definitions of macros used in FEM code. More...
Go to the source code of this file.
Classes | |
class | itk::fem::INITClass |
Class that is used in FEM_CLASS_INIT macro. More... | |
Namespaces | |
namespace | itk |
namespace | itk::fem |
Defines | |
#define | FEM_ABSTRACT_CLASS(thisClass, parentClass) |
#define | FEM_CLASS(thisClass, parentClass) |
#define | FEM_CLASS_INIT(thisClass) static INITClass Initializer_##thisClass(thisClass::CLID()); |
#define | FEM_CLASS_REGISTER(thisClass) |
Typedefs | |
typedef const Self * | ConstPointer |
typedef Self * | Pointer |
typedef parentClass | Superclass |
Definitions of macros used in FEM code.
itkFEMMacro.h defines macros that allow simple and consistent FEM code creation. Use these macros whenever posible (always)!
Definition in file itkFEMMacro.h.
#define FEM_ABSTRACT_CLASS | ( | thisClass, | |||
parentClass | ) |
public: \ \ typedef thisClass Self; \
If defined, FEM classes will use smart pointers.
Define this macro if you want to compile the FEM classes so that they use itk's SmartPointer object instead of standard c++ pointers. If defined, FEM classes will include routines for drawing on the device context. Define this macro if you want to compile the FEM Element and Node classes so that they include Draw() virtual member function. Calling this function draws the element or node on the specified windows device context.
Defines typedefs for pointers to class. This macro should be called immediately after the { in class declaration. It defines Self, Superclass, Pointer and ConstPointer typedef members in a class. It also includes all the necessary typedefs for compatibility when SmartPointer classes are used (itkTypeMacro).
thisClass | Name of the class that is being declared. | |
parentClass | Name of the class from which the current class is being derived. If this is the base class that is not derived from anything, let parentClass=thisClass. |
Definition at line 97 of file itkFEMMacro.h.
#define FEM_CLASS | ( | thisClass, | |||
parentClass | ) |
/* Pointers.... */ \ FEM_ABSTRACT_CLASS(thisClass,parentClass) \ public: \
Defines typedefs for pointers to class.
This macro should be called immediately after the { in class declaration. It first calls the FEM_ABSTRACT_CLASS macro. In addition it defines the Clone() function, CLID member that holds the class ID for FEMObjectFactory. Also, the New() static member is defined, as required, for compatibility with SmartPointer classes (itkNewMacro is called).
thisClass | Name of the class that is being declared. | |
parentClass | Name of the class from which the current class is being derived. |
Definition at line 151 of file itkFEMMacro.h.
#define FEM_CLASS_INIT | ( | thisClass | ) | static INITClass Initializer_##thisClass(thisClass::CLID()); |
Perform any initialization tasks for a class.
This macro creates a static object of INITClass class that references thisClass::CLID static member in a constructor. This insures that any initialization code for CLID is always executed, and thisClass is properly registered with FEMObjectFactory.
thisClass | Name of the class that needs to be initialized. |
Definition at line 265 of file itkFEMMacro.h.
#define FEM_CLASS_REGISTER | ( | thisClass | ) |
int thisClass::CLID(void) \ { static const int CLID_ = FEMObjectFactory<thisClass::Baseclass>::Register( thisClass::NewB, #thisClass); \ return CLID_; }
Register the specified class with FEMObjectFactory.
Registering is required for every class that the object factory will later be able to create. The class must contain static const int member CLID and must define or inherit Baseclass typedef. This is automatic if FEM_CLASS macro was used when declaring a class. CLID is initialized to a value assigned by the FEMObjectFactory.
This macro provides the definition for CLID static member function of a class. This function can't be defined inline.
thisClass | Name of the class that needs to be registered with FEMObjectFactory. |
Definition at line 223 of file itkFEMMacro.h.
typedef const Self* ConstPointer |
Const pointer or SmartPointer to an object.
Definition at line 109 of file itkFEMMacro.h.
typedef Self* Pointer |
Pointer or SmartPointer to an object.
Definition at line 106 of file itkFEMMacro.h.
typedef parentClass Superclass |
Standard "Self" typedef. Standard "Superclass" typedef.
Definition at line 103 of file itkFEMMacro.h.