ApparatusFramework::ApXML Class Reference
[Pattern Services]

#include <PatternServices/current/include/ApXML.h>

List of all members.

Public Member Functions

 ApXML (const char *fileName)
 ~ApXML ()
void initialize ()
bool getInt32Value (int32 &value, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool setInt32Value (int32 value, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool getStringValue (char *buffer, int16 bufferSize, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool setStringValue (const char *buffer, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool getMinMaxRangeValues (int32 &minValue, int32 &maxValue, char *valueRange, int16 valueRangeSize, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool getAction (char *value, int16 valueSize, ApXmlElement *pXmlElement, uint8 xmlElementCount)
bool getMinMaxUnit (char *minValue, char *maxValue, int16 valueSize, char *unit, int unitSize, ApXmlElement *pXmlElement, uint8 xmlElementCount)

Detailed Description

This class implements the configuration store. Values from a XML config file can be read and write through this class.

Definition at line 55 of file ApXML.h.


Constructor & Destructor Documentation

ApparatusFramework::ApXML::ApXML ( const char *  fileName  ) 

constructors, destructors Constructs a new ApXML object.

Parameters:
fileName Name of the XML file holding the parameters.
ApparatusFramework::ApXML::~ApXML (  ) 

Destroys the object and releases all the associated resources.


Member Function Documentation

bool ApparatusFramework::ApXML::getAction ( char *  value,
int16  valueSize,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Get action.

Parameters:
value The action is copied into this buffer.
valueSize Size of the action buffer.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found, false otherwise.
bool ApparatusFramework::ApXML::getInt32Value ( int32 value,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Get int32 value from config file.

Parameters:
value The parameter is returned in this reference.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found, false otherwise.
bool ApparatusFramework::ApXML::getMinMaxRangeValues ( int32 minValue,
int32 maxValue,
char *  valueRange,
int16  valueRangeSize,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Get min, max and value range

Parameters:
minValue The lower limit is returned in this reference.
maxValue The upper limit is returned in this reference.
valueRange The value range is copied into this buffer.
valueRangeSize Size of the value range buffer.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found, false otherwise.
bool ApparatusFramework::ApXML::getMinMaxUnit ( char *  minValue,
char *  maxValue,
int16  valueSize,
char *  unit,
int  unitSize,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Get min, max and unit of a parameter.

Parameters:
minValue The lower limit is copied into this buffer.
maxValue The upper limit is copied into this buffer.
valueSize Size of the min/max buffers (need to be the same).
unit The parameter unit is copied into this buffer.
unitSize Size of the parameter unit buffer.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found, false otherwise.
bool ApparatusFramework::ApXML::getStringValue ( char *  buffer,
int16  bufferSize,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Get char* value from config file.

Parameters:
buffer The parameter is copied into this buffer.
bufferSize Size of the buffer.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found, false otherwise.
void ApparatusFramework::ApXML::initialize (  ) 

initialize (Factory pattern)

bool ApparatusFramework::ApXML::setInt32Value ( int32  value,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Set int32 value. Please note that there is no range check done.

Parameters:
value The value to be stored.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found and set, false otherwise.
bool ApparatusFramework::ApXML::setStringValue ( const char *  buffer,
ApXmlElement pXmlElement,
uint8  xmlElementCount 
)

Set char* value. Please note that there is no range check done.

Parameters:
buffer Buffer containing the value to be stored.
pXmlElement An array of XML element specifier, representing the XML path.
xmlElementCount The number of elements in pXmlElement.
Returns:
bool True if the specified element could be found and set, false otherwise.
© 2004-2010 bbv Software Services AG / Apparatus Services