IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::DataStore Class Reference

XML-based data class. Doc container is accessed through the Doc property, which is of class XmlData, an extension of XmlDocument. More...

Collaboration diagram for IG::Lib::DataStore:

List of all members.

Public Member Functions

void Load (string filepath, bool forceoverwrite)
 Loads data store'result XML Doc from a file.
void Load (string filepath)
 Loads data store'result XML Doc from a file. An exception is thrown if the there is modified and unsaved data.
void LoadFromString (string str, bool loadifnotnull)
 Loads data store'result XML Doc from an XML string.
void LoadFromString (string filename)
 Loads data store'result XML Doc from an XML string. An exception is thrown if the there is modified and unsaved data.
void Load (Stream inStream, bool forceoverwrite)
 Loads data store'result XML Doc from an input stream.
void Load (Stream inStream)
 Loads data store'result XML Doc from an input stream. An exception is thrown if the there is modified and unsaved data.
void Load (TextReader txtReader, bool forceoverwrite)
 Loads data store'result XML Doc from atext reader.
void Load (TextReader txtReader)
 Loads data store'result XML Doc from atext reader. An exception is thrown if the there is modified and unsaved data.
XmlNode GetRootNode ()
 Returns the root node of XML data.
XmlNodeList GetNodes (string xpath)
 Returns a list of all _gridCoordinates of XML data that satisfy the specified XPath expression.
XmlNode GetNode (string xpath)
 Returns the first node in the current document that satisfy the specified XPath expression.
XmlElement[] GetElements (string xpath)
 Returns an array of all element _gridCoordinates in the current XML document that satisfiy the specified XPath expression.
XmlElement GetElement (string xpath)
 Returns the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Properties

virtual XmlData Doc [get, set]
 Gets or sets the class' data storage. This is normally not accesst directly, but through s methods.
bool DataUnsaved [get, set]
 Gets the indicator of whether data contents have been changed and not saved since loaded.

Private Attributes

XmlData _Data = null
bool _DataChanged = false

Detailed Description

XML-based data class. Doc container is accessed through the Doc property, which is of class XmlData, an extension of XmlDocument.


Member Function Documentation

void IG::Lib::DataStore::Load ( string  filepath,
bool  forceoverwrite 
) [inline]

Loads data store'result XML Doc from a file.

Parameters:
filepathName of the file from which XML is loaded.
forceoverwriteIf true then the file is loaded also if the data has been modified but not saved.
void IG::Lib::DataStore::Load ( string  filepath) [inline]

Loads data store'result XML Doc from a file. An exception is thrown if the there is modified and unsaved data.

Parameters:
filepathName of the file from which XML is loaded.
void IG::Lib::DataStore::LoadFromString ( string  str,
bool  loadifnotnull 
) [inline]

Loads data store'result XML Doc from an XML string.

Parameters:
strXML string from which XML is loaded.
forceoverwriteIf true then the file is loaded also if the data has been modified but not saved.
void IG::Lib::DataStore::LoadFromString ( string  filename) [inline]

Loads data store'result XML Doc from an XML string. An exception is thrown if the there is modified and unsaved data.

Parameters:
strXML string from which XML is loaded.
void IG::Lib::DataStore::Load ( Stream  inStream,
bool  forceoverwrite 
) [inline]

Loads data store'result XML Doc from an input stream.

Parameters:
inStreamInput stream from which XML is loaded.
forceoverwriteIf true then the file is loaded also if the data has been modified but not saved.
void IG::Lib::DataStore::Load ( Stream  inStream) [inline]

Loads data store'result XML Doc from an input stream. An exception is thrown if the there is modified and unsaved data.

Parameters:
inStreamInput stream from which XML is loaded.
void IG::Lib::DataStore::Load ( TextReader  txtReader,
bool  forceoverwrite 
) [inline]

Loads data store'result XML Doc from atext reader.

Parameters:
txtReaderText reader from which XML is loaded.
forceoverwriteIf true then the file is loaded also if the data has been modified but not saved.
void IG::Lib::DataStore::Load ( TextReader  txtReader) [inline]

Loads data store'result XML Doc from atext reader. An exception is thrown if the there is modified and unsaved data.

Parameters:
txtReaderText reader from which XML is loaded.
XmlNode IG::Lib::DataStore::GetRootNode ( ) [inline]

Returns the root node of XML data.

Returns:
The root node of the document.
XmlNodeList IG::Lib::DataStore::GetNodes ( string  xpath) [inline]

Returns a list of all _gridCoordinates of XML data that satisfy the specified XPath expression.

Parameters:
xpathThe XPath expression used for selection of _gridCoordinates.
Returns:
List of all _gridCoordinates that satisfy the XPath expression.
XmlNode IG::Lib::DataStore::GetNode ( string  xpath) [inline]

Returns the first node in the current document that satisfy the specified XPath expression.

Parameters:
xpathThe XPath expression used for selection of the node.
Returns:
The first node in the sub-tree that satisfies the XPath expression.
XmlElement [] IG::Lib::DataStore::GetElements ( string  xpath) [inline]

Returns an array of all element _gridCoordinates in the current XML document that satisfiy the specified XPath expression.

Parameters:
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
XmlElement IG::Lib::DataStore::GetElement ( string  xpath) [inline]

Returns the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.

Member Data Documentation

bool IG::Lib::DataStore::_DataChanged = false [private]

Property Documentation

virtual XmlData IG::Lib::DataStore::Doc [get, set]

Gets or sets the class' data storage. This is normally not accesst directly, but through s methods.

bool IG::Lib::DataStore::DataUnsaved [get, set]

Gets the indicator of whether data contents have been changed and not saved since loaded.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events