Used to store all device-specific Information which comes from the Instantiation-File. More...
#include <DeviceElement2.h>
Public Member Functions | |
DeviceElement2 (boost::shared_ptr< ClassElement > parent, bool isGlobalDevice) | |
virtual void | initialize (const std::string &xpath, ElementXML *deviceElement, AbstractDeviceFactory *factory, ParserElementFactory &parserElementFactory) |
triggers the parsing of the xml-file-structures and initializes the class with all needed information | |
virtual | ~DeviceElement2 () |
virtual AbstractDevice * | getDeviceRef () const |
virtual void | connectEventConfigRefs () |
connects all event-config-ref-elements on class level, according to the XML-links in the events-mapping of this device | |
Protected Member Functions | |
DeviceElement2 () | |
To allow easy mocking of this class. | |
Private Member Functions | |
std::string | loadAttribute (const std::string &xpath, ElementXML *element, const std::string &attributeName) |
returns the value of an xml-attribute | |
void | loadEventsMappingElement (const std::string &xpath, ElementXML *deviceElement, ParserElementFactory &parserElementFactory) |
loads the xml-events-mapping-element of this device and stores all info | |
void | loadLogicalEventElements (const std::string &xpath, ElementXML *eventsMappingElement, ParserElementFactory &parserElementFactory) |
loads all logical-event-elements of this device and stores all info | |
Private Attributes | |
std::vector< boost::shared_ptr < DeviceLogicalEventElement > > | logicalEventElementCol_ |
list of all device-logical event-elements connected to this device | |
boost::shared_ptr< ClassElement > | parentClassElement_ |
the parent-element in this linked-tree | |
AbstractDevice * | deviceRef_ |
ref to the internal-device representation of this device-element | |
bool | isInitialized_ |
true, when initialization of this object was finished successfully | |
bool | isGlobalDevice_ |
true, if this device-element represents a global-device |
Used to store all device-specific Information which comes from the Instantiation-File.
Definition at line 25 of file DeviceElement2.h.
fesa::DeviceElement2::DeviceElement2 | ( | boost::shared_ptr< ClassElement > | parent, | |
bool | isGlobalDevice | |||
) |
parent | the parent-element in the linked-tree | |
isGlobalDevice | true, if it is a global-device |
Definition at line 17 of file DeviceElement2.cpp.
fesa::DeviceElement2::~DeviceElement2 | ( | ) | [virtual] |
Definition at line 28 of file DeviceElement2.cpp.
fesa::DeviceElement2::DeviceElement2 | ( | ) | [protected] |
To allow easy mocking of this class.
Definition at line 23 of file DeviceElement2.cpp.
void fesa::DeviceElement2::connectEventConfigRefs | ( | ) | [virtual] |
connects all event-config-ref-elements on class level, according to the XML-links in the events-mapping of this device
Definition at line 75 of file DeviceElement2.cpp.
References deviceRef_, FesaErrorParserElementNotInitialized, isInitialized_, logicalEventElementCol_, and parentClassElement_.
AbstractDevice * fesa::DeviceElement2::getDeviceRef | ( | ) | const [virtual] |
Definition at line 102 of file DeviceElement2.cpp.
References deviceRef_, FesaErrorParserElementNotInitialized, and isInitialized_.
void fesa::DeviceElement2::initialize | ( | const std::string & | xpath, | |
ElementXML * | deviceElement, | |||
AbstractDeviceFactory * | factory, | |||
ParserElementFactory & | parserElementFactory | |||
) | [virtual] |
triggers the parsing of the xml-file-structures and initializes the class with all needed information
Definition at line 33 of file DeviceElement2.cpp.
References fesa::DEVICE_ELEMENT_ATTRIBUTE_TAG, deviceRef_, fesa::AbstractDeviceFactory::getDevice(), fesa::AbstractDeviceFactory::getGlobalDevice(), isGlobalDevice_, isInitialized_, loadAttribute(), and loadEventsMappingElement().
std::string fesa::DeviceElement2::loadAttribute | ( | const std::string & | xpath, | |
ElementXML * | element, | |||
const std::string & | attributeName | |||
) | [private] |
returns the value of an xml-attribute
Definition at line 87 of file DeviceElement2.cpp.
References fesa::ElementXML::attributeList_, and FesaErrorXMLAttributeNotFound.
Referenced by initialize().
void fesa::DeviceElement2::loadEventsMappingElement | ( | const std::string & | xpath, | |
ElementXML * | deviceElement, | |||
ParserElementFactory & | parserElementFactory | |||
) | [private] |
loads the xml-events-mapping-element of this device and stores all info
Definition at line 50 of file DeviceElement2.cpp.
References fesa::ElementXML::childList_, fesa::EVENTS_MAPPING_ELEMENT_TAG, and loadLogicalEventElements().
Referenced by initialize().
void fesa::DeviceElement2::loadLogicalEventElements | ( | const std::string & | xpath, | |
ElementXML * | eventsMappingElement, | |||
ParserElementFactory & | parserElementFactory | |||
) | [private] |
loads all logical-event-elements of this device and stores all info
Definition at line 63 of file DeviceElement2.cpp.
References fesa::ElementXML::childList_, fesa::ParserElementFactory::createDeviceLogicalEventElement(), and logicalEventElementCol_.
Referenced by loadEventsMappingElement().
AbstractDevice* fesa::DeviceElement2::deviceRef_ [private] |
ref to the internal-device representation of this device-element
Definition at line 86 of file DeviceElement2.h.
Referenced by connectEventConfigRefs(), getDeviceRef(), and initialize().
bool fesa::DeviceElement2::isGlobalDevice_ [private] |
true, if this device-element represents a global-device
Definition at line 96 of file DeviceElement2.h.
Referenced by initialize().
bool fesa::DeviceElement2::isInitialized_ [private] |
true, when initialization of this object was finished successfully
Definition at line 91 of file DeviceElement2.h.
Referenced by connectEventConfigRefs(), getDeviceRef(), and initialize().
std::vector<boost::shared_ptr<DeviceLogicalEventElement> > fesa::DeviceElement2::logicalEventElementCol_ [private] |
list of all device-logical event-elements connected to this device
Definition at line 76 of file DeviceElement2.h.
Referenced by connectEventConfigRefs(), and loadLogicalEventElements().
boost::shared_ptr<ClassElement> fesa::DeviceElement2::parentClassElement_ [private] |
the parent-element in this linked-tree
Definition at line 81 of file DeviceElement2.h.
Referenced by connectEventConfigRefs().