MeVisLabToolboxReference
ml::CopyBase< BASE_DERIVED_CLASS > Class Template Reference

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>

Inheritance diagram for ml::CopyBase< BASE_DERIVED_CLASS >:
ml::Engine ml::Module ml::FieldContainer ml::Base

List of all members.

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 RuntimeTypecheckObjectType (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).

Detailed Description

template<class BASE_DERIVED_CLASS>
class ml::CopyBase< BASE_DERIVED_CLASS >

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.


Member Enumeration Documentation

template<class BASE_DERIVED_CLASS>
enum ml::CopyBase::AutoUpdateMode

auto update mode enum

Enumerator:
AutoUpdateModeDoNothing 
AutoUpdateModeAutoClear 
AutoUpdateModeAutoUpdate 
AutoUpdateModeCount 

Definition at line 66 of file mlCopyBase.h.


Constructor & Destructor Documentation

template<class BASE_DERIVED_CLASS >
ml::CopyBase< BASE_DERIVED_CLASS >::~CopyBase ( )

Destructor, deleting the _outputObject.

destructor

Definition at line 223 of file mlCopyBase.h.


Member Function Documentation

template<class BASE_DERIVED_CLASS >
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().

template<class BASE_DERIVED_CLASS >
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.

template<class BASE_DERIVED_CLASS >
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.

template<class BASE_DERIVED_CLASS >
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.

template<class BASE_DERIVED_CLASS>
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.


Member Data Documentation

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
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().

template<class BASE_DERIVED_CLASS>
Base* ml::CopyBase< BASE_DERIVED_CLASS >::_outputObject [protected]

Copied object:

Definition at line 120 of file mlCopyBase.h.

template<class BASE_DERIVED_CLASS>
const char * ml::CopyBase< BASE_DERIVED_CLASS >::autoUpdateModeNames [static]
Initial value:
 {
    "Off",
    "AutoClear",
    "AutoUpdate"
}

auto update mode enum tokens

Definition at line 74 of file mlCopyBase.h.

Referenced by ml::CopyBase< BASE_DERIVED_CLASS >::CopyBase().


The documentation for this class was generated from the following file: