MeVisLabToolboxReference
|
This file declares attribute subclass macros and the base attribute. More...
Go to the source code of this file.
Defines | |
#define | ATTRIBUTE_TYPE_HEADER(dataType) |
#define | ATTRIBUTE_TYPE_SOURCE(dataType) |
#define | ATTRIBUTE_OP_HEADER(dataType) |
#define | ATTRIBUTE_OP_SOURCE(dataType) |
This file declares attribute subclass macros and the base attribute.
Definition in file mlObjMgrSubAttribute.h.
#define ATTRIBUTE_OP_HEADER | ( | dataType | ) |
virtual void assign(const dataType &value); \ omAttribute &operator =(const dataType &value) { \ assign(value); return *this; \ }
Definition at line 54 of file mlObjMgrSubAttribute.h.
#define ATTRIBUTE_OP_SOURCE | ( | dataType | ) |
void omAttribute::assign(const dataType &value) { \ if(_data == NULL) { \ createDataType(QUOTE(omAttribute_##dataType)); \ \ if(_data == NULL) \ return; \ \ ObjMgr *om = _parent->parent()->objMgr(); \ if(om) { \ om->addEvent(ObjMgrEvent(ObjMgrEvent::ATTRIBUTE_CREATED, *this, omData(value))); \ om->disableEventRecording(); \ } \ \ *(omAttribute_##dataType *)_data = value; \ \ if(om) { \ om->enableEventRecording(); \ } \ } \ else { \ *(omAttribute_##dataType *)_data = value; \ } \ }
Definition at line 60 of file mlObjMgrSubAttribute.h.
#define ATTRIBUTE_TYPE_HEADER | ( | dataType | ) |
class MLOBJMGR_EXPORT omAttribute_##dataType : public omData_##dataType \ { \ ML_CLASS_HEADER(omAttribute_##dataType) \ \ public: \ \ omAttribute_##dataType() {} \ omAttribute_##dataType(const omAttribute_##dataType &type) : omData_##dataType(type._value) {} \ omAttribute_##dataType(const dataType &value) : omData_##dataType(value) {} \ virtual void assign(const dataType &value); \ };
Definition at line 27 of file mlObjMgrSubAttribute.h.
#define ATTRIBUTE_TYPE_SOURCE | ( | dataType | ) |
ML_CLASS_SOURCE(omAttribute_##dataType, omData_##dataType); \ void omAttribute_##dataType::assign(const dataType &value) { \ if(_value != value) { \ ObjMgr *om; \ if(_container && ((omAttribute *)_container)->parent() && ((omAttribute *)_container)->parent()->parent() && (om = ((omObject *)((omAttribute *)_container)->parent()->parent())->objMgr()) != NULL) { \ om->addEvent(ObjMgrEvent(ObjMgrEvent::ATTRIBUTE_MODIFIED, *(omAttribute *)_container, omData(value), omData(_value), false)); \ } \ \ _value = value; \ } \ }
Definition at line 40 of file mlObjMgrSubAttribute.h.