charon-core  0.3.1
ParameteredGroupObject Class Reference
Inheritance diagram for ParameteredGroupObject:

Public Member Functions

 ParameteredGroupObject (const std::string &className="ParameteredGroupObject", const std::string &name="", const std::string &doc="")
 Default constructor. More...
 
virtual ~ParameteredGroupObject ()
 Default deconstructor.
 
void breakLoop (int input)
 breakLoop More...
 
void disableLoopConnections ()
 disableLoopConnections
 
void enableLoopConnections ()
 enableLoopConnections More...
 
void execute ()
 Execution. More...
 
virtual void executeGroup ()
 Execution. More...
 
void finalize ()
 Finalization. More...
 
virtual void finalizeGroup ()
 Finalization. More...
 
void initialize ()
 Initialization. More...
 
virtual void initializeGroup ()
 Group Initialization. More...
 
void loopInputToOutput (int input, int output)
 LoopOutToInput. More...
 
virtual void onLoad (const ParameterFile &pf, const PluginManagerInterface *man)
 Custom load. More...
 
virtual void onSave (ParameterFile &pf) const
 Custom save. More...
 
virtual void prepareDynamicInterface (const ParameterFile &file)
 Prepare the interface. More...
 
virtual void setExecuted (bool value)
 set property _executed More...
 
- Public Member Functions inherited from ParameteredObject
virtual ~ParameteredObject ()
 Delete parametered object. More...
 
void clearMetadata ()
 delete metadata cache to save some space More...
 
bool executed () const
 get execution status
 
std::string fixCase (const std::string &parOrSlotName) const
 restore parameter/slot name casing
 
const ParameterFilegetMetadata ()
 get metadata
 
virtual void loadParameters (const ParameterFile &pf)
 Load parameter from parameter file. More...
 
void loadSlots (const ParameterFile &pf, const PluginManagerInterface *man)
 Load slot connection from parameter file. More...
 
virtual void resetExecuted (bool propagate=true)
 reset execution status More...
 
virtual void run ()
 Update object. More...
 
void save (ParameterFile &pf) const
 Save own content to the given parameter file. More...
 
virtual void saveParameters (ParameterFile &pf) const
 Save parameters to parameter file. More...
 
const std::string & getClassName () const
 class name
 
const std::string & getName () const
 instance name
 
virtual const std::string getTemplateType () const
 get template type as string More...
 
SlotgetSlot (const std::string &slotName) const
 Get pointer to some slot (by name) More...
 
const std::map< std::string,
Slot * > & 
getInputSlots () const
 Get all input slots as map. More...
 
const std::map< std::string,
Slot * > & 
getOutputSlots () const
 Get all output slots as map. More...
 
const std::map< std::string,
AbstractParameter * > & 
getParameters () const
 Get all Parameters as a map. More...
 
std::set< std::string > getNeighbours () const
 Get connected neighbours of the current object. More...
 
std::set< std::string > getNeighbours (const ParameterFile &pf) const
 Get connected neighbours of the current object. More...
 
virtual bool connected () const
 Check if object is ready for work. More...
 
void raise (const std::string &message) const
 throw an exception with information about the ParameteredObject More...
 
AbstractParametergetParameter (const std::string &name) const
 
template<typename T >
void setParameter (std::string name, T value)
 
bool isDynamic ()
 

Public Attributes

Parameter< bool > debugSuffix
 
ParameterList< std::string > pluginPaths
 plugin search paths which are used when executing this loop
 
Parameter< std::string > workFlowFile
 
- Public Attributes inherited from ParameteredObject
Parameter< bool > _active
 ParameteredObject activation state. More...
 

Protected Member Functions

virtual void onAddInputSlot (VirtualInputSlot *in)
 
virtual void onAddOutputSlot (VirtualOutputSlot *out)
 
- Protected Member Functions inherited from ParameteredObject
 ParameteredObject (const std::string &className, const std::string &name="", const std::string &doc="")
 Default constructor. More...
 
void _addInputSlot (Slot &slot, const std::string &name, const std::string &displayname, const std::string &doc, const std::string &type)
 Register input slot. More...
 
void _addOutputSlot (Slot &slot, const std::string &name, const std::string &displayname, const std::string &doc, const std::string &type)
 Register output slot. More...
 
void _addParameter (AbstractParameter &param, const std::string &name, const std::string &doc, const std::string &type="")
 Add parameters. More...
 
template<class T >
void _addParameter (Parameter< T > &param, const std::string &name, const std::string &doc, const T &defVal, const std::string &type="")
 Same function but adding a default value. More...
 
bool _addSomething (const std::string &extension, const std::string &name, const std::string &doc, const std::string &type, const std::string &defaultValue="")
 Common code for _addParameter, _addInputSlot, _addOutputSlot. More...
 
void _commitSlots ()
 commit slot data
 
std::set< ParameteredObject * > _getTargetNodes ()
 get target nodes More...
 
void _prepareSlots ()
 prepare slot data
 
void _removeInputSlot (std::string name)
 Remove an input slot.
 
void _removeOutputSlot (std::string name)
 Remove an output slot.
 
bool _removeSomething (const std::string &extension, const std::string &name)
 Remove something. Iverse of _addSomething.
 
void _setDynamic (bool v)
 Specifies if the ParameteredObject is dynamic.
 
void _setTags (const std::string &tags)
 Register additional tag names for grouping ParameteredObjects. More...
 
void runPreceeding () const
 run all preceeding objects
 
void runPreceeding (const Slot &slot) const
 run all preceeding objects connected to a particular slot More...
 
void _addInputSlot (Slot &slot, const std::string &name, const std::string &doc, const std::string &type="")
 These functions needs to be called by the derived class in order to register all objects which can be used as inputs or outputs. More...
 
void _addOutputSlot (Slot &slot, const std::string &name, const std::string &doc, const std::string &type="")
 Register output slot. More...
 

Protected Attributes

InputSlotBundleIntf_inputs
 
std::map< int,
VirtualOutputSlot * > 
_loopedSlots
 
std::vector< Parameter< int > * > _loopOutputNumber
 
OutputSlotBundleIntf_outputs
 
PluginManager_pluginMan
 

Additional Inherited Members

- Public Types inherited from ParameteredObject
enum  build_type { UNDEFINED_BUILD = 0, DEBUG_BUILD = 1, RELEASE_BUILD = 2 }
 defined build type More...
 
enum  template_type { TYPE_DOUBLE = 0, TYPE_FLOAT = 1, TYPE_INT = 2 }
 Integer which represents a template type. More...
 

Detailed Description

Definition at line 36 of file ParameteredGroupObject.h.

Constructor & Destructor Documentation

ParameteredGroupObject::ParameteredGroupObject ( const std::string &  className = "ParameteredGroupObject",
const std::string &  name = "",
const std::string &  doc = "" 
)

Init class name with given string. Also generates a unique instance name if necessary.

Parameters
classNameInitialization value for className property.
nameInstance name (auto generation if empty)
docClass docstring (for metadata)

Definition at line 20 of file ParameteredGroupObject.cpp.

References ParameteredObject::_addParameter(), ParameteredObject::_setDynamic(), and pluginPaths.

Member Function Documentation

void ParameteredGroupObject::breakLoop ( int  input)

Break a loop connection.

Definition at line 186 of file ParameteredGroupObject.cpp.

References ParameteredObject::getName(), and sout.

void ParameteredGroupObject::enableLoopConnections ( )

enable all looped connections

Definition at line 199 of file ParameteredGroupObject.cpp.

void ParameteredGroupObject::execute ( )
virtual

Calls executeGroup()

Reimplemented from ParameteredObject.

Definition at line 127 of file ParameteredGroupObject.cpp.

References executeGroup().

void ParameteredGroupObject::executeGroup ( )
virtual

Executes the group by calling executeWorkflow() in PluginManager

Reimplemented in WhileGroup, and IfGroup.

Definition at line 149 of file ParameteredGroupObject.cpp.

References PluginManager::runWorkflow().

void ParameteredGroupObject::finalize ( )
virtual

Calls finalizeGroup

Reimplemented from ParameteredObject.

Definition at line 132 of file ParameteredGroupObject.cpp.

References ParameteredObject::finalize(), finalizeGroup(), and PluginManager::reset().

void ParameteredGroupObject::finalizeGroup ( )
virtual

Does nothing. Can be used in derived classes.

Definition at line 144 of file ParameteredGroupObject.cpp.

void ParameteredGroupObject::initializeGroup ( )
virtual

Does nothing. Can be used in derived classes.

Reimplemented in WhileGroup.

Definition at line 122 of file ParameteredGroupObject.cpp.

void ParameteredGroupObject::loopInputToOutput ( int  input,
int  output 
)

Loop the given output to an input. The loop connection is only valid after one iteration of the group

Definition at line 177 of file ParameteredGroupObject.cpp.

References InputSlotBundleIntf::getInternalSlotVector(), and OutputSlotBundleIntf::getInternalSlotVector().

void ParameteredGroupObject::onLoad ( const ParameterFile pf,
const PluginManagerInterface man 
)
virtual

Load the loop connections

Reimplemented from ParameteredObject.

Definition at line 226 of file ParameteredGroupObject.cpp.

References Parameter< T >::load(), and loopInputToOutput().

void ParameteredGroupObject::onSave ( ParameterFile pf) const
virtual

saves the internal workflow

Reimplemented from ParameteredObject.

Definition at line 170 of file ParameteredGroupObject.cpp.

References PluginManager::saveParameterFile().

void ParameteredGroupObject::prepareDynamicInterface ( const ParameterFile file)
virtual

Loads the child workflow file given by the parent workflow file, and searches for the input and output slot bundles. These, if found, are added to the interface

Reimplemented from ParameteredObject.

Definition at line 219 of file ParameteredGroupObject.cpp.

References initialize(), Parameter< T >::load(), ParameterList< T >::load(), and pluginPaths.

void ParameteredGroupObject::setExecuted ( bool  value)
virtual
Parameters
valueNew value of _executed

Reimplemented from ParameteredObject.

Definition at line 238 of file ParameteredGroupObject.cpp.

References PluginManager::getObjectList(), AbstractPluginLoader::PluginException::OTHER, and ParameteredObject::setExecuted().


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