API Guides > ConceptRT 3.x
ConceptDataStore Class Reference

DataStore needed to de-serialize polymorphous model. More...

Detailed Description

DataStore needed to de-serialize polymorphous model.

Examples:
Machine/main.cpp.
+ Inheritance diagram for ConceptDataStore:

Public Member Methods

 ConceptDataStore (IDataStore &dataStore)
 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...
 
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, 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 WriteValue (PCChar8 valueName, const IStringConvertible &value)
 Writes a value. More...
 
void SetFactories (BaseConceptFactories &factories)
 Sets the factories needed to de-serialize the object model. More...
 
BaseConceptFactoryFindFactory (const PCChar8 factoryId)
 Searches for a factory in the working list of factories. More...
 

Constructor & Destructor Documentation

ConceptDataStore ( IDataStore dataStore)

Constructor.

Parameters
dataStoreA datastore.

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.

BaseConceptFactory* FindFactory ( const PCChar8  factoryId)

Searches for a factory in the working list of factories.

Parameters
factoryIdIdentifier for the factory.
Returns
null if it fails, else the found factory.
Version
3.3 or greater Return null is not factories had been set with SetFactories(). Earlier version had unexpected behavior if no factories set.
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.

Examples:
Machine/main.cpp.
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 SetFactories ( BaseConceptFactories factories)

Sets the factories needed to de-serialize the object model.

Parameters
factories[in,out] The factories.
Examples:
Machine/main.cpp.
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,
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.

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.