#include <Configuration.h>
Inheritance diagram for Configuration:
Public Member Functions | |
| void | add (ConfigObject *l) |
| vector< ConfigObject * > & | getVector () |
| int | size () |
| void | clear () |
| virtual void | download (int maj, int min)=0 |
| virtual Version * | upload (string n) const =0 |
| virtual Version * | upload (int maj, string n) const =0 |
| virtual Version * | upload (int maj, int min) const =0 |
| virtual void | addFromXML (string fileName)=0 |
| void | setModified (bool b) |
| bool | isModified () |
| bool | minorUpdateNeeded () |
| vector< string > | toXML () |
| void | saveToXML (string fileName) |
Static Public Member Functions | |
| static vector< Version * > | getVersions (string objectName) throw (ILCException::Exception) |
| static Version * | getVersion (string objectName, int majorId, int minorId) throw (ILCException::Exception) |
| static bool | versionExist (string objectName, string n) throw (ILCException::Exception) |
Protected Member Functions | |
| Version * | createMajorVersion (string n) const throw (ILCException::Exception) |
| Version * | createMinorVersion (int m, string n) const throw (ILCException::Exception) |
| vector< map< string, string > > | parse (string fileName) throw (ILCException::Exception) |
Static Protected Member Functions | |
| static vector< Version * > | getUnusedVersions (string object_name) throw (ILCException::Exception) |
Protected Attributes | |
| string | objectName |
| vector< ConfigObject * > | list |
| bool | modified |
| void Configuration::add | ( | ConfigObject * | l | ) |
Add an object to the configuration
| l | A pointer to the object to add |
| virtual void Configuration::addFromXML | ( | string | fileName | ) | [pure virtual] |
Parse a XML file and add the objects to the configuration
Implemented in AsicConfiguration, DccConfiguration, DifConfiguration, and LdaConfiguration.
| void Configuration::clear | ( | ) |
Delete all contained objects and clear the vector of objects
| virtual void Configuration::download | ( | int | maj, | |
| int | min | |||
| ) | [pure virtual] |
Load the given version
| maj | The majorVersionID | |
| min | The MinorVersionID |
Implemented in AsicConfiguration, DccConfiguration, DifConfiguration, and LdaConfiguration.
| vector< Version * > Configuration::getUnusedVersions | ( | string | object_name | ) | throw (ILCException::Exception) [static, protected] |
Get the list of unused versions
| object_name | The name of the configured object |
| vector< ConfigObject * > & Configuration::getVector | ( | ) |
Get the vector actualy containing the configurations
| Version * Configuration::getVersion | ( | string | objectName, | |
| int | majorId, | |||
| int | minorId | |||
| ) | throw (ILCException::Exception) [static] |
Get an existing versions
| objectName | Name of the object for which you want the existing version (LDA, DCC, DIF, ASIC, ...) | |
| majorId | The version major ID | |
| minorId | The version minor ID |
| vector< Version * > Configuration::getVersions | ( | string | objectName | ) | throw (ILCException::Exception) [static] |
Get all existing versions
| objectName | Name of the object for which you want the existing versions (can be LDA, DCC, DIF, ...) |
| bool Configuration::isModified | ( | ) |
Check the modified flag
| bool Configuration::minorUpdateNeeded | ( | ) |
Check if one of the objects was flagged as modified -> the user is preparing a minor update
| vector< map< string, string > > Configuration::parse | ( | string | fileName | ) | throw (ILCException::Exception) [protected] |
Parse a XML file to create a configuration
| void Configuration::saveToXML | ( | string | fileName | ) |
Export the configuration to a XML file
| fileName | The name of the file to write the configuration. If the file exists, the configuration is appended to the end. If the file does not exist, it is created. |
| void Configuration::setModified | ( | bool | b | ) |
Flag the configuration as modified -> a new version configuration will be created in case of recursive upload of the containing state
| b | True if the configuration was modified |
| int Configuration::size | ( | ) |
Return the number of objects in the configuration
| vector< string > Configuration::toXML | ( | ) |
Get a XML version of the configuration
| virtual Version* Configuration::upload | ( | int | maj, | |
| int | min | |||
| ) | const [pure virtual] |
NOT IMPLEMENTED YET!! Update an existing configuration version with the current configuration. The version must not be locked!
Implemented in AsicConfiguration, DccConfiguration, DifConfiguration, and LdaConfiguration.
| virtual Version* Configuration::upload | ( | int | maj, | |
| string | n | |||
| ) | const [pure virtual] |
Create a new Minor version with the current configuration.
| maj | The ID of the Major version in which you want to create a minor version | |
| n | The name of the new version |
Implemented in AsicConfiguration, DccConfiguration, DifConfiguration, and LdaConfiguration.
| virtual Version* Configuration::upload | ( | string | n | ) | const [pure virtual] |
Create a new Major version with the current configuration.
| n | The name of the new version |
Implemented in AsicConfiguration, DccConfiguration, DifConfiguration, and LdaConfiguration.
| bool Configuration::versionExist | ( | string | objectName, | |
| string | n | |||
| ) | throw (ILCException::Exception) [static] |
Check if the version name is alreasy used
| objectName | Name of the object for which you want the existing version (LDA, DCC, DIF, ASIC, ...) | |
| n | The name of the version |
1.4.7