fesa::StoreManager Class Reference

this class is responsible for storing and restoring devices of a class from a persistency mechanism More...

#include <StoreManager.h>

List of all members.

Public Member Functions

 StoreManager ()
 constructor
 ~StoreManager ()
 destructor
void restore (GlobalDevice &globalDevice, std::vector< AbstractDevice * > &deviceCol, std::vector< DomainStore * > &domainStoreCol, const std::string &className)
 this method fills the objects passed as parameters with the information in the persistent system of the equipment
void store (PersistencyUnit &pu)
 this method makes stores the information about the data stores contained in the persistent unit passed by parameter

Private Member Functions

void storeFields (XMLParser &parser, const std::vector< AbstractField * > &fields, std::string dataStore)
 this method stores into the parser the fields passed by argument
GlobalDeviceElementretrieveGlobalDeviceElement (XMLParser &parser)
 return the global device element from the persistency
std::vector< DeviceElement * > * retrieveDeviceElements (XMLParser &parser)
 return the devices from from the initialization system (instance file)
std::vector
< DomainStoreElement * > * 
retrieveDomainStoreElements (XMLParser &parser)
 return the devices from from the initialization system (instance file)
void fillElements (ElementXML *dataStoreXML, DataStoreElement *dataStoreElement)

Static Private Attributes

static const std::string GLOBAL_DEVICE_TAG = "global-instance"
static const std::string DEVICE_INSTANCE_TAG = "device-instance"
static const std::string DOMAIN_STORE_TAG = "domain-data"

Detailed Description

this class is responsible for storing and restoring devices of a class from a persistency mechanism

Definition at line 29 of file StoreManager.h.


Constructor & Destructor Documentation

fesa::StoreManager::StoreManager (  ) 

constructor

Definition at line 22 of file StoreManager.cpp.

fesa::StoreManager::~StoreManager (  ) 

destructor

Definition at line 26 of file StoreManager.cpp.


Member Function Documentation

void fesa::StoreManager::fillElements ( ElementXML dataStoreXML,
DataStoreElement dataStoreElement 
) [private]
void fesa::StoreManager::restore ( GlobalDevice globalDevice,
std::vector< AbstractDevice * > &  deviceCol,
std::vector< DomainStore * > &  domainStoreCol,
const std::string &  className 
)

this method fills the objects passed as parameters with the information in the persistent system of the equipment

Parameters:
globalDevice of the class
deviceCol devices of the class
domainCol domain stores of the class
className to access the persistent system

Definition at line 30 of file StoreManager.cpp.

References FesaErrorDataStoreElementRetrievingFieldElement, FesaErrorRestoringDevices, FesaErrorRestoringDomainStores, FesaErrorRestoringGlobalDevice, fesa::FesaException::getFileName(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getLineNumber(), fesa::AbstractEquipment::getPersistencyFileName(), fesa::DataStore::restoreFromElement(), retrieveDeviceElements(), retrieveDomainStoreElements(), and retrieveGlobalDeviceElement().

Referenced by fesa::DeviceFactoryImp< GlobalDeviceType, DomainStoreType, DevInstType >::initialize().

std::vector< DeviceElement * > * fesa::StoreManager::retrieveDeviceElements ( XMLParser parser  )  [private]

return the devices from from the initialization system (instance file)

Definition at line 315 of file StoreManager.cpp.

References fesa::ElementXML::attributeList_, DEVICE_INSTANCE_TAG, fesa::XMLParser::extractElements(), FesaErrorLoadDeviceElements, fillElements(), and fesa::AttributeXML::value_.

Referenced by restore().

std::vector< DomainStoreElement * > * fesa::StoreManager::retrieveDomainStoreElements ( XMLParser parser  )  [private]

return the devices from from the initialization system (instance file)

Definition at line 367 of file StoreManager.cpp.

References fesa::ElementXML::attributeList_, DOMAIN_STORE_TAG, fesa::XMLParser::extractElements(), FesaErrorLoadDomainStoreElements, fillElements(), and fesa::AttributeXML::value_.

Referenced by restore().

GlobalDeviceElement * fesa::StoreManager::retrieveGlobalDeviceElement ( XMLParser parser  )  [private]

return the global device element from the persistency

Definition at line 274 of file StoreManager.cpp.

References fesa::XMLParser::extractAttribute(), fesa::XMLParser::extractElements(), fillElements(), GLOBAL_DEVICE_TAG, and fesa::AttributeXML::value_.

Referenced by restore().

void fesa::StoreManager::store ( PersistencyUnit pu  ) 
void fesa::StoreManager::storeFields ( XMLParser parser,
const std::vector< AbstractField * > &  fields,
std::string  dataStore 
) [private]

this method stores into the parser the fields passed by argument

Parameters:
fields to store
dataStore tag that represents the datastore that contains the fields

Definition at line 187 of file StoreManager.cpp.

References fesa::FieldElement::cyclesNamesCol_, fesa::XMLParser::endElement(), fesa::FieldElement::fieldExtraValuesCol_, fesa::FieldElement::fieldValuesCol_, fesa::XMLParser::startElement(), fesa::StringUtilities::toString(), fesa::XMLParser::writeAttribute(), and fesa::XMLParser::writeNewline().

Referenced by store().


Member Data Documentation

const std::string fesa::StoreManager::DEVICE_INSTANCE_TAG = "device-instance" [static, private]

Definition at line 88 of file StoreManager.h.

Referenced by retrieveDeviceElements(), and store().

const std::string fesa::StoreManager::DOMAIN_STORE_TAG = "domain-data" [static, private]

Definition at line 89 of file StoreManager.h.

Referenced by retrieveDomainStoreElements(), and store().

const std::string fesa::StoreManager::GLOBAL_DEVICE_TAG = "global-instance" [static, private]

Definition at line 87 of file StoreManager.h.

Referenced by retrieveGlobalDeviceElement(), and store().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1