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

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

Inheritance diagram for cheprep::BHepRepWriter:
cheprep::AbstractXMLWriter

Public Member Functions

 BHepRepWriter (std::ostream &os)
 
virtual ~BHepRepWriter ()
 
void close ()
 
void openDoc (std::string version="BinaryHepRep/1.0", std::string encoding="UTF-8", bool standalone=false)
 
void closeDoc (bool force=false)
 
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 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

std::string defaultNameSpace
 

Private Member Functions

void writeTag (std::string name, bool content=false)
 
void writePoints ()
 
void writeStringDefine (std::string s)
 
void writeMultiByteInt (unsigned int ui)
 
void writeReal (double ui)
 
void writeLong (int64 i)
 
void writeInt (int i)
 
void writeByte (unsigned char b)
 
void writeString (std::string s)
 

Private Attributes

std::ostream & os
 
bool singlePrecision
 
bool isBigEndian
 
std::map< std::string, unsigned intstringValues
 
std::map< std::string, std::stringstringAttributes
 
std::map< std::string, std::vector< double > > colorAttributes
 
std::map< std::string, int64longAttributes
 
std::map< std::string, intintAttributes
 
std::map< std::string, bool > booleanAttributes
 
std::map< std::string, double > doubleAttributes
 
std::vector< double > points
 

Static Private Attributes

static const unsigned char WBXML_VERSION = 0x03
 
static const unsigned char UNKNOWN_PID = 0x01
 
static const unsigned char UTF8 = 0x6a
 
static const unsigned char SWITCH_PAGE = 0x00
 
static const unsigned char END = 0x01
 
static const unsigned char ENTITY = 0x02
 
static const unsigned char STR_I = 0x03
 
static const unsigned char LITERAL = 0x04
 
static const unsigned char CONTENT = 0x40
 
static const unsigned char EXT_I_0 = 0x40
 
static const unsigned char EXT_I_1 = 0x41
 
static const unsigned char EXT_I_2 = 0x42
 
static const unsigned char PI = 0x43
 
static const unsigned char LITERAL_C = 0x44
 
static const unsigned char ATTRIBUTE = 0x80
 
static const unsigned char EXT_T_0 = 0x80
 
static const unsigned char EXT_T_1 = 0x81
 
static const unsigned char EXT_T_2 = 0x82
 
static const unsigned char STR_T = 0x83
 
static const unsigned char LITERAL_A = 0x84
 
static const unsigned char EXT_0 = 0xC0
 
static const unsigned char EXT_1 = 0xC1
 
static const unsigned char EXT_2 = 0xC2
 
static const unsigned char OPAQUE = 0xC3
 
static const unsigned char LITERAL_AC = 0xC4
 
static const unsigned char STR_D = EXT_I_0
 
static const unsigned char STR_R = EXT_T_0
 
static std::map< std::string, unsigned char > tags
 
static std::map< std::string, unsigned char > attributes
 
static std::map< std::string, unsigned char > values
 

Detailed Description

Definition at line 20 of file BHepRepWriter.h.

Constructor & Destructor Documentation

cheprep::BHepRepWriter::BHepRepWriter ( std::ostream &  os)
virtual cheprep::BHepRepWriter::~BHepRepWriter ( )
virtual

Member Function Documentation

void cheprep::BHepRepWriter::close ( )
virtual
void cheprep::BHepRepWriter::closeDoc ( bool  force = false)
virtual
void cheprep::BHepRepWriter::closeTag ( )
virtual
void cheprep::BHepRepWriter::openDoc ( std::string  version = "BinaryHepRep/1.0",
std::string  encoding = "UTF-8",
bool  standalone = false 
)
virtual
void cheprep::BHepRepWriter::openTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by openTag().

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

Implements cheprep::AbstractXMLWriter.

Definition at line 44 of file BHepRepWriter.h.

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

44  {
45  openTag(ns == defaultNameSpace ? name : ns.append(":").append(name));
46  }
const XML_Char * name
Definition: expat.h:151
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void openTag(std::string name)
void cheprep::BHepRepWriter::printTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by printTag().

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

Implements cheprep::AbstractXMLWriter.

Definition at line 47 of file BHepRepWriter.h.

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

47  {
48  printTag(ns == defaultNameSpace ? name : ns.append(":").append(name));
49  }
const XML_Char * name
Definition: expat.h:151
void printTag(std::string name)
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void cheprep::BHepRepWriter::setAttribute ( std::string  name,
char *  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Referenced by setAttribute().

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

Implements cheprep::AbstractXMLWriter.

Definition at line 50 of file BHepRepWriter.h.

References setAttribute().

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

Implements cheprep::AbstractXMLWriter.

Definition at line 53 of file BHepRepWriter.h.

References setAttribute().

53  {
54  setAttribute(ns.append(":").append(name), value);
55  }
const XML_Char * name
Definition: expat.h:151
void setAttribute(std::string name, char *value)
const XML_Char int const XML_Char * value
Definition: expat.h:331
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
void cheprep::BHepRepWriter::writeByte ( unsigned char  b)
private
void cheprep::BHepRepWriter::writeInt ( int  i)
private
void cheprep::BHepRepWriter::writeLong ( int64  i)
private
void cheprep::BHepRepWriter::writeMultiByteInt ( unsigned int  ui)
private
void cheprep::BHepRepWriter::writePoints ( )
private
void cheprep::BHepRepWriter::writeReal ( double  ui)
private
void cheprep::BHepRepWriter::writeString ( std::string  s)
private
void cheprep::BHepRepWriter::writeStringDefine ( std::string  s)
private
void cheprep::BHepRepWriter::writeTag ( std::string  name,
bool  content = false 
)
private

Member Data Documentation

const unsigned char cheprep::BHepRepWriter::ATTRIBUTE = 0x80
staticprivate

Definition at line 76 of file BHepRepWriter.h.

std::map<std::string, unsigned char> cheprep::BHepRepWriter::attributes
staticprivate

Definition at line 95 of file BHepRepWriter.h.

std::map<std::string, bool> cheprep::BHepRepWriter::booleanAttributes
private

Definition at line 111 of file BHepRepWriter.h.

std::map<std::string, std::vector<double> > cheprep::BHepRepWriter::colorAttributes
private

Definition at line 108 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::CONTENT = 0x40
staticprivate

Definition at line 69 of file BHepRepWriter.h.

std::string cheprep::AbstractXMLWriter::defaultNameSpace
protectedinherited
std::map<std::string, double> cheprep::BHepRepWriter::doubleAttributes
private

Definition at line 112 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::END = 0x01
staticprivate

Definition at line 64 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::ENTITY = 0x02
staticprivate

Definition at line 65 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_0 = 0xC0
staticprivate

Definition at line 83 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_1 = 0xC1
staticprivate

Definition at line 84 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_2 = 0xC2
staticprivate

Definition at line 85 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_I_0 = 0x40
staticprivate

Definition at line 70 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_I_1 = 0x41
staticprivate

Definition at line 71 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_I_2 = 0x42
staticprivate

Definition at line 72 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_T_0 = 0x80
staticprivate

Definition at line 77 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_T_1 = 0x81
staticprivate

Definition at line 78 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::EXT_T_2 = 0x82
staticprivate

Definition at line 79 of file BHepRepWriter.h.

std::map<std::string, int> cheprep::BHepRepWriter::intAttributes
private

Definition at line 110 of file BHepRepWriter.h.

bool cheprep::BHepRepWriter::isBigEndian
private

Definition at line 101 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::LITERAL = 0x04
staticprivate

Definition at line 67 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::LITERAL_A = 0x84
staticprivate

Definition at line 81 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::LITERAL_AC = 0xC4
staticprivate

Definition at line 87 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::LITERAL_C = 0x44
staticprivate

Definition at line 74 of file BHepRepWriter.h.

std::map<std::string, int64> cheprep::BHepRepWriter::longAttributes
private

Definition at line 109 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::OPAQUE = 0xC3
staticprivate

Definition at line 86 of file BHepRepWriter.h.

std::ostream& cheprep::BHepRepWriter::os
private

Definition at line 99 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::PI = 0x43
staticprivate

Definition at line 73 of file BHepRepWriter.h.

std::vector<double> cheprep::BHepRepWriter::points
private

Definition at line 115 of file BHepRepWriter.h.

bool cheprep::BHepRepWriter::singlePrecision
private

Definition at line 100 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::STR_D = EXT_I_0
staticprivate

Definition at line 90 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::STR_I = 0x03
staticprivate

Definition at line 66 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::STR_R = EXT_T_0
staticprivate

Definition at line 91 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::STR_T = 0x83
staticprivate

Definition at line 80 of file BHepRepWriter.h.

std::map<std::string, std::string> cheprep::BHepRepWriter::stringAttributes
private

Definition at line 107 of file BHepRepWriter.h.

std::map<std::string, unsigned int> cheprep::BHepRepWriter::stringValues
private

Definition at line 104 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::SWITCH_PAGE = 0x00
staticprivate

Definition at line 63 of file BHepRepWriter.h.

std::map<std::string, unsigned char> cheprep::BHepRepWriter::tags
staticprivate

Definition at line 94 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::UNKNOWN_PID = 0x01
staticprivate

Definition at line 59 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::UTF8 = 0x6a
staticprivate

Definition at line 60 of file BHepRepWriter.h.

std::map<std::string, unsigned char> cheprep::BHepRepWriter::values
staticprivate

Definition at line 96 of file BHepRepWriter.h.

const unsigned char cheprep::BHepRepWriter::WBXML_VERSION = 0x03
staticprivate

Definition at line 58 of file BHepRepWriter.h.


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