oasys::XMLDocument Class Reference

#include <XMLDocument.h>

List of all members.


Detailed Description

An object encapsulation of an XML document, consisting of some amount of unparsed header information (i.e.

processing instructions, ENTITY references, etc), then a root tag XMLObject.

Definition at line 32 of file XMLDocument.h.

Public Member Functions

 XMLDocument ()
 Default constructor.
 ~XMLDocument ()
 Destructor.
void set_root (XMLObject *root)
 Set the root tag.
void add_header (const char *text, size_t len=0)
 Append some header data.
void to_string (StringBuffer *buf, int indent) const
 Generate formatted XML text and put it into the given buffer.
const std::string header () const
 Accessors.
const XMLObjectroot () const
 Accessors.

Protected Member Functions

 NO_ASSIGN (XMLDocument)

Protected Attributes

std::string header_
XMLObjectroot_


Constructor & Destructor Documentation

oasys::XMLDocument::XMLDocument (  ) 

Default constructor.

Definition at line 25 of file XMLDocument.cc.

oasys::XMLDocument::~XMLDocument (  ) 

Destructor.

Definition at line 31 of file XMLDocument.cc.

References root_.


Member Function Documentation

const std::string oasys::XMLDocument::header (  )  const [inline]

Accessors.

Definition at line 45 of file XMLDocument.h.

References header_.

const XMLObject* oasys::XMLDocument::root (  )  const [inline]

Accessors.

Definition at line 46 of file XMLDocument.h.

References root_.

Referenced by set_root().

void oasys::XMLDocument::set_root ( XMLObject root  ) 

Set the root tag.

Assumes ownership of the object.

Definition at line 49 of file XMLDocument.cc.

References ASSERT, root(), and root_.

Referenced by oasys::ExpatXMLParser::start_element(), and oasys::XMLMarshal::XMLMarshal().

void oasys::XMLDocument::add_header ( const char *  text,
size_t  len = 0 
)

Append some header data.

Definition at line 38 of file XMLDocument.cc.

References header_.

void oasys::XMLDocument::to_string ( StringBuffer buf,
int  indent 
) const

Generate formatted XML text and put it into the given buffer.

Parameters:
indent The number of spaces to indent for subelements.

Definition at line 57 of file XMLDocument.cc.

References oasys::StringBuffer::append(), header_, root_, and oasys::XMLObject::to_string().

Referenced by oasys::XMLMarshal::end_action().

oasys::XMLDocument::NO_ASSIGN ( XMLDocument   )  [protected]


Member Data Documentation

std::string oasys::XMLDocument::header_ [protected]

Definition at line 67 of file XMLDocument.h.

Referenced by add_header(), header(), and to_string().

XMLObject* oasys::XMLDocument::root_ [protected]

Definition at line 68 of file XMLDocument.h.

Referenced by root(), set_root(), to_string(), and ~XMLDocument().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:37 2007 for DTN Reference Implementation by  doxygen 1.5.1