XMLDataModelReader Class Reference

This class is a concrete implementation of the IDataModelReader abstract class. This class is responsible for reading a data model from an XML File. More...

Inherits IDataModelReader, and ExpatEvtHandler.

Inheritance diagram for XMLDataModelReader:

Inheritance graph
[legend]
Collaboration diagram for XMLDataModelReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XMLDataModelReader (IDataModel::Pointer dataModel, const std::string &fileName)
virtual ~XMLDataModelReader ()
int32 readDataModel (int32 NOT_USED)
 Reads the Data Model from an XML File/.
void OnStartElement (const XML_Char *name, const XML_Char **attrs)
void OnEndElement (const XML_Char *name)
void OnCharacterData (const XML_Char *data, int32 len)
int32 getParseError ()
 Returns the current parser error.
template<typename T>
int32 readPrimitiveAttribute (const std::vector< uint64 > &dims)
 Parses a string from the XML file that is data encoded as space delimited values.

Private Member Functions

 XMLDataModelReader (const XMLDataModelReader &)
void operator= (const XMLDataModelReader &)
void onData_DimensionsStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Data_Dimensions' tag is found.
void onData_ModelStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Data_Model' tag is found.
void onData_RecordsStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Data_Records' tag is found.
void onData_RootStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Data_Root' tag is found.
void onDimensionStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Dimension' tag is found.
void onFile_RootStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'File_Root' tag is found.
void onMeta_DataStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Meta_Data' tag is found.
void onRequired_MDStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Required_MD' tag is found.
void onSignalStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Signal' tag is found.
void onSignal_GroupStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'Signal_Group' tag is found.
void onUserDefined_MDStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'UserDefined_MD' tag is found.
void onUserMetaDataStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'UserMetaData' tag is found.
void onSupportFilesStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'UserMetaData' tag is found.
void onSupportFileStartTag (const XML_Char *name, const XML_Char **attrs)
 Method that will be called when the 'UserMetaData' tag is found.
void onData_DimensionsEndTag (const XML_Char *name)
 Method that will be called when the 'Data_Dimensions' tag is Exited.
void onData_ModelEndTag (const XML_Char *name)
 Method that will be called when the 'Data_Model' tag is Exited.
void onData_RecordsEndTag (const XML_Char *name)
 Method that will be called when the 'Data_Records' tag is Exited.
void onData_RootEndTag (const XML_Char *name)
 Method that will be called when the 'Data_Root' tag is Exited.
void onDimensionEndTag (const XML_Char *name)
 Method that will be called when the 'Dimension' tag is Exited.
void onFile_RootEndTag (const XML_Char *name)
 Method that will be called when the 'File_Root' tag is Exited.
void onMeta_DataEndTag (const XML_Char *name)
 Method that will be called when the 'Meta_Data' tag is Exited.
void onRequired_MDEndTag (const XML_Char *name)
 Method that will be called when the 'Required_MD' tag is Exited.
void onSignalEndTag (const XML_Char *name)
 Method that will be called when the 'Signal' tag is Exited.
void onSignal_GroupEndTag (const XML_Char *name)
 Method that will be called when the 'Signal_Group' tag is Exited.
void onUserDefined_MDEndTag (const XML_Char *name)
 Method that will be called when the 'UserDefined_MD' tag is Exited.
void onUserMetaDataEndTag (const XML_Char *name)
 Method that will be called when the 'UserMetaData' tag is Exited.
void onSupportFilesEndTag (const XML_Char *name)
 Method that will be called when the 'Support_Files' tag is Exited.
void onSupportFileEndTag (const XML_Char *name)
 Method that will be called when the 'Support_File' tag is Exited.

Private Attributes

IDataModel::Pointer _dataModel
const std::string _fileName
int32 _xmlParseError
IDataRecord::Pointer _currentParentRecord
std::string _userAttributeData
bool _parseData
std::string _userMDKey
std::string _userMDDims
std::string _userMDType
ExpatParser_parser
int32 _indent

Detailed Description

This class is a concrete implementation of the IDataModelReader abstract class. This class is responsible for reading a data model from an XML File.

Author:
Mike Jackson
Date:
June 2007
Version:
Revision
1.2


Constructor & Destructor Documentation

XMLDataModelReader::XMLDataModelReader ( IDataModel::Pointer  dataModel,
const std::string &  fileName 
)

XMLDataModelReader::~XMLDataModelReader (  )  [virtual]

XMLDataModelReader::XMLDataModelReader ( const XMLDataModelReader  )  [private]


Member Function Documentation

int32 XMLDataModelReader::readDataModel ( int32  NOT_USED  )  [virtual]

Reads the Data Model from an XML File/.

Parameters:
NOT_USED 
Returns:
Error: Negative is error Condition

Implements IDataModelReader.

void XMLDataModelReader::OnStartElement ( const XML_Char *  name,
const XML_Char **  attrs 
) [virtual]

Reimplemented from ExpatEvtHandler.

void XMLDataModelReader::OnEndElement ( const XML_Char *  name  )  [virtual]

Reimplemented from ExpatEvtHandler.

void XMLDataModelReader::OnCharacterData ( const XML_Char *  data,
int32  len 
) [virtual]

Reimplemented from ExpatEvtHandler.

int32 XMLDataModelReader::getParseError (  ) 

Returns the current parser error.

template<typename T>
int32 XMLDataModelReader::readPrimitiveAttribute ( const std::vector< uint64 > &  dims  )  [inline]

Parses a string from the XML file that is data encoded as space delimited values.

Parameters:
dims The dimensions of the data set
Returns:
Error Code. Zero or positive is success.

void XMLDataModelReader::operator= ( const XMLDataModelReader  )  [private]

void XMLDataModelReader::onData_DimensionsStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Data_Dimensions' tag is found.

void XMLDataModelReader::onData_ModelStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Data_Model' tag is found.

void XMLDataModelReader::onData_RecordsStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Data_Records' tag is found.

void XMLDataModelReader::onData_RootStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Data_Root' tag is found.

void XMLDataModelReader::onDimensionStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Dimension' tag is found.

void XMLDataModelReader::onFile_RootStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'File_Root' tag is found.

void XMLDataModelReader::onMeta_DataStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Meta_Data' tag is found.

void XMLDataModelReader::onRequired_MDStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Required_MD' tag is found.

void XMLDataModelReader::onSignalStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Signal' tag is found.

void XMLDataModelReader::onSignal_GroupStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'Signal_Group' tag is found.

void XMLDataModelReader::onUserDefined_MDStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'UserDefined_MD' tag is found.

void XMLDataModelReader::onUserMetaDataStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'UserMetaData' tag is found.

void XMLDataModelReader::onSupportFilesStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'UserMetaData' tag is found.

void XMLDataModelReader::onSupportFileStartTag ( const XML_Char *  name,
const XML_Char **  attrs 
) [private]

Method that will be called when the 'UserMetaData' tag is found.

void XMLDataModelReader::onData_DimensionsEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Data_Dimensions' tag is Exited.

void XMLDataModelReader::onData_ModelEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Data_Model' tag is Exited.

void XMLDataModelReader::onData_RecordsEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Data_Records' tag is Exited.

void XMLDataModelReader::onData_RootEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Data_Root' tag is Exited.

void XMLDataModelReader::onDimensionEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Dimension' tag is Exited.

void XMLDataModelReader::onFile_RootEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'File_Root' tag is Exited.

void XMLDataModelReader::onMeta_DataEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Meta_Data' tag is Exited.

void XMLDataModelReader::onRequired_MDEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Required_MD' tag is Exited.

void XMLDataModelReader::onSignalEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Signal' tag is Exited.

void XMLDataModelReader::onSignal_GroupEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Signal_Group' tag is Exited.

void XMLDataModelReader::onUserDefined_MDEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'UserDefined_MD' tag is Exited.

void XMLDataModelReader::onUserMetaDataEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'UserMetaData' tag is Exited.

void XMLDataModelReader::onSupportFilesEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Support_Files' tag is Exited.

void XMLDataModelReader::onSupportFileEndTag ( const XML_Char *  name  )  [private]

Method that will be called when the 'Support_File' tag is Exited.


Member Data Documentation

IDataModel::Pointer XMLDataModelReader::_dataModel [private]

const std::string XMLDataModelReader::_fileName [private]

int32 XMLDataModelReader::_xmlParseError [private]

IDataRecord::Pointer XMLDataModelReader::_currentParentRecord [private]

std::string XMLDataModelReader::_userAttributeData [private]

bool XMLDataModelReader::_parseData [private]

std::string XMLDataModelReader::_userMDKey [private]

std::string XMLDataModelReader::_userMDDims [private]

std::string XMLDataModelReader::_userMDType [private]

ExpatParser* XMLDataModelReader::_parser [private]

int32 XMLDataModelReader::_indent [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:16 2009 for MXADataModel by  doxygen 1.5.2