fesa::DeviceElement2 Class Reference

Used to store all device-specific Information which comes from the Instantiation-File. More...

#include <DeviceElement2.h>

List of all members.

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 AbstractDevicegetDeviceRef () 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< ClassElementparentClassElement_
 the parent-element in this linked-tree
AbstractDevicedeviceRef_
 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

Detailed Description

Used to store all device-specific Information which comes from the Instantiation-File.

Definition at line 25 of file DeviceElement2.h.


Constructor & Destructor Documentation

fesa::DeviceElement2::DeviceElement2 ( boost::shared_ptr< ClassElement parent,
bool  isGlobalDevice 
)
Parameters:
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.


Member Function Documentation

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]
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().


Member Data Documentation

ref to the internal-device representation of this device-element

Definition at line 86 of file DeviceElement2.h.

Referenced by connectEventConfigRefs(), getDeviceRef(), and initialize().

true, if this device-element represents a global-device

Definition at line 96 of file DeviceElement2.h.

Referenced by initialize().

true, when initialization of this object was finished successfully

Definition at line 91 of file DeviceElement2.h.

Referenced by connectEventConfigRefs(), getDeviceRef(), and initialize().

list of all device-logical event-elements connected to this device

Definition at line 76 of file DeviceElement2.h.

Referenced by connectEventConfigRefs(), and loadLogicalEventElements().

the parent-element in this linked-tree

Definition at line 81 of file DeviceElement2.h.

Referenced by connectEventConfigRefs().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1