VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

Instances of DtXmlFedReader are used to read a FED file, and fill in a DtFedTarget with the information read. More...

+ Inheritance diagram for DtXmlFedReader:
+ Collaboration diagram for DtXmlFedReader:

Public Member Functions

 DtXmlFedReader ()
 Constructor.
virtual ~DtXmlFedReader ()
 Destructor.
virtual DtFedReadStatus readFedFilePtr (FILE *filePointer, DtFedTarget *fedTarget, DtFilename fileName, bool strictCheckingEnabled=false, bool useDTD=false, bool dontParseSwitches=false)
 Read the FED file fedFileName, setting values to fedTarget.
- Public Member Functions inherited from DtFedReader
 DtFedReader ()
 Constructor.
virtual ~DtFedReader ()
 Destructor.
virtual DtFedReadStatus readFed (const char *fedFileName, DtFedTarget *fedTarget, bool strictCheckingEnabled=false, bool useDTD=false, bool dontParseSwitches=false)
 Read the FED file fedFileName, setting values to fedTarget.
virtual FILE * openFedFileWithErrCheck (const char *fileName, bool isBinary=false)
 get the a file handle to the FED File for reading in text or binary mode
virtual void setStrictChecking (bool enable)
 Set/Get status of strict checking.
virtual bool strictChecking () const
virtual void setExpectedFomType (DtFomType fomType)
 Set/Get expected FOM type.
virtual DtFomType expectedFomType () const
virtual DtFomType lastFomType () const
 Returns the FOM type of the last FOM read.
virtual const DtStringlastError () const
 Get the last error.
char * takeCurrFddData ()

Protected Member Functions

virtual bool dtdValidate (xmlDoc *pDoc, const char *dtdFile)
 Validate the file against the given DTD.
virtual DtFedReadStatus openFile (const char *fedFileName, xmlDoc **newXmlDocTree)
 open FED file and create a new XML Document Tree object
virtual xmlNodegetNodeByName (xmlNode *currentNode, const xmlChar *nodeName)
 get the specified node
virtual DtFedReadStatus processFed (xmlNode *fedObj)
 process the FED directive
virtual DtFedReadStatus parseTransportationsList (xmlNode *currentNode)
 process the transportations directive
virtual DtFedReadStatus processObjects (xmlNode *currentNode)
 process the Objects directive
virtual DtFedReadStatus processInteractions (xmlNode *currentNode)
 process the Interactions directive
virtual DtFedReadStatus parseObjectTree (xmlNode *currentNode, const DtString &parentName)
 process the list object of classes
virtual DtFedReadStatus parseAttribute (xmlNode *currentNode, const DtString &parentName)
 process an attribute of an object class
virtual DtFedReadStatus parseAttributeDimensions (xmlNode *currentNode, DtString const &objectClass, DtString const &attribute)
 process attribute dimension associations
virtual DtFedReadStatus parseInteractionTree (xmlNode *currentNode, const DtString &parentName)
 process the list of interaction classes
virtual DtFedReadStatus parseInteractionDimensions (xmlNode *currentNode, DtString const &interactionClass)
 process attribute dimension associations
virtual DtFedReadStatus parseDimensionList (xmlNode *currentNode)
 process the list of dimensions
virtual DtFedReadStatus parseDimension (xmlNode *currentNode)
 process a dimension
virtual DtFedReadStatus parseSwitches (xmlNode *currentNode)
 process switches
virtual DtFedReadStatus parseParameter (xmlNode *currentNode, const DtString &parentName)
 process a parameter of an interaction class
virtual DtFedReadStatus parseTransportationTree (xmlNode *currentNode)
 process the list of transportation classes
virtual DtFedReadStatus parseDataTypeTree (xmlNode *currentNode)
 process the list of datatype classes
virtual DtFedReadStatus parseNotesTree (xmlNode *currentNode)
 process the list of notes classes
virtual DtFedReadStatus parseTagsTree (xmlNode *currentNode)
 process the list of user defined tags.
virtual DtFedReadStatus parseBasicDataTypesTree (xmlNode *currentNode)
 process the list of basic data representations
virtual DtFedReadStatus parseSimpleDataTypesTree (xmlNode *currentNode)
 process the list of simple data types
virtual DtFedReadStatus parseArrayDataTypesTree (xmlNode *currentNode)
 process the list of array data types
virtual DtFedReadStatus parseEnumeratedDataTypesTree (xmlNode *currentNode)
 process the list of enumerated data types
virtual DtFedReadStatus parseFixedRecordDataTypesTree (xmlNode *currentNode)
 process the list of fixed record data types
virtual DtFedReadStatus parseVariantRecordDataTypesTree (xmlNode *currentNode)
 process the list of variant record data types
virtual void appendNodeProperties (xmlNode *currentNode, DtString &output) const
 Appends the list of properties attached to an XML node to the given string.
virtual void appendNodeContent (xmlNode *node, DtString &output) const
 Appends the name and content of the given node to the given string.
virtual bool isBlankText (xmlNode *node) const
 Return true if the node is blank text (space, tab, newline)
virtual const xmlCharpropertyByName (xmlNode *node, const xmlChar *name)
 Return the data for the specified property of the given node.
virtual bool getPropertyByName (xmlNode *node, const xmlChar *name, DtString &propertyContent)
 Fill in a string with the data for the specified property of the given node (empty string if property not found) Return true if property is found.
virtual DtFedReadStatus getTransportType (xmlNode *currentNode, DtTransportType &transportType)
 get the data for the Transportation attribute of the current node
virtual DtFedReadStatus getOrderType (xmlNode *currentNode, DtOrderType &orderType)
 get the data for the Order attribute of the current node
bool convertStringToULong (std::string numericString, unsigned long &value)
template<typename operandType >
void clipPrefix (std::string &valueSpec, operandType c)
- Protected Member Functions inherited from DtFedReader
void appendErrorLine (xmlNode *node, DtString &output) const

Protected Attributes

DtFedTargetmyFedTarget
- Protected Attributes inherited from DtFedReader
DtFedTargetmyFedTarget
DtFedReadermyChildReader
bool myStrictChecking
bool myDontParseSwitchTable
DtFomType myExpectedFomType
 When set, the FOM must conform to this type.
DtFomType myLastFomType
 The type of FOM format that was last read.
DtString myLastError
 Description of last encountered error.

Private Member Functions

 DtXmlFedReader (const DtXmlFedReader &)
 Copy constructor and Assignment operator - Unimplemented.
DtXmlFedReaderoperator= (const DtXmlFedReader &)

Additional Inherited Members

- Static Public Member Functions inherited from DtFedReader
static DtFomType checkFomType (const char *fedFileName, void *fedFilePtr)
 Get the FOM Type.
static FILE * openFedFile (const char *fileName, bool isBinary=false)
 Open file from name and return FILE*.
static bool readFileIntoBuffer (FILE *fileHandle, char **fileBuffer, unsigned int *fileSize)
 Read the file from the FILE* into the buffer.
- Public Attributes inherited from DtFedReader
char * myCurrFddBuffer
 Buffer containing the most recently read FDD file.
unsigned int myCurrFddBufferSize
 Size of the buffer for the most recently read FDD file.

Detailed Description

Instances of DtXmlFedReader are used to read a FED file, and fill in a DtFedTarget with the information read.

The FED file must be in the RTI 1516 XML file format

Constructor & Destructor Documentation

DtXmlFedReader::DtXmlFedReader ( )

Constructor.

virtual DtXmlFedReader::~DtXmlFedReader ( )
virtual

Destructor.

DtXmlFedReader::DtXmlFedReader ( const DtXmlFedReader )
private

Copy constructor and Assignment operator - Unimplemented.

Member Function Documentation

virtual void DtXmlFedReader::appendNodeContent ( xmlNode node,
DtString output 
) const
protectedvirtual

Appends the name and content of the given node to the given string.

virtual void DtXmlFedReader::appendNodeProperties ( xmlNode currentNode,
DtString output 
) const
protectedvirtual

Appends the list of properties attached to an XML node to the given string.

template<typename operandType >
void DtXmlFedReader::clipPrefix ( std::string &  valueSpec,
operandType  c 
)
protected
bool DtXmlFedReader::convertStringToULong ( std::string  numericString,
unsigned long &  value 
)
protected
virtual bool DtXmlFedReader::dtdValidate ( xmlDoc pDoc,
const char *  dtdFile 
)
protectedvirtual

Validate the file against the given DTD.

virtual xmlNode* DtXmlFedReader::getNodeByName ( xmlNode currentNode,
const xmlChar nodeName 
)
protectedvirtual

get the specified node

virtual DtFedReadStatus DtXmlFedReader::getOrderType ( xmlNode currentNode,
DtOrderType orderType 
)
protectedvirtual

get the data for the Order attribute of the current node

virtual bool DtXmlFedReader::getPropertyByName ( xmlNode node,
const xmlChar name,
DtString propertyContent 
)
protectedvirtual

Fill in a string with the data for the specified property of the given node (empty string if property not found) Return true if property is found.

virtual DtFedReadStatus DtXmlFedReader::getTransportType ( xmlNode currentNode,
DtTransportType transportType 
)
protectedvirtual

get the data for the Transportation attribute of the current node

virtual bool DtXmlFedReader::isBlankText ( xmlNode node) const
protectedvirtual

Return true if the node is blank text (space, tab, newline)

virtual DtFedReadStatus DtXmlFedReader::openFile ( const char *  fedFileName,
xmlDoc **  newXmlDocTree 
)
protectedvirtual

open FED file and create a new XML Document Tree object

DtXmlFedReader& DtXmlFedReader::operator= ( const DtXmlFedReader )
private
virtual DtFedReadStatus DtXmlFedReader::parseArrayDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of array data types

virtual DtFedReadStatus DtXmlFedReader::parseAttribute ( xmlNode currentNode,
const DtString parentName 
)
protectedvirtual

process an attribute of an object class

virtual DtFedReadStatus DtXmlFedReader::parseAttributeDimensions ( xmlNode currentNode,
DtString const &  objectClass,
DtString const &  attribute 
)
protectedvirtual

process attribute dimension associations

virtual DtFedReadStatus DtXmlFedReader::parseBasicDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of basic data representations

virtual DtFedReadStatus DtXmlFedReader::parseDataTypeTree ( xmlNode currentNode)
protectedvirtual

process the list of datatype classes

virtual DtFedReadStatus DtXmlFedReader::parseDimension ( xmlNode currentNode)
protectedvirtual

process a dimension

virtual DtFedReadStatus DtXmlFedReader::parseDimensionList ( xmlNode currentNode)
protectedvirtual

process the list of dimensions

virtual DtFedReadStatus DtXmlFedReader::parseEnumeratedDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of enumerated data types

virtual DtFedReadStatus DtXmlFedReader::parseFixedRecordDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of fixed record data types

virtual DtFedReadStatus DtXmlFedReader::parseInteractionDimensions ( xmlNode currentNode,
DtString const &  interactionClass 
)
protectedvirtual

process attribute dimension associations

virtual DtFedReadStatus DtXmlFedReader::parseInteractionTree ( xmlNode currentNode,
const DtString parentName 
)
protectedvirtual

process the list of interaction classes

virtual DtFedReadStatus DtXmlFedReader::parseNotesTree ( xmlNode currentNode)
protectedvirtual

process the list of notes classes

virtual DtFedReadStatus DtXmlFedReader::parseObjectTree ( xmlNode currentNode,
const DtString parentName 
)
protectedvirtual

process the list object of classes

virtual DtFedReadStatus DtXmlFedReader::parseParameter ( xmlNode currentNode,
const DtString parentName 
)
protectedvirtual

process a parameter of an interaction class

virtual DtFedReadStatus DtXmlFedReader::parseSimpleDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of simple data types

virtual DtFedReadStatus DtXmlFedReader::parseSwitches ( xmlNode currentNode)
protectedvirtual

process switches

virtual DtFedReadStatus DtXmlFedReader::parseTagsTree ( xmlNode currentNode)
protectedvirtual

process the list of user defined tags.

virtual DtFedReadStatus DtXmlFedReader::parseTransportationsList ( xmlNode currentNode)
protectedvirtual

process the transportations directive

virtual DtFedReadStatus DtXmlFedReader::parseTransportationTree ( xmlNode currentNode)
protectedvirtual

process the list of transportation classes

virtual DtFedReadStatus DtXmlFedReader::parseVariantRecordDataTypesTree ( xmlNode currentNode)
protectedvirtual

process the list of variant record data types

virtual DtFedReadStatus DtXmlFedReader::processFed ( xmlNode fedObj)
protectedvirtual

process the FED directive

virtual DtFedReadStatus DtXmlFedReader::processInteractions ( xmlNode currentNode)
protectedvirtual

process the Interactions directive

virtual DtFedReadStatus DtXmlFedReader::processObjects ( xmlNode currentNode)
protectedvirtual

process the Objects directive

virtual const xmlChar* DtXmlFedReader::propertyByName ( xmlNode node,
const xmlChar name 
)
protectedvirtual

Return the data for the specified property of the given node.

virtual DtFedReadStatus DtXmlFedReader::readFedFilePtr ( FILE *  filePointer,
DtFedTarget fedTarget,
DtFilename  fileName,
bool  strictCheckingEnabled = false,
bool  useDTD = false,
bool  dontParseSwitches = false 
)
virtual

Read the FED file fedFileName, setting values to fedTarget.

Note if fedTarget is NULL the fedfile will be read and verified only.

Implements DtFedReader.

Member Data Documentation

DtFedTarget* DtXmlFedReader::myFedTarget
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)