MeVisLabToolboxReference
|
Engine template module CopyBase to copy any Base-derived object that provides a virtual assignment operator which allows to copy from Base. More...
#include <mlCopyBase.h>
Public Types | |
enum | AutoUpdateMode { AutoUpdateModeDoNothing = 0, AutoUpdateModeAutoClear, AutoUpdateModeAutoUpdate, AutoUpdateModeCount } |
auto update mode enum More... | |
Public Member Functions | |
CopyBase () | |
Constructor. | |
~CopyBase () | |
Destructor, deleting the _outputObject . | |
void | copyObject () |
Copies the input object to _outputObject and updates the base output. | |
void | deleteObject () |
Deletes the output object. | |
Static Public Attributes | |
static const char * | autoUpdateModeNames [] |
auto update mode enum tokens | |
Protected Member Functions | |
virtual void | handleNotification (Field *field) |
handle field changes | |
void | setNewOutputObject (BASE_DERIVED_CLASS *newOutObject) |
Sets output object to newOutObject, touches the output object. | |
const RuntimeType * | checkObjectType (const Base *inputObject) const |
Returns the ml-runtime type of the input object if valid, NULL otherwise. | |
Protected Attributes | |
Base * | _outputObject |
Copied object: | |
Field members | |
BaseField * | _fldInputBase |
Base input. | |
BaseField * | _fldOutputBase |
Base output. | |
StringField * | _fldObjectType |
String with object type name. | |
StringField * | _fldStatusString |
String with object type name. | |
BoolField * | _fldUpToDate |
Is the current output update consistent with the input object? Becomes false if the input or output object is touched. | |
EnumField * | _fldAutoUpdateMode |
Possible actions at input touch: DoNothing, AutoClear, AutoUpdate. | |
NotifyField * | _fldUpdate |
Delete output object, then update output object and set upToDateFld to true. | |
NotifyField * | _fldClear |
delete the output object now Also sets upToDate to (input == NULL). |
Engine template module CopyBase to copy any Base-derived object that provides a virtual assignment operator which allows to copy from Base.
Definition at line 48 of file mlCopyBase.h.
enum ml::CopyBase::AutoUpdateMode |
auto update mode enum
AutoUpdateModeDoNothing | |
AutoUpdateModeAutoClear | |
AutoUpdateModeAutoUpdate | |
AutoUpdateModeCount |
Definition at line 66 of file mlCopyBase.h.
ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase | ( | ) |
Constructor.
constructor:
Definition at line 198 of file mlCopyBase.h.
References ml::CopyBase< BASE_DERIVED_CLASS >::_fldAutoUpdateMode, ml::CopyBase< BASE_DERIVED_CLASS >::_fldClear, ml::CopyBase< BASE_DERIVED_CLASS >::_fldInputBase, ml::CopyBase< BASE_DERIVED_CLASS >::_fldObjectType, ml::CopyBase< BASE_DERIVED_CLASS >::_fldOutputBase, ml::CopyBase< BASE_DERIVED_CLASS >::_fldStatusString, ml::CopyBase< BASE_DERIVED_CLASS >::_fldUpdate, ml::CopyBase< BASE_DERIVED_CLASS >::_fldUpToDate, ml::FieldContainer::addBase(), ml::FieldContainer::addBool(), ml::FieldContainer::addEnum(), ml::FieldContainer::addNotify(), ml::FieldContainer::addString(), ml::CopyBase< BASE_DERIVED_CLASS >::AutoUpdateModeAutoUpdate, ml::CopyBase< BASE_DERIVED_CLASS >::AutoUpdateModeCount, ml::CopyBase< BASE_DERIVED_CLASS >::autoUpdateModeNames, and ml::Module::getFieldContainer().
ml::CopyBase< BASE_DERIVED_CLASS >::~CopyBase | ( | ) |
const RuntimeType * ml::CopyBase< BASE_DERIVED_CLASS >::checkObjectType | ( | const Base * | inputObject | ) | const [protected] |
Returns the ml-runtime type of the input object if valid, NULL otherwise.
Copies the input object to _outputObject
and updates the base output.
Definition at line 231 of file mlCopyBase.h.
References ml::RuntimeType::canCreateInstance(), ml::RuntimeType::getName(), and ml::RuntimeType::isDerivedFrom().
void ml::CopyBase< BASE_DERIVED_CLASS >::copyObject | ( | ) |
Copies the input object to _outputObject
and updates the base output.
Definition at line 257 of file mlCopyBase.h.
void ml::CopyBase< BASE_DERIVED_CLASS >::deleteObject | ( | ) |
Deletes the output object.
Copies the input object to _outputObject
and updates the base output.
Definition at line 297 of file mlCopyBase.h.
References ML_DELETE.
void ml::CopyBase< BASE_DERIVED_CLASS >::handleNotification | ( | Field * | field | ) | [protected, virtual] |
handle field changes
Copies the input object to _outputObject
and updates the base output.
Reimplemented from ml::Module.
Definition at line 310 of file mlCopyBase.h.
References ML_BAD_PARAMETER, and ML_PRINT_FATAL_ERROR.
void ml::CopyBase< BASE_DERIVED_CLASS >::setNewOutputObject | ( | BASE_DERIVED_CLASS * | newOutObject | ) | [protected] |
Sets output object to newOutObject, touches the output object.
Copies the input object to _outputObject
and updates the base output.
Definition at line 286 of file mlCopyBase.h.
EnumField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldAutoUpdateMode [protected] |
Possible actions at input touch: DoNothing, AutoClear, AutoUpdate.
Definition at line 99 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
NotifyField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldClear [protected] |
delete the output object now Also sets upToDate to (input == NULL).
Definition at line 106 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
BaseField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldInputBase [protected] |
Base input.
Definition at line 83 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
StringField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldObjectType [protected] |
String with object type name.
Definition at line 89 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
BaseField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldOutputBase [protected] |
Base output.
Definition at line 86 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
StringField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldStatusString [protected] |
String with object type name.
Definition at line 92 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
NotifyField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldUpdate [protected] |
Delete output object, then update output object and set upToDateFld to true.
Definition at line 102 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
BoolField* ml::CopyBase< BASE_DERIVED_CLASS >::_fldUpToDate [protected] |
Is the current output update consistent with the input object? Becomes false if the input or output object is touched.
Definition at line 96 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().
Base* ml::CopyBase< BASE_DERIVED_CLASS >::_outputObject [protected] |
Copied object:
Definition at line 120 of file mlCopyBase.h.
const char * ml::CopyBase< BASE_DERIVED_CLASS >::autoUpdateModeNames [static] |
{ "Off", "AutoClear", "AutoUpdate" }
auto update mode enum tokens
Definition at line 74 of file mlCopyBase.h.
Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().