Computer Assited Medical Intervention Tool Kit  version 5.0
sdk/libraries/core/component/Component.h File Reference
#include "InterfaceNode.h"
#include "InterfaceGeometry.h"
#include "InterfaceBitMap.h"
#include "InterfaceProperty.h"
#include "InterfaceFrame.h"
#include "AbortException.h"
#include <QPixmap>
#include <QMenu>
#include <QVector>
#include <CamiTKDisableWarnings>
#include <vtkWindowLevelLookupTable.h>
#include <vtkActor.h>
#include <vtkAxesActor.h>
#include <vtkImageActor.h>
#include <CamiTKReEnableWarnings>
#include <vtkImageData.h>
#include <vtkPointSet.h>
#include <vtkSmartPointer.h>
#include <vtkAlgorithmOutput.h>
#include <vtkActor2D.h>
#include <vtkTransform.h>
+ Include dependency graph for sdk/libraries/core/component/Component.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  camitk::Component
 A Component represents something that could be included in the explorer view, the interactive 3D viewer, and that could have or not a contextual popup menu (open by a right click in the explorer), a property dialog (to change some properties) Thus, a Component inherits from many abstract classes. A Component can only have one implemented representation. More...
 

Namespaces

 camitk
 

Macros

#define delegate0(HANDLER, METHOD)
 delegate macros: completely delegates METHOD to HANDLER, eventually using parameters of given PARAM_TYPE. More...
 
#define delegate1(HANDLER, METHOD, PARAM_TYPE)
 
#define delegate2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
 
#define delegate3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
 
#define delegate4(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3, PARAM_TYPE4)
 
#define delegateAndInvokeChildren1(HANDLER, METHOD, PARAM_TYPE)
 delegateAndInvokeChildren macros: Same as delegate but also calls METHOD, eventually with PARAM_TYPE, for all the childrenComponent. More...
 
#define delegateAndInvokeChildren1Array(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, DIM)
 
#define delegateAndInvokeChildren2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
 
#define delegateAndInvokeChildren3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
 
#define delegateAndInvokeChildren4(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3, PARAM_TYPE4)
 
#define delegateConstGet0(HANDLER, METHOD, TYPE)
 delegateConstGet macros: Same as delegateGet but for const METHOD More...
 
#define delegateConstGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
 
#define delegateGet0(HANDLER, METHOD, TYPE)
 delegateGet macros: Same as delegate macro but for an accessor non-const METHOD, returns a value of type TYPE given by HANDLER; eventually as a PARAM_TYPE parameter. More...
 
#define delegateGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
 
#define delegateGet2(HANDLER, METHOD, TYPE, PARAM1_TYPE, PARAM2_TYPE)
 
#define invoke0(HANDLER, METHOD)
 invoke macros: Check the HANDLER pointer and if non-null call its METHOD, eventually using PARAMeters More...
 
#define invoke1(HANDLER, METHOD, PARAM)
 
#define invoke2(HANDLER, METHOD, PARAM1, PARAM2)
 
#define invoke3(HANDLER, METHOD, PARAM1, PARAM2, PARAM3)
 
#define invoke4(HANDLER, METHOD, PARAM1, PARAM2, PARAM3, PARAM4)
 
#define invokeChildren0(METHOD)
 invokeChildren macros: Call a given METHOD eventually with PARAM for all childrenComponent More...
 
#define invokeChildren1(METHOD, PARAM)
 
#define invokeChildren2(METHOD, PARAM1, PARAM2)
 
#define invokeChildren3(METHOD, PARAM1, PARAM2, PARAM3)
 
#define invokeChildren4(METHOD, PARAM1, PARAM2, PARAM3, PARAM4)
 
#define invokeGet0(HANDLER, METHOD)
 invokeGet macros: Check the HANDLER pointer and if non-null call its METHOD, eventually using PARAMeters More...
 
#define invokeGet1(HANDLER, METHOD, PARAM)
 
#define invokeGet2(HANDLER, METHOD, PARAM1, PARAM2)
 
#define invokeGet3(HANDLER, METHOD, PARAM1, PARAM2, PARAM3)
 
#define invokeGet4(HANDLER, METHOD, PARAM1, PARAM2, PARAM3, PARAM4)
 

Macro Definition Documentation

◆ delegate0

#define delegate0 (   HANDLER,
  METHOD 
)
Value:
virtual void METHOD() override { \
invoke0(HANDLER,METHOD) \
}

delegate macros: completely delegates METHOD to HANDLER, eventually using parameters of given PARAM_TYPE.

As these macros call the corresponding invoke macros, the non-nullity of HANDLER is always checked before actually calling METHOD.

◆ delegate1

#define delegate1 (   HANDLER,
  METHOD,
  PARAM_TYPE 
)
Value:
virtual void METHOD(PARAM_TYPE param) override { \
invoke1(HANDLER,METHOD,param) \
}

◆ delegate2

#define delegate2 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) override { \
invoke2(HANDLER,METHOD,param1,param2) \
}

◆ delegate3

#define delegate3 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2,
  PARAM_TYPE3 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) override { \
invoke3(HANDLER,METHOD,param1,param2,param3) \
}

◆ delegate4

#define delegate4 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2,
  PARAM_TYPE3,
  PARAM_TYPE4 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3, PARAM_TYPE4 param4) override { \
invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
}

◆ delegateAndInvokeChildren1

#define delegateAndInvokeChildren1 (   HANDLER,
  METHOD,
  PARAM_TYPE 
)
Value:
virtual void METHOD(PARAM_TYPE param) override { \
invoke1(HANDLER,METHOD,param) \
invokeChildren1(METHOD,param) \
}

delegateAndInvokeChildren macros: Same as delegate but also calls METHOD, eventually with PARAM_TYPE, for all the childrenComponent.

First uses the corresponding invoke macro, then the corresponding invokeChildren macro.

◆ delegateAndInvokeChildren1Array

#define delegateAndInvokeChildren1Array (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2,
  DIM 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2[DIM]) override { \
invoke2(HANDLER,METHOD,param1,param2) \
invokeChildren2(METHOD,param1,param2) \
}

◆ delegateAndInvokeChildren2

#define delegateAndInvokeChildren2 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) override { \
invoke2(HANDLER,METHOD,param1,param2) \
invokeChildren2(METHOD,param1,param2) \
}

◆ delegateAndInvokeChildren3

#define delegateAndInvokeChildren3 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2,
  PARAM_TYPE3 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) override { \
invoke3(HANDLER,METHOD,param1,param2,param3) \
invokeChildren3(METHOD,param1,param2,param3) \
}

◆ delegateAndInvokeChildren4

#define delegateAndInvokeChildren4 (   HANDLER,
  METHOD,
  PARAM_TYPE1,
  PARAM_TYPE2,
  PARAM_TYPE3,
  PARAM_TYPE4 
)
Value:
virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3,PARAM_TYPE4 param4) override { \
invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
invokeChildren4(METHOD,param1,param2,param3,param4) \
}

◆ delegateConstGet0

#define delegateConstGet0 (   HANDLER,
  METHOD,
  TYPE 
)
Value:
virtual TYPE METHOD() const override { \
invokeGet0(HANDLER,METHOD) \
else \
return 0; \
}

delegateConstGet macros: Same as delegateGet but for const METHOD

◆ delegateConstGet1

#define delegateConstGet1 (   HANDLER,
  METHOD,
  TYPE,
  PARAM_TYPE 
)
Value:
virtual TYPE METHOD(PARAM_TYPE param) const override { \
invokeGet1(HANDLER,METHOD,param) \
else \
return 0; \
}

◆ delegateGet0

#define delegateGet0 (   HANDLER,
  METHOD,
  TYPE 
)
Value:
virtual TYPE METHOD() override { \
invokeGet0(HANDLER,METHOD) \
else \
return 0; \
}

delegateGet macros: Same as delegate macro but for an accessor non-const METHOD, returns a value of type TYPE given by HANDLER; eventually as a PARAM_TYPE parameter.

if HANDLER is NULL, return 0. (which should automatically be converted to false for bool, NULL for pointers...)

◆ delegateGet1

#define delegateGet1 (   HANDLER,
  METHOD,
  TYPE,
  PARAM_TYPE 
)
Value:
virtual TYPE METHOD(PARAM_TYPE param) override { \
invokeGet1(HANDLER,METHOD,param) \
else \
return 0; \
}

◆ delegateGet2

#define delegateGet2 (   HANDLER,
  METHOD,
  TYPE,
  PARAM1_TYPE,
  PARAM2_TYPE 
)
Value:
virtual TYPE METHOD(PARAM1_TYPE param1, PARAM2_TYPE param2) override { \
invokeGet2(HANDLER,METHOD,param1,param2) \
else \
return 0; \
}

◆ invoke0

#define invoke0 (   HANDLER,
  METHOD 
)
Value:
if (HANDLER) \
HANDLER->METHOD();

invoke macros: Check the HANDLER pointer and if non-null call its METHOD, eventually using PARAMeters

◆ invoke1

#define invoke1 (   HANDLER,
  METHOD,
  PARAM 
)
Value:
if (HANDLER) \
HANDLER->METHOD(PARAM);

◆ invoke2

#define invoke2 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2 
)
Value:
if (HANDLER) \
HANDLER->METHOD(PARAM1,PARAM2);

◆ invoke3

#define invoke3 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2,
  PARAM3 
)
Value:
if (HANDLER) \
HANDLER->METHOD(PARAM1,PARAM2,PARAM3);

◆ invoke4

#define invoke4 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2,
  PARAM3,
  PARAM4 
)
Value:
if (HANDLER) \
HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);

◆ invokeChildren0

#define invokeChildren0 (   METHOD)
Value:
foreach (Component *child, childrenComponent) { \
child->METHOD(); \
}

invokeChildren macros: Call a given METHOD eventually with PARAM for all childrenComponent

◆ invokeChildren1

#define invokeChildren1 (   METHOD,
  PARAM 
)
Value:
foreach (Component *child, childrenComponent) { \
child->METHOD(PARAM); \
}

◆ invokeChildren2

#define invokeChildren2 (   METHOD,
  PARAM1,
  PARAM2 
)
Value:
foreach (Component *child, childrenComponent) { \
child->METHOD(PARAM1,PARAM2); \
}

◆ invokeChildren3

#define invokeChildren3 (   METHOD,
  PARAM1,
  PARAM2,
  PARAM3 
)
Value:
foreach (Component *child, childrenComponent) { \
child->METHOD(PARAM1,PARAM2,PARAM3); \
}

◆ invokeChildren4

#define invokeChildren4 (   METHOD,
  PARAM1,
  PARAM2,
  PARAM3,
  PARAM4 
)
Value:
foreach (Component *child, childrenComponent) { \
child->METHOD(PARAM1,PARAM2,PARAM3,PARAM4); \
}

◆ invokeGet0

#define invokeGet0 (   HANDLER,
  METHOD 
)
Value:
if (HANDLER) \
return HANDLER->METHOD();

invokeGet macros: Check the HANDLER pointer and if non-null call its METHOD, eventually using PARAMeters

◆ invokeGet1

#define invokeGet1 (   HANDLER,
  METHOD,
  PARAM 
)
Value:
if (HANDLER) \
return HANDLER->METHOD(PARAM);

◆ invokeGet2

#define invokeGet2 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2 
)
Value:
if (HANDLER) \
return HANDLER->METHOD(PARAM1,PARAM2);

◆ invokeGet3

#define invokeGet3 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2,
  PARAM3 
)
Value:
if (HANDLER) \
return HANDLER->METHOD(PARAM1,PARAM2,PARAM3);

◆ invokeGet4

#define invokeGet4 (   HANDLER,
  METHOD,
  PARAM1,
  PARAM2,
  PARAM3,
  PARAM4 
)
Value:
if (HANDLER) \
return HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);
Component
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48