|
solarpowerlog trunk
|
#include <CCapability.h>


Public Member Functions | |
| CCapability (const string &descr, IValue *val, IInverterBase *datasrc=NULL) | |
| CCapability (const string &descr, IValue::factory_types type, IInverterBase *datasrc=NULL) | |
| virtual | ~CCapability () |
| const string & | getDescription () const |
| virtual IInverterBase * | getSource () const |
| virtual IValue * | getValue () const |
Protected Attributes | |
| string | description |
| IInverterBase * | source |
| IValue * | value |
Implements the CCapability Concept
Please see the Capability Concept description for details on the concepts.
The class is noncopyable as usually a Capability is non-transferable due to the assosicated Value.
OBJECTS ASSESTS (OBJECT OWNERSHIPS)
To understand object responsibility (espcially who's task it is to delete that object) , and as the class contains some pointers to foreign objects, it is important to define the responsbility on these objects.
Definition at line 148 of file CCapability.h.
| CCapability::CCapability | ( | const string & | descr, |
| IValue * | val, | ||
| IInverterBase * | datasrc = NULL |
||
| ) |
Construct a Capability, specify the concrete objects it should use.
| descr | String used to identify the Capabilty. Should be descriptive,as it might be present to the end-user. |
| val | Associated Value object. |
| datasrc | Pointer to the generating Inverter. Can be used for datafilter to find out what the origin of the data is. |
Definition at line 44 of file CCapability.cpp.
| CCapability::CCapability | ( | const string & | descr, |
| IValue::factory_types | type, | ||
| IInverterBase * | datasrc = NULL |
||
| ) |
Convenience-Constructor: Make a Capabilty and also create the value-object.
Definition at line 52 of file CCapability.cpp.

| CCapability::~CCapability | ( | ) | [virtual] |
Destructor. Deletes the value object as well. (See CCapability for details)
Definition at line 60 of file CCapability.cpp.
| const string& CCapability::getDescription | ( | ) | const [inline] |
| virtual IInverterBase* CCapability::getSource | ( | ) | const [inline, virtual] |
Get a the pointer to the one feeding this data.
Definition at line 186 of file CCapability.h.
| virtual IValue* CCapability::getValue | ( | ) | const [inline, virtual] |
Returns the pointer t
Definition at line 192 of file CCapability.h.
string CCapability::description [protected] |
storage for the description passed by the creator
Definition at line 199 of file CCapability.h.
IInverterBase* CCapability::source [protected] |
storage for the source-pointer passed by the creator
Definition at line 201 of file CCapability.h.
IValue* CCapability::value [protected] |
storage for the value-pointer passed by the creator
Definition at line 203 of file CCapability.h.