xsil::Xwriter Class Reference
[Xsil document preparation]

#include <Xwriter.hh>

List of all members.

Public Member Functions

 Xwriter (std::ostream &ostr)
 ~Xwriter (void)
void text (const std::string &data)
void endLine (void)
bool getIndentEnable (void) const
 Get the indent enable flag.
void setIndentEnable (bool torf)
 Set the indent enable flag.
void Tag (const char *tagname, int nattr=0, const char **attr=0, const char **value=0)
void TagNData (const char *tagname, int nattr=0, const char **attr=0, const char **value=0)
void Integer (int N)
void endTag (const char *tagname)
void sync (void)
void setDocType (const std::string &doc)
void writeHeader (void)
void defineLigoLW (void)


Detailed Description

The Xwriter class formats data for XML output. It provides checks of the XML syntax. brief XML writer class.
Author:
J. Zweizig
Version:
1.1; Modified 22-Feb-2000.

Constructor & Destructor Documentation

xsil::Xwriter::Xwriter ( std::ostream &  ostr  ) 

Construct an XML file writer to format data to an output stream. brief XML writer constructor.

Parameters:
ostr Output stream to receive formatted XML.

xsil::Xwriter::~Xwriter ( void   ) 

XML writer destructor. brief destructor.


Member Function Documentation

void xsil::Xwriter::text ( const std::string &  data  ) 

Output specified XML text to the stream. brief Write text string.

Parameters:
data Text to be written to the output stream.

void xsil::Xwriter::endLine ( void   ) 

End of an output line.

bool xsil::Xwriter::getIndentEnable ( void   )  const [inline]

Get the indent enable flag.

Get the current value of the indentation enable flag.

Returns:
Indent enable flag value.

void xsil::Xwriter::setIndentEnable ( bool  torf  ) 

Set the indent enable flag.

Set the indentation enable flag to the specified value.

Parameters:
torf Indent enable flag value.

void xsil::Xwriter::Tag ( const char *  tagname,
int  nattr = 0,
const char **  attr = 0,
const char **  value = 0 
)

Write an xsil tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The tag name is added to the Xwiter tag list for validation. brief Write a tag.

Parameters:
tagname Pointer to the tag name.
nattr Number of attributes to be included in the tag.
attr List of pointers to attribute names.
value List of pointers to attribute values.

void xsil::Xwriter::TagNData ( const char *  tagname,
int  nattr = 0,
const char **  attr = 0,
const char **  value = 0 
)

Write a dataless xsil tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The <tag/> syntax is used and no end tag block will be generated. brief Write a dataless tag.

Parameters:
tagname Pointer to the tag name.
nattr Number of attributes to be included in the tag.
attr List of pointers to attribute names.
value List of pointers to attribute values.

void xsil::Xwriter::Integer ( int  N  ) 

Write an integer value to the output stream. brief Write an integer.

Parameters:
N value to be written.

void xsil::Xwriter::endTag ( const char *  tagname  ) 

Write the </name> end tag to the output stream. The specified tag name must match that of the most recent unclosed tag. brief write a close tag.

Parameters:
tagname Name of tag to be closed.

void xsil::Xwriter::sync ( void   ) 

Synchronize the buffer to the output file by flushing buffered data to the output stream. brief Flush output data.

void xsil::Xwriter::setDocType ( const std::string &  doc  ) 

Set the document type text to a specified string. brief Set the document type text.

void xsil::Xwriter::writeHeader ( void   ) 

Write the XML document header. brief Write the document header.

void xsil::Xwriter::defineLigoLW ( void   ) 

Copy in the ligo_lw definition. brief Copy in the ligo_lw definition.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:52 2009 for dmt by  doxygen 1.5.4