ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cheprep::XMLWriter Class Reference

#include <geant4/tree/geant4-10.6-release/source/visualization/HepRep/include/cheprep/XMLWriter.h>

+ Inheritance diagram for cheprep::XMLWriter:
+ Collaboration diagram for cheprep::XMLWriter:

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)
 
- Public Member Functions inherited from cheprep::AbstractXMLWriter
 AbstractXMLWriter (std::string aDefaultNameSpace)
 
virtual ~AbstractXMLWriter ()
 

Protected Attributes

bool closed
 
IndentPrintWriterwriter
 
- Protected Attributes inherited from cheprep::AbstractXMLWriter
std::string defaultNameSpace
 

Private Attributes

std::string dtdName
 
std::map< std::string,
std::string > 
attributes
 
std::stack< std::string > openTags
 

Detailed Description

Definition at line 21 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 21 of file XMLWriter.h

Constructor & Destructor Documentation

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

Definition at line 17 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 17 of file XMLWriter.cc

References closed, dtdName, cheprep::IndentPrintWriter::setIndentString(), and writer.

+ Here is the call graph for this function:

cheprep::XMLWriter::~XMLWriter ( )
virtual

Definition at line 25 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 25 of file XMLWriter.cc

References cheprep::IndentPrintWriter::close(), and writer.

+ Here is the call graph for this function:

Member Function Documentation

void cheprep::XMLWriter::checkNameValid ( std::string  s)

Definition at line 279 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 279 of file XMLWriter.cc

Referenced by openTag(), printAttributes(), and printTag().

+ Here is the caller graph for this function:

void cheprep::XMLWriter::close ( void  )
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 30 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 30 of file XMLWriter.cc

References cheprep::IndentPrintWriter::close(), closeDoc(), and writer.

+ Here is the call graph for this function:

void cheprep::XMLWriter::closeDoc ( bool  force = false)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 69 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 69 of file XMLWriter.cc

References closed, closeTag(), and openTags.

Referenced by close().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::XMLWriter::closeTag ( )
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 118 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 118 of file XMLWriter.cc

References cheprep::IndentPrintWriter::close(), openTags, cheprep::IndentPrintWriter::outdent(), and writer.

Referenced by closeDoc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string cheprep::XMLWriter::normalize ( std::string  s)

Definition at line 200 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 200 of file XMLWriter.cc

Referenced by printAttributes().

+ Here is the caller graph for this function:

string cheprep::XMLWriter::normalizeText ( std::string  s)

Definition at line 246 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 246 of file XMLWriter.cc

Referenced by print(), and printComment().

+ Here is the caller graph for this function:

void cheprep::XMLWriter::openDoc ( std::string  version = "1.0",
std::string  encoding = "",
bool  standalone = false 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 35 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 35 of file XMLWriter.cc

References cheprep::IndentPrintWriter::getIndentString(), cheprep::IndentPrintWriter::setIndentString(), and writer.

+ Here is the call graph for this function:

void cheprep::XMLWriter::openTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 106 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 106 of file XMLWriter.cc

References checkNameValid(), dtdName, cheprep::IndentPrintWriter::indent(), openTags, printAttributes(), and writer.

Referenced by openTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements cheprep::AbstractXMLWriter.

Definition at line 53 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 53 of file XMLWriter.h

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

+ Here is the call graph for this function:

void cheprep::XMLWriter::print ( std::string  text)

Definition at line 97 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 97 of file XMLWriter.cc

References normalizeText(), and writer.

Referenced by println().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::XMLWriter::printAttributes ( int  tagLength)

Definition at line 175 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 175 of file XMLWriter.cc

References attributes, checkNameValid(), cheprep::IndentPrintWriter::getIndent(), cheprep::IndentPrintWriter::indent(), BTOF::length, normalize(), cheprep::IndentPrintWriter::outdent(), width, and writer.

Referenced by openTag(), and printTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::XMLWriter::printComment ( std::string  comment)

Definition at line 86 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 86 of file XMLWriter.cc

References normalizeText(), and writer.

+ Here is the call graph for this function:

void cheprep::XMLWriter::println ( std::string  text)

Definition at line 101 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 101 of file XMLWriter.cc

References print(), and writer.

+ Here is the call graph for this function:

void cheprep::XMLWriter::printPlain ( std::string  text)

Definition at line 93 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 93 of file XMLWriter.cc

References writer.

void cheprep::XMLWriter::printTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 129 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 129 of file XMLWriter.cc

References checkNameValid(), printAttributes(), and writer.

Referenced by printTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements cheprep::AbstractXMLWriter.

Definition at line 56 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 56 of file XMLWriter.h

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

+ Here is the call graph for this function:

void cheprep::XMLWriter::referToDTD ( std::string  name,
std::string  pid,
std::string  ref 
)

Definition at line 53 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 53 of file XMLWriter.cc

References dtdName, and writer.

void cheprep::XMLWriter::referToDTD ( std::string  name,
std::string  system 
)

Definition at line 61 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 61 of file XMLWriter.cc

References dtdName, and writer.

void cheprep::XMLWriter::setAttribute ( std::string  name,
char *  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 136 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 136 of file XMLWriter.cc

Referenced by setAttribute().

+ Here is the caller graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  name,
std::string  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 140 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 140 of file XMLWriter.cc

References attributes.

void cheprep::XMLWriter::setAttribute ( std::string  name,
std::vector< double >  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 145 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 145 of file XMLWriter.cc

References cheprep::DefaultHepRepAttValue::getAsString(), and setAttribute().

+ Here is the call graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  name,
int64  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 150 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 150 of file XMLWriter.cc

References cheprep::DefaultHepRepAttValue::getAsString(), and setAttribute().

+ Here is the call graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  name,
int  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 155 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 155 of file XMLWriter.cc

References cheprep::DefaultHepRepAttValue::getAsString(), setAttribute(), and cheprep::DefaultHepRepAttValue::toShowLabel().

+ Here is the call graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  name,
bool  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 165 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 165 of file XMLWriter.cc

References cheprep::DefaultHepRepAttValue::getAsString(), and setAttribute().

+ Here is the call graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  name,
double  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 170 of file XMLWriter.cc.

View newest version in sPHENIX GitHub at line 170 of file XMLWriter.cc

References cheprep::DefaultHepRepAttValue::getAsString(), and setAttribute().

+ Here is the call graph for this function:

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

Implements cheprep::AbstractXMLWriter.

Definition at line 59 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 59 of file XMLWriter.h

References setAttribute().

+ Here is the call graph for this function:

void cheprep::XMLWriter::setAttribute ( std::string  ns,
std::string  name,
double  value 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 62 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 62 of file XMLWriter.h

References setAttribute().

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 74 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 74 of file XMLWriter.h

Referenced by printAttributes(), and setAttribute().

bool cheprep::XMLWriter::closed
protected

Definition at line 69 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 69 of file XMLWriter.h

Referenced by closeDoc(), and XMLWriter().

std::string cheprep::XMLWriter::dtdName
private

Definition at line 73 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 73 of file XMLWriter.h

Referenced by openTag(), referToDTD(), and XMLWriter().

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

Definition at line 75 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 75 of file XMLWriter.h

Referenced by closeDoc(), closeTag(), and openTag().

IndentPrintWriter* cheprep::XMLWriter::writer
protected

Definition at line 70 of file XMLWriter.h.

View newest version in sPHENIX GitHub at line 70 of file XMLWriter.h

Referenced by close(), closeTag(), openDoc(), openTag(), print(), printAttributes(), printComment(), println(), printPlain(), printTag(), referToDTD(), XMLWriter(), and ~XMLWriter().


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