Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFEMMacro.h File Reference


Detailed Description

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.

Go to the source code of this file.

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 SelfConstPointer
typedef SelfPointer
typedef parentClass Superclass


Define Documentation

#define FEM_ABSTRACT_CLASS thisClass,
parentClass   ) 
 

Value:

public:                                               \                      \
  typedef thisClass Self;                             \
If defined, FEM classes will use smart pointers.If defined, FEM classes will include routines for drawing on the 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).

Parameters:
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.
Note:
Use this macro only for abstract classes that can't be instantiated. Otherwise use FEM_CLASS macro.

Definition at line 112 of file itkFEMMacro.h.

#define FEM_CLASS thisClass,
parentClass   ) 
 

Value:

/*  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).

Parameters:
thisClass Name of the class that is being declared.
parentClass Name of the class from which the current class is being derived.
Note:
Macro assumes that the Baseclass typedef is already present and specifies the base class from which the current class is derived. The Baseclass typedef is used as a return value of a Clone() function.

Definition at line 169 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.

Parameters:
thisClass Name of the class that needs to be initialized.
Note:
Call this macro in .h file after class declaration and within itk::fem namespace.

Definition at line 290 of file itkFEMMacro.h.

#define FEM_CLASS_REGISTER thisClass   ) 
 

Value:

int thisClass::CLID(void) \
  { static const int CLID_ = FEMObjectFactory<thisClass::Baseclass>::Register( thisClass::NewB, #thisClass); \
    return CLID_; }


Typedef Documentation

typedef const Self* ConstPointer
 

Const pointer or SmartPointer to an object.

Definition at line 124 of file itkFEMMacro.h.

typedef Self* Pointer
 

Pointer or SmartPointer to an object.

Definition at line 121 of file itkFEMMacro.h.

typedef parentClass Superclass
 

Standard "Superclass" typedef.

Definition at line 118 of file itkFEMMacro.h.


Generated at Sun Jul 9 18:46:14 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000