|
charon-core
0.3.1
|
Output slot. More...
#include <charon-core/Slots.h>

Public Member Functions | |
| OutputSlot (const T &initval=T()) | |
| Create new output slot. More... | |
| virtual | ~OutputSlot () |
| initialize data element | |
| virtual void | finalize () |
| finalize slot More... | |
| Slot::CacheType | getCacheType () const |
| query data cache type | |
| virtual const std::string & | getConfig () const |
| get manager configuration string | |
| const OutputSlotIntf * | getDataSlot () const |
| Return a pointer to a real slot. | |
| virtual std::string | getName () const |
| get the name | |
| virtual std::string | getType () const |
| Get slot type. More... | |
| virtual void | load (const ParameterFile &pf, const PluginManagerInterface *man) |
| Load slot connections. More... | |
| virtual | operator T () const |
| Cast operator to get data (get copy) More... | |
| virtual const T & | operator() () const |
| Call operator. More... | |
| virtual T & | operator() () |
| Call operator. More... | |
| virtual T & | operator= (const T &B) |
| data assignment operator More... | |
| virtual void | prepare () |
| prepare slot More... | |
| void | setCacheType (Slot::CacheType type) |
| change data cache type | |
| virtual void | setConfig (std::string conf) |
| set manager configuration string | |
Public Member Functions inherited from AbstractSlot< T > | |
| virtual std::set< Slot * > | getTargets () const |
| Get pointers to the connected targets. | |
| virtual std::string | guessType () const |
| Try to guess slot type. | |
| virtual void | save (ParameterFile &pf) const |
| Save slot connections This function disconnects already established connections in the parameterFile and stores the current one. More... | |
|
std::set< AbstractSlot< T > * >::const_iterator | begin () const |
| iterator to the beginning of the source list | |
|
std::set< AbstractSlot< T > * >::const_iterator | end () const |
| iterator to the end of the source list | |
Public Member Functions inherited from Slot | |
| Slot () | |
| default constructor | |
| bool | connect (Slot &target) |
| Connect with given slot. More... | |
| bool | connected () const |
| Check if slot is connected. | |
| bool | connected (Slot &target) const |
| Check if slot is connected to given slot. More... | |
| bool | disconnect () |
| Remove all slot targets. | |
| bool | disconnect (Slot &target) |
| Remove all slot targets. | |
| virtual std::string | getDisplayName () const |
| Get slot display name. | |
| bool | getMulti () const |
| return value of _multiSlot; | |
| bool | getOptional () const |
| return value of _optional; | |
| ParameteredObject & | getParent () |
| get parent object | |
| const ParameteredObject & | getParent () const |
| get parent object (const version) | |
| void | init (ParameteredObject *parent, std::string name, std::string type) |
| initialize parent and name More... | |
| void | init (ParameteredObject *parent, std::string name, std::string displayname, std::string type) |
| initialize parent and name and displayname More... | |
| void | printError (const std::string &msg) const |
| print error with slot name and type info to sout | |
| void | printInfo (const std::string &msg) const |
| print info message with slot name to sout | |
| void | printWarning (const std::string &msg) const |
| print warning message with slot name to sout | |
| void | raise (const std::string &msg) const |
| throw runtime error with slot name and type info | |
Private Member Functions | |
| void | _check () const |
| check for valid data pointer | |
| void | _prepare () |
| create data element, if needed | |
Private Attributes | |
| Slot::CacheType | _cacheType |
| output slot data cache type | |
| const T | _initVal |
| initial value cache | |
| std::string | _managerConfig |
| config string | |
| T * | data |
| Slot data. More... | |
Additional Inherited Members | |
Public Types inherited from Slot | |
| enum | CacheType { CACHE_INVALID, CACHE_MEM, CACHE_MANAGED } |
| slot data cache type More... | |
Protected Member Functions inherited from AbstractSlot< T > | |
| virtual bool | _addTarget (Slot *target) |
| Add slot target. More... | |
| virtual bool | _removeTarget (Slot *target) |
| Remove slot target. More... | |
Protected Attributes inherited from AbstractSlot< T > | |
| std::set< AbstractSlot< T > * > | _targets |
| Pointer to data of connected output slot. | |
Protected Attributes inherited from Slot | |
| std::string | _displayName |
| Slot display name. | |
| bool | _multiSlot |
| flag to mark this slot as a multislot, that can have multiple sources/targets. More... | |
| std::string | _name |
| Slot name. | |
| bool | _optional |
| flag to mark this slot as optional | |
| ParameteredObject * | _parent |
| Pointer to parent object. | |
| std::string | _type |
| Slot type. | |
This slot stores the output data and a list of connected slots.
| OutputSlot< T >::OutputSlot | ( | const T & | initval = T() | ) |
|
virtual |
this may be used on input/output slots to save/free data memory
Implements Slot.
Definition at line 437 of file Slots.hxx.
References Slot::CACHE_INVALID, Slot::CACHE_MANAGED, Slot::CACHE_MEM, Slot::DataManager< T >::getConfig(), Slot::DataManagerFactory< T >::getManager(), Slot::raise(), and Slot::DataManager< T >::setData().
|
inlinevirtual |
If "<T>" is found inside the type string, this will be replaced through the template type of the parent ParameteredObject.
Reimplemented from AbstractSlot< T >.
|
virtual |
Input slots set up the connection between slots calling _addTargets() on the partners to be connected via connect(). Output slots load their slot configuration, i.e. set up e.g. their cache type if specified in the parameter file.
| pf | ParameterFile to load from |
| man | PluginManager to get the instances from |
Implements Slot.
Definition at line 346 of file Slots.hxx.
References Slot::_name, Slot::_parent, Slot::CACHE_INVALID, Slot::CACHE_MANAGED, Slot::CACHE_MEM, ParameterFile::get(), ParameteredObject::getName(), ParameterFile::isSet(), Slot::raise(), and VirtualOutputSlot::setCacheType().
|
virtual |
Implements AbstractROData< T >.
|
virtual |
Implements AbstractROData< T >.
|
virtual |
|
virtual |
|
virtual |
|
private |