Classes | Namespaces | Defines

cmtkObject.h File Reference

Go to the source code of this file.

Classes

class  cmtk::Object
 Base class for all reference counted objects. More...

Namespaces

namespace  cmtk

Defines

#define NULL   0
#define cmtkGetSetMacroObject(t, name)
 Macro to define a protected pointer class parameter and public read and write access member functions.
#define igsClassParameter(type, name)
 Macro to define a protected scalar class parameter and public read and write access member functions.
#define cmtkClassParameter(type, name)
 Macro to define a protected scalar class parameter and public read and write access member functions.
#define igsClassParameter2Array(type, name)
 Macro to define a protected 2D array class parameter and public read and write access member functions.
#define igsClassParameter3Array(type, name)
 Macro to define a protected 3D array class parameter and public read and write access member functions.

Define Documentation

#define cmtkClassParameter (   type,
  name 
)
Value:
public: type m_##name; \
             void Set##name( const type v ) { if ( this->m_##name != v ) this->UpdateModifiedTime(); this->m_##name = v; } \
             type Get##name() const { return this->m_##name; } \
             void Get##name( type& to ) { to = this->m_##name; }

Macro to define a protected scalar class parameter and public read and write access member functions.

Definition at line 64 of file cmtkObject.h.

#define cmtkGetSetMacroObject (   t,
  name 
)
Value:
protected: t *m_##name; \
  public:    void Set##name( t *const v ) { if (v) v->Reference(); if (this->m_##name) this->m_##name->Delete(); this->m_##name = v; } \
             t* Get##name() { return this->m_##name; } \
             const t* Get##name() const { return this->m_##name; } \
             void Get##name( t*& to ) { to = this->m_##name; }

Macro to define a protected pointer class parameter and public read and write access member functions.

Definition at line 45 of file cmtkObject.h.

#define igsClassParameter (   type,
  name 
)
Value:
public: type name; \
             void Set##name( const type v ) { if ( name != v ) this->UpdateModifiedTime(); name = v; } \
             type Get##name() const { return name; } \
             void Get##name( type& to ) { to = name; }

Macro to define a protected scalar class parameter and public read and write access member functions.

Definition at line 55 of file cmtkObject.h.

#define igsClassParameter2Array (   type,
  name 
)
Value:
protected: type name[2]; \
  public:    void Set##name( const type v0, const type v1 ) \
                  { if ( (name[0] != v0) || (name[1] != v1) ) this->UpdateModifiedTime(); name[0] = v0; name[1] = v1; } \
             void SetByIndex##name( const int axis, const type v ) \
                  { if (name[axis] != v) this->UpdateModifiedTime(); name[axis] = v; } \
             void Set##name( const type* v ) \
                  { if ( (name[0] != v[0]) || (name[1] != v[1]) ) this->UpdateModifiedTime(); name[0] = v[0]; name[1] = v[1]; } \
             void Get##name( type &v0, type &v1 ) const \
                  { v0 = name[0]; v1 = name[1]; } \
             void Get##name( type *const v ) const \
                  { v[0] = name[0]; v[1] = name[1]; } \
             const type* Get##name() const { return name; } \
             type* Get##name() { return name; } \
             type Get##name( const int i ) const { return name[i]; }

Macro to define a protected 2D array class parameter and public read and write access member functions.

Definition at line 73 of file cmtkObject.h.

#define igsClassParameter3Array (   type,
  name 
)
Value:
protected: type name[3]; \
  public:    void Set##name( const type v0, const type v1, const type v2 ) \
                  { if ( (name[0] != v0) || (name[1] != v1) || (name[2] != v2) ) this->UpdateModifiedTime(); name[0] = v0; name[1] = v1; name[2] = v2; } \
             void SetByIndex##name( const int axis, const type v ) \
                  { if (name[axis] != v) this->UpdateModifiedTime(); name[axis] = v; } \
             void Set##name( const type* v ) \
                  { if ( (name[0] != v[0]) || (name[1] != v[1]) || (name[2] != v[2]) ) this->UpdateModifiedTime(); name[0] = v[0]; name[1] = v[1]; name[2] = v[2]; } \
             void Get##name( type &v0, type &v1, type &v2 ) const \
                  { v0 = name[0]; v1 = name[1]; v2 = name[2]; } \
             void Get##name( type *const v ) const \
                  { v[0] = name[0]; v[1] = name[1]; v[2] = name[2]; } \
             const type* Get##name() const { return name; } \
             type* Get##name() { return name; } \
             type Get##name( const int i ) const { return name[i]; }

Macro to define a protected 3D array class parameter and public read and write access member functions.

Definition at line 92 of file cmtkObject.h.

#define NULL   0

Definition at line 39 of file cmtkObject.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines