API Guides > ConceptRT 3.x
XmlDataStoreDocument Class Reference

DataStore that acces to an XmlDocument. More...

Detailed Description

DataStore that acces to an XmlDocument.

+ Inheritance diagram for XmlDataStoreDocument:

Public Member Methods

 XmlDataStoreDocument (PCChar8 rootName="Root")
 Constructor. More...
 
 XmlDataStoreDocument (Stream &stream)
 Constructor. More...
 
 XmlDataStoreDocument (XmlBaseDocument &xmlDocument)
 Constructor. More...
 
bool OpenReadNode (PCChar8 nodeName, IMessageCollector *messages=NULL)
 Open a node for reading. More...
 
void OpenWriteNode (PCChar8 nodeName)
 Open a node for writing. More...
 
void CloseNode (PCChar8 nodeName)
 Close the opened node. More...
 
bool OpenReadTextNode (PCChar8 nodeName, IMessageCollector *messages=NULL)
 Open a node for reading in text mode. More...
 
void OpenWriteTextNode (PCChar8 nodeName)
 Open a node for writing in text mode. More...
 
virtual TextReaderNodeGetTextReaderNode ()
 Get the textReaderNode after openning a node for reading in text mode. More...
 
TextWriterNodeGetTextWriterNode ()
 Get the textWriterNode after openning a node for writing in text mode. More...
 
void CloseTextNode (PCChar8 nodeName)
 Close a text node. More...
 
void ReadValue (PCChar8 valueName, BaseStaticString &value, PCChar8 defaultValue="", IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, IStringConvertible &value, const IStringConvertible *defaultValue=NULL, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, bool &value, const bool &defaultValue=false, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, Int16 &value, const Int16 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, UInt16 &value, const UInt16 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, Int32 &value, const Int32 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, UInt32 &value, const UInt32 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, Int64 &value, const Int64 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, UInt64 &value, const UInt64 &defaultValue=0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, Float32 &value, const Float32 &defaultValue=0.0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, Float64 &value, const Float64 &defaultValue=0.0, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void ReadValue (PCChar8 valueName, ISerializable &value, IMessageCollector *messages=NULL)
 Reads a value. More...
 
void WriteValue (PCChar8 valueName, PCChar8 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, const IStringConvertible &value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, Int16 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, UInt16 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, Int32 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, UInt32 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, Int64 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, UInt64 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, bool value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, Float64 value)
 Writes a value. More...
 
void WriteValue (PCChar8 valueName, const ISerializable &value)
 Writes a value. More...
 
void Save (Stream &stream)
 Save the content of the dataStore to a stream More...
 

Constructor & Destructor Documentation

XmlDataStoreDocument ( PCChar8  rootName = "Root")

Constructor.

Parameters
rootName[in] (optional) The xml root node name. Default = "Root"

Constructor.

Parameters
streamThe stream source where to load the XmlDataStoreDocument.

Constructor.

Parameters
xmlDocumentThe xmlDocument source where to load the XmlDataStoreDocument.

Methods Documentation

void CloseNode ( PCChar8  nodeName)
virtual

Close the opened node.

Parameters
nodeNameThe node name to close.
Warning
Call order dependence : Must be called after OpenReadNode() or OpenWriteNode().
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void CloseTextNode ( PCChar8  nodeName)
virtual

Close a text node.

Parameters
nodeNameThe node name to close.
Warning
Call order dependence : Must be called after OpenReadTextNode() or OpenWriteTextNode().
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

virtual TextReaderNode& GetTextReaderNode ( )
virtual

Get the textReaderNode after openning a node for reading in text mode.

Returns
the TextReaderNode. TextReaderNode should be disposed after usage !
Warning
Call order dependence : OpenReadTextNode() must be called before.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

TextWriterNode& GetTextWriterNode ( )
virtual

Get the textWriterNode after openning a node for writing in text mode.

Returns
the TextWriterNode. TextWriterNode should be disposed after usage !
Warning
Call order dependence : OpenWriteTextNode() must be called before.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

bool OpenReadNode ( PCChar8  nodeName,
IMessageCollector messages = NULL 
)
virtual

Open a node for reading.

Parameters
nodeNameThe node name to read.
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Returns
true if it succeeds, false if it fails.
Warning
Call order dependence : Must call CloseNode() at the end of opperation.

Implements IDataStore.

bool OpenReadTextNode ( PCChar8  nodeName,
IMessageCollector messages = NULL 
)
virtual

Open a node for reading in text mode.

Parameters
nodeNameThe node name to read.
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Returns
true if it succeeds, false if it fails.
Warning
Call order dependence : CloseTextNode() must be called after this opening.

Implements IDataStore.

void OpenWriteNode ( PCChar8  nodeName)
virtual

Open a node for writing.

Parameters
nodeNameThe node name to write.
Warning
Call order dependence : Must call CloseNode() at the end of opperation.

Implements IDataStore.

void OpenWriteTextNode ( PCChar8  nodeName)
virtual

Open a node for writing in text mode.

Parameters
nodeNameThe node name to write.
Warning
Call order dependence : CloseTextNode() must be called after this opening.

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
BaseStaticString value,
PCChar8  defaultValue = "",
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = ""
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
IStringConvertible value,
const IStringConvertible defaultValue = NULL,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = NULL
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
bool &  value,
const bool &  defaultValue = false,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = false
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
Int16 value,
const Int16 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
UInt16 value,
const UInt16 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
Int32 value,
const Int32 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
UInt32 value,
const UInt32 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
Int64 value,
const Int64 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
UInt64 value,
const UInt64 defaultValue = 0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
Float32 value,
const Float32 defaultValue = 0.0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
Float64 value,
const Float64 defaultValue = 0.0,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
defaultValue(optional) The default value. Default = 0
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void ReadValue ( PCChar8  valueName,
ISerializable value,
IMessageCollector messages = NULL 
)
virtual

Reads a value.

Parameters
valueNameThe valueName name.
value[in,out] The value.
messages[in,out] (optional) The messageCollector to collect warning or error messages. Default = NULL.
Warning
Call order dependence : OpenReadNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void Save ( Stream stream)

Save the content of the dataStore to a stream

Parameters
streamThe stream where to save the XmlDataStoreDocument.
void WriteValue ( PCChar8  valueName,
PCChar8  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
const IStringConvertible value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
Int16  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
UInt16  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
Int32  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
UInt32  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
Int64  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
UInt64  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
bool  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
Float64  value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.

void WriteValue ( PCChar8  valueName,
const ISerializable value 
)
virtual

Writes a value.

Parameters
valueNameThe valueName.
valueThe value.
Warning
Call order dependence : OpenWriteNode() must be called first.
RT Exceptions:
RT_ERROR_BAD_CALL_ORDER

Implements IDataStore.