Public Member Functions | Protected Attributes | Private Attributes | List of all members
cheprep::XMLWriter Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/source/visualization/HepRep/include/cheprep/XMLWriter.h"

Inheritance diagram for cheprep::XMLWriter:
cheprep::AbstractXMLWriter

Public Member Functions

 XMLWriter (std::ostream *out, std::string indentString=" ", std::string defaultNameSpace="")
 
virtual ~XMLWriter ()
 
void close ()
 
void openDoc (std::string version="1.0", std::string encoding="", bool standalone=false)
 
void referToDTD (std::string name, std::string pid, std::string ref)
 
void referToDTD (std::string name, std::string system)
 
void closeDoc (bool force=false)
 
void printComment (std::string comment)
 
void printPlain (std::string text)
 
void print (std::string text)
 
void println (std::string text)
 
void openTag (std::string name)
 
void closeTag ()
 
void printTag (std::string name)
 
void setAttribute (std::string name, char *value)
 
void setAttribute (std::string name, std::string value)
 
void setAttribute (std::string name, std::vector< double > value)
 
void setAttribute (std::string name, int64 value)
 
void setAttribute (std::string name, int value)
 
void setAttribute (std::string name, bool value)
 
void setAttribute (std::string name, double value)
 
void printAttributes (int tagLength)
 
std::string normalize (std::string s)
 
std::string normalizeText (std::string s)
 
void checkNameValid (std::string s)
 
void openTag (std::string ns, std::string name)
 
void printTag (std::string ns, std::string name)
 
void setAttribute (std::string ns, std::string name, std::string value)
 
void setAttribute (std::string ns, std::string name, double value)
 

Protected Attributes

bool closed
 
IndentPrintWriterwriter
 
std::string defaultNameSpace
 

Private Attributes

std::string dtdName
 
std::map< std::string, std::stringattributes
 
std::stack< std::stringopenTags
 

Detailed Description

Definition at line 22 of file XMLWriter.h.

Constructor & Destructor Documentation

cheprep::XMLWriter::XMLWriter ( std::ostream *  out,
std::string  indentString = "  ",
std::string  defaultNameSpace = "" 
)
virtual cheprep::XMLWriter::~XMLWriter ( )
virtual

Member Function Documentation

void cheprep::XMLWriter::checkNameValid ( std::string  s)
void cheprep::XMLWriter::close ( )
virtual
void cheprep::XMLWriter::closeDoc ( bool  force = false)
virtual
void cheprep::XMLWriter::closeTag ( )
virtual
std::string cheprep::XMLWriter::normalize ( std::string  s)
std::string cheprep::XMLWriter::normalizeText ( std::string  s)
void cheprep::XMLWriter::openDoc ( std::string  version = "1.0",
std::string  encoding = "",
bool  standalone = false 
)
virtual
void cheprep::XMLWriter::openTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by openTag().

void cheprep::XMLWriter::openTag ( std::string  ns,
std::string  name 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 54 of file XMLWriter.h.

References cheprep::AbstractXMLWriter::defaultNameSpace, and openTag().

54  {
55  openTag(ns == defaultNameSpace ? name : ns.append(":").append(name));
56  }
const XML_Char * name
Definition: expat.h:151
void openTag(std::string name)
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void cheprep::XMLWriter::print ( std::string  text)
void cheprep::XMLWriter::printAttributes ( int  tagLength)
void cheprep::XMLWriter::printComment ( std::string  comment)
void cheprep::XMLWriter::println ( std::string  text)
void cheprep::XMLWriter::printPlain ( std::string  text)
void cheprep::XMLWriter::printTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by printTag().

void cheprep::XMLWriter::printTag ( std::string  ns,
std::string  name 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 57 of file XMLWriter.h.

References cheprep::AbstractXMLWriter::defaultNameSpace, and printTag().

57  {
58  printTag(ns == defaultNameSpace ? name : ns.append(":").append(name));
59  }
const XML_Char * name
Definition: expat.h:151
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void printTag(std::string name)
void cheprep::XMLWriter::referToDTD ( std::string  name,
std::string  pid,
std::string  ref 
)
void cheprep::XMLWriter::referToDTD ( std::string  name,
std::string  system 
)
void cheprep::XMLWriter::setAttribute ( std::string  name,
char *  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by setAttribute().

void cheprep::XMLWriter::setAttribute ( std::string  name,
std::string  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  name,
std::vector< double >  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  name,
int64  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  name,
int  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  name,
bool  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  name,
double  value 
)
virtual
void cheprep::XMLWriter::setAttribute ( std::string  ns,
std::string  name,
std::string  value 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 60 of file XMLWriter.h.

References setAttribute().

60  {
61  setAttribute(ns.append(":").append(name), value);
62  }
const XML_Char * name
Definition: expat.h:151
const XML_Char int const XML_Char * value
Definition: expat.h:331
void setAttribute(std::string name, char *value)
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void cheprep::XMLWriter::setAttribute ( std::string  ns,
std::string  name,
double  value 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 63 of file XMLWriter.h.

References setAttribute().

63  {
64  setAttribute(ns.append(":").append(name), value);
65  }
const XML_Char * name
Definition: expat.h:151
const XML_Char int const XML_Char * value
Definition: expat.h:331
void setAttribute(std::string name, char *value)
static const double ns
Module that plots metrics from reconstructed cosmic ray data.

Member Data Documentation

std::map<std::string, std::string> cheprep::XMLWriter::attributes
private

Definition at line 75 of file XMLWriter.h.

bool cheprep::XMLWriter::closed
protected

Definition at line 70 of file XMLWriter.h.

std::string cheprep::AbstractXMLWriter::defaultNameSpace
protectedinherited
std::string cheprep::XMLWriter::dtdName
private

Definition at line 74 of file XMLWriter.h.

std::stack<std::string> cheprep::XMLWriter::openTags
private

Definition at line 76 of file XMLWriter.h.

IndentPrintWriter* cheprep::XMLWriter::writer
protected

Definition at line 71 of file XMLWriter.h.


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