VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions
DtRwClassDocReader Class Reference

Represents a reader class that interacts with libXml to read a VR-Forces DtReaderWriter class documentation file. More...

Public Member Functions

 DtRwClassDocReader ()
 constructor. More...
 
virtual ~DtRwClassDocReader ()
 Destructor. More...
 
virtual bool read (const DtFilename &filename, DtReaderWriterClassDocumentation &parameterDocDesc) const
 Reads in contents of DtReaderWriter class doc file to class descriptor object. More...
 

Protected Member Functions

virtual xmlNodePtr xmlFindNode (xmlNodePtr node, const char *nodeName) const
 Finds the first node whose tag matches the one given by nodeName. More...
 
virtual xmlNodePtr xmlFindNode (xmlNodePtr node, const char *nodeName, const char *attrName, const char *attrValue) const
 Finds the node named as nodeName and that also has an attribute named attrName with a value of attrValue. More...
 
virtual DtString xmlGetAttrValue (xmlNodePtr node, const char *attrname) const
 Returns the value of the attribute attrname inside the node. More...
 
virtual DtString xmlGetAtomicNodeValue (xmlNodePtr node, const char *nodeName) const
 Returns the value of an "atomic" node. More...
 
virtual void xmlNextNode (xmlNodePtr &node) const
 
virtual DtString xmlGetAtomicNodeValue (xmlNodePtr node) const
 Returns the value of an "atomic" node. More...
 
virtual xmlNodePtr xmlGetChildren (xmlNodePtr node) const
 Returns a pointer to the first child of the node or NULL if not defined The reason for this method is because libXml also includes blank text nodes sometimes, so they need to be filtered out. More...
 

Private Member Functions

 DtRwClassDocReader (const DtRwClassDocReader &node)
 Copy constructor – not implemented. More...
 
DtRwClassDocReaderoperator= (const DtRwClassDocReader &orig)
 Assignment operator – not implemented. More...
 

Detailed Description

Represents a reader class that interacts with libXml to read a VR-Forces DtReaderWriter class documentation file.

Constructor & Destructor Documentation

DtRwClassDocReader::DtRwClassDocReader ( )

constructor.

virtual DtRwClassDocReader::~DtRwClassDocReader ( )
virtual

Destructor.

DtRwClassDocReader::DtRwClassDocReader ( const DtRwClassDocReader node)
private

Copy constructor – not implemented.

Member Function Documentation

virtual bool DtRwClassDocReader::read ( const DtFilename &  filename,
DtReaderWriterClassDocumentation parameterDocDesc 
) const
virtual

Reads in contents of DtReaderWriter class doc file to class descriptor object.

virtual xmlNodePtr DtRwClassDocReader::xmlFindNode ( xmlNodePtr  node,
const char nodeName 
) const
protectedvirtual

Finds the first node whose tag matches the one given by nodeName.

Parameters
nodeStarting node for the search inside the xml document
nodeNameName of the node to be searched (e.g. "GridStructure")
Returns
0 if no matches are found.
virtual xmlNodePtr DtRwClassDocReader::xmlFindNode ( xmlNodePtr  node,
const char nodeName,
const char attrName,
const char attrValue 
) const
protectedvirtual

Finds the node named as nodeName and that also has an attribute named attrName with a value of attrValue.

For example, findNode(nodeptr, "GridStructure", "name", "abc") searches for a node that looks like

<GridStructure name="abc">
...
</GridStructure>

Returns
0 if no matches are found.
virtual DtString DtRwClassDocReader::xmlGetAttrValue ( xmlNodePtr  node,
const char attrname 
) const
protectedvirtual

Returns the value of the attribute attrname inside the node.

Attributes are specified inside the node like this

<node attrname=value ...>
...
</node>

Parameters
nodeNode to access
attrnameName of the attribute to be searched (e.g. "name")
Returns
The attribute's value if present or an empty DtSring otherwise.
virtual DtString DtRwClassDocReader::xmlGetAtomicNodeValue ( xmlNodePtr  node,
const char nodeName 
) const
protectedvirtual

Returns the value of an "atomic" node.

Atomic nodes are the ones that have the following structure <tag>value</tag>.

Parameters
nodeNode to start the search of the atomic node
nodeNameName of the atomic node to be searched
Returns
It returns an empty DtString if the node has the form or <tag></tag>
virtual void DtRwClassDocReader::xmlNextNode ( xmlNodePtr node) const
protectedvirtual
Returns
the next node which is not a blank text node
virtual DtString DtRwClassDocReader::xmlGetAtomicNodeValue ( xmlNodePtr  node) const
protectedvirtual

Returns the value of an "atomic" node.

Atomic nodes are the ones that have the following structure <tag>value</tag>. It returns the empty string if the node has the form or <tag></tag>

virtual xmlNodePtr DtRwClassDocReader::xmlGetChildren ( xmlNodePtr  node) const
protectedvirtual

Returns a pointer to the first child of the node or NULL if not defined The reason for this method is because libXml also includes blank text nodes sometimes, so they need to be filtered out.

This function guarantees you get an actual child node as the first node

DtRwClassDocReader& DtRwClassDocReader::operator= ( const DtRwClassDocReader orig)
private

Assignment operator – not implemented.


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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)