openscenegraph
osgDB::XmlNode Class Reference

#include <XmlParser>

Inheritance diagram for osgDB::XmlNode:
osg::Referenced

Classes

class  ControlMap
class  Input

Public Types

enum  NodeType {
  UNASSIGNED , ATOM , NODE , GROUP ,
  ROOT , COMMENT , INFORMATION
}
typedef std::map< std::string, std::string > Properties
typedef std::vector< osg::ref_ptr< XmlNode > > Children

Public Member Functions

 XmlNode ()
std::string getTrimmedContents () const
bool read (Input &input)
bool write (std::ostream &fout, const std::string &indent="") const
bool write (const ControlMap &controlMap, std::ostream &fout, const std::string &indent="") const
bool writeString (const ControlMap &controlMap, std::ostream &fout, const std::string &str) const
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Public Attributes

NodeType type
std::string name
std::string contents
Properties properties
Children children

Protected Member Functions

bool writeChildren (const ControlMap &controlMap, std::ostream &fout, const std::string &indent) const
bool writeProperties (const ControlMap &controlMap, std::ostream &fout) const
bool readAndReplaceControl (std::string &in_contents, Input &input) const
Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Detailed Description

XmlNode class for very basic reading and writing of xml files.

Member Typedef Documentation

◆ Children

◆ Properties

typedef std::map< std::string, std::string > osgDB::XmlNode::Properties

Member Enumeration Documentation

◆ NodeType

Enumerator
UNASSIGNED 
ATOM 
NODE 
GROUP 
ROOT 
COMMENT 
INFORMATION 

Constructor & Destructor Documentation

◆ XmlNode()

osgDB::XmlNode::XmlNode ( )

Member Function Documentation

◆ getTrimmedContents()

std::string osgDB::XmlNode::getTrimmedContents ( ) const
inline

◆ read()

bool osgDB::XmlNode::read ( Input & input)

◆ readAndReplaceControl()

bool osgDB::XmlNode::readAndReplaceControl ( std::string & in_contents,
Input & input ) const
protected

◆ write() [1/2]

bool osgDB::XmlNode::write ( const ControlMap & controlMap,
std::ostream & fout,
const std::string & indent = "" ) const

◆ write() [2/2]

bool osgDB::XmlNode::write ( std::ostream & fout,
const std::string & indent = "" ) const

◆ writeChildren()

bool osgDB::XmlNode::writeChildren ( const ControlMap & controlMap,
std::ostream & fout,
const std::string & indent ) const
protected

◆ writeProperties()

bool osgDB::XmlNode::writeProperties ( const ControlMap & controlMap,
std::ostream & fout ) const
protected

◆ writeString()

bool osgDB::XmlNode::writeString ( const ControlMap & controlMap,
std::ostream & fout,
const std::string & str ) const

Member Data Documentation

◆ children

Children osgDB::XmlNode::children

◆ contents

std::string osgDB::XmlNode::contents

Referenced by getTrimmedContents().

◆ name

std::string osgDB::XmlNode::name

◆ properties

Properties osgDB::XmlNode::properties

◆ type

NodeType osgDB::XmlNode::type

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