Used to store all DEventConfiguration-specific Information which comes from the Instantiation-File. More...
#include <EventConfigurationElement.h>
Public Member Functions | |
EventConfigurationElement (boost::shared_ptr< LogicalEventElement > parent) | |
virtual | ~EventConfigurationElement () |
virtual void | initialize (const std::string &xpath, ElementXML *eventConfigurationElement, ParserElementFactory &parserElementFactory) |
triggers the parsing of the xml-file-structures and initializes the class with all needed information | |
virtual void | addDeviceRef (AbstractDevice *device) |
virtual std::vector < boost::shared_ptr < EventElement > > | getEventElementCol () const |
virtual std::string | getName () const |
virtual AbstractDeviceClass * | getClassRef () const |
virtual const std::string & | getLogicalEventName () const |
virtual bool | isNotUsed () const |
Protected Member Functions | |
EventConfigurationElement () | |
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 | loadEventSourceElement (const std::string &xpath, ElementXML *eventConfigurationElement, ParserElementFactory &parserElementFactory) |
loads the xml-event-source-element of this event-configuration-element | |
void | loadEventElements (const std::string &xpath, ElementXML *logicalEventElement, const std::string &eventSource, ParserElementFactory &parserElementFactory) |
loads all xml-Event-Elements of the specified event-source | |
Private Attributes | |
std::vector< boost::shared_ptr < EventElement > > | eventElementCol_ |
std::vector< AbstractDevice * > | deviceCol_ |
boost::shared_ptr < LogicalEventElement > | parentLogicalEventElement_ |
the parent-element in this linked-tree | |
std::string | eventConfigurationName_ |
bool | isInitialized_ |
true, when initialization of this object was finished successfully |
Used to store all DEventConfiguration-specific Information which comes from the Instantiation-File.
Definition at line 24 of file EventConfigurationElement.h.
fesa::EventConfigurationElement::EventConfigurationElement | ( | boost::shared_ptr< LogicalEventElement > | parent | ) |
parent | the parent-element in the linked-tree |
Definition at line 16 of file EventConfigurationElement.cpp.
fesa::EventConfigurationElement::~EventConfigurationElement | ( | ) | [virtual] |
Definition at line 27 of file EventConfigurationElement.cpp.
fesa::EventConfigurationElement::EventConfigurationElement | ( | ) | [protected] |
To allow easy mocking of this class.
Definition at line 22 of file EventConfigurationElement.cpp.
void fesa::EventConfigurationElement::addDeviceRef | ( | AbstractDevice * | device | ) | [virtual] |
used | in order to add references of the connected devices to this object (according to the mapping in the xml-file) |
Definition at line 39 of file EventConfigurationElement.cpp.
References deviceCol_, eventElementCol_, FesaErrorParserElementNotInitialized, and isInitialized_.
AbstractDeviceClass * fesa::EventConfigurationElement::getClassRef | ( | ) | const [virtual] |
Definition at line 89 of file EventConfigurationElement.cpp.
References parentLogicalEventElement_.
std::vector< boost::shared_ptr< EventElement > > fesa::EventConfigurationElement::getEventElementCol | ( | ) | const [virtual] |
Definition at line 107 of file EventConfigurationElement.cpp.
References eventElementCol_, FesaErrorParserElementNotInitialized, and isInitialized_.
const std::string & fesa::EventConfigurationElement::getLogicalEventName | ( | ) | const [virtual] |
Definition at line 94 of file EventConfigurationElement.cpp.
References parentLogicalEventElement_.
std::string fesa::EventConfigurationElement::getName | ( | ) | const [virtual] |
Definition at line 115 of file EventConfigurationElement.cpp.
References eventConfigurationName_, FesaErrorParserElementNotInitialized, and isInitialized_.
void fesa::EventConfigurationElement::initialize | ( | const std::string & | xpath, | |
ElementXML * | eventConfigurationElement, | |||
ParserElementFactory & | parserElementFactory | |||
) | [virtual] |
triggers the parsing of the xml-file-structures and initializes the class with all needed information
Definition at line 32 of file EventConfigurationElement.cpp.
References fesa::EVENT_CONFIGURATION_ATTRIBUTE_TAG, eventConfigurationName_, isInitialized_, loadAttribute(), and loadEventSourceElement().
bool fesa::EventConfigurationElement::isNotUsed | ( | ) | const [virtual] |
True,if | this event-configuration is not used by any device |
Definition at line 99 of file EventConfigurationElement.cpp.
References deviceCol_, FesaErrorParserElementNotInitialized, and isInitialized_.
std::string fesa::EventConfigurationElement::loadAttribute | ( | const std::string & | xpath, | |
ElementXML * | element, | |||
const std::string & | attributeName | |||
) | [private] |
returns the value of an xml-attribute
Definition at line 74 of file EventConfigurationElement.cpp.
References fesa::ElementXML::attributeList_, and FesaErrorXMLAttributeNotFound.
Referenced by initialize().
void fesa::EventConfigurationElement::loadEventElements | ( | const std::string & | xpath, | |
ElementXML * | logicalEventElement, | |||
const std::string & | eventSource, | |||
ParserElementFactory & | parserElementFactory | |||
) | [private] |
loads all xml-Event-Elements of the specified event-source
Definition at line 62 of file EventConfigurationElement.cpp.
References fesa::ElementXML::childList_, fesa::ParserElementFactory::createEventElement(), and eventElementCol_.
Referenced by loadEventSourceElement().
void fesa::EventConfigurationElement::loadEventSourceElement | ( | const std::string & | xpath, | |
ElementXML * | eventConfigurationElement, | |||
ParserElementFactory & | parserElementFactory | |||
) | [private] |
loads the xml-event-source-element of this event-configuration-element
Definition at line 52 of file EventConfigurationElement.cpp.
References fesa::ElementXML::childList_, and loadEventElements().
Referenced by initialize().
std::vector<AbstractDevice*> fesa::EventConfigurationElement::deviceCol_ [private] |
Definition at line 83 of file EventConfigurationElement.h.
Referenced by addDeviceRef(), and isNotUsed().
std::string fesa::EventConfigurationElement::eventConfigurationName_ [private] |
Definition at line 90 of file EventConfigurationElement.h.
Referenced by getName(), and initialize().
std::vector<boost::shared_ptr<EventElement> > fesa::EventConfigurationElement::eventElementCol_ [private] |
Definition at line 81 of file EventConfigurationElement.h.
Referenced by addDeviceRef(), getEventElementCol(), and loadEventElements().
bool fesa::EventConfigurationElement::isInitialized_ [private] |
true, when initialization of this object was finished successfully
Definition at line 95 of file EventConfigurationElement.h.
Referenced by addDeviceRef(), getEventElementCol(), getName(), initialize(), and isNotUsed().
boost::shared_ptr<LogicalEventElement> fesa::EventConfigurationElement::parentLogicalEventElement_ [private] |
the parent-element in this linked-tree
Definition at line 88 of file EventConfigurationElement.h.
Referenced by getClassRef(), and getLogicalEventName().