/build/buildd/igstk-3.0.0~cvs20081223/Source/igstkCoordinateSystemInterfaceMacros.h File Reference

#include "igstkCoordinateSystemTransformToResult.h"
#include "igstkCoordinateSystemTransformToErrorResult.h"
#include "igstkCoordinateSystemDelegator.h"

Include dependency graph for igstkCoordinateSystemInterfaceMacros.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Namespaces

namespace  igstk
 This file contains the declarations of IGSTK Events used to communicate among components.

Defines

#define igstkCoordinateSystemClassInterfaceMacro()
 igstkCoordinateSystemClassInterfaceMacro defines the coordinate system API used for managing spatial relationships between objects.
#define igstkCoordinateSystemClassInterfaceConstructorMacro()
 igstkCoordinateSystemClassInterfaceConstructorMacro initializes the observer and delegator used in the coordinate system API.


Define Documentation

 
#define igstkCoordinateSystemClassInterfaceMacro (  ) 

igstkCoordinateSystemClassInterfaceMacro defines the coordinate system API used for managing spatial relationships between objects.

To keep the interface definition common & centralized, it has been placed in a macro.

If an object uses igstkCoordinateSystemClassInterfaceMacro() in its header file, igstkCoordinateSystemClassInterfaceConstructorMacro must be called in that object's constructor in order to initialize objects declared by this macro.

Definition at line 39 of file igstkCoordinateSystemInterfaceMacros.h.

 
#define igstkCoordinateSystemClassInterfaceConstructorMacro (  ) 

Value:

m_CoordinateSystemObserver = CoordinateSystemObserverType::New(); \
  m_CoordinateSystemObserver->SetCallbackFunction(this, \
                                                   &Self::ObserverCallback); \
  m_CoordinateSystemDelegator = \
                          ::igstk::CoordinateSystemDelegator::New(); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemTransformToNullTargetEvent()   \
    , m_CoordinateSystemObserver ); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemTransformToDisconnectedEvent() \
    , m_CoordinateSystemObserver ); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemNullParentEvent() \
    , m_CoordinateSystemObserver ); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemThisParentEvent() \
    , m_CoordinateSystemObserver ); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemParentCycleEvent() \
    , m_CoordinateSystemObserver ); \
  m_CoordinateSystemDelegator->AddObserver( \
    ::igstk::CoordinateSystemTransformToEvent() \
    , m_CoordinateSystemObserver ); \
  std::stringstream tempStream; \
  tempStream << this->GetNameOfClass() << " 0x"; \
  tempStream << static_cast<void*>(this); \
  std::string name = tempStream.str(); \
  m_CoordinateSystemDelegator->SetName( name.c_str() );
igstkCoordinateSystemClassInterfaceConstructorMacro initializes the observer and delegator used in the coordinate system API.

This macro should be called from the constructor of an object which has igstkCoordinateSystemClassInterfaceMacro in its class header.

Definition at line 131 of file igstkCoordinateSystemInterfaceMacros.h.


Generated on Thu Feb 12 09:45:55 2009 for IGSTK by  doxygen 1.5.8