IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
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:

Public Member Functions

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

Properties

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

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

XmlData IG.Lib.DataStore._Data =null
private
bool IG.Lib.DataStore._DataChanged = false
private

Property Documentation

virtual XmlData IG.Lib.DataStore.Doc
getset

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

bool IG.Lib.DataStore.DataUnsaved
getprotected 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: