Geant4  10.04.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
BHepRepWriter Class Reference
Inheritance diagram for BHepRepWriter:
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)
 
- Public Member Functions inherited from AbstractXMLWriter
 AbstractXMLWriter (std::string aDefaultNameSpace)
 
virtual ~AbstractXMLWriter ()
 

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 int
stringValues
 
std::map< std::string,
std::string > 
stringAttributes
 
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
 

Additional Inherited Members

- Protected Attributes inherited from AbstractXMLWriter
std::string defaultNameSpace
 

Constructor & Destructor Documentation

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

Member Function Documentation

void close ( )
virtual

Implements AbstractXMLWriter.

void openDoc ( std::string  version = "BinaryHepRep/1.0",
std::string  encoding = "UTF-8",
bool  standalone = false 
)
virtual

Implements AbstractXMLWriter.

void closeDoc ( bool  force = false)
virtual

Implements AbstractXMLWriter.

void openTag ( std::string  name)
virtual

Implements AbstractXMLWriter.

Referenced by BHepRepWriter::openTag().

void closeTag ( )
virtual

Implements AbstractXMLWriter.

void printTag ( std::string  name)
virtual

Implements AbstractXMLWriter.

Referenced by BHepRepWriter::printTag().

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

Implements AbstractXMLWriter.

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

Implements AbstractXMLWriter.

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

Implements AbstractXMLWriter.

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

Implements AbstractXMLWriter.

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

Implements AbstractXMLWriter.

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

Implements AbstractXMLWriter.

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

Member Data Documentation

const unsigned char WBXML_VERSION = 0x03
staticprivate
const unsigned char UNKNOWN_PID = 0x01
staticprivate
const unsigned char UTF8 = 0x6a
staticprivate
const unsigned char SWITCH_PAGE = 0x00
staticprivate
const unsigned char END = 0x01
staticprivate
const unsigned char ENTITY = 0x02
staticprivate
const unsigned char STR_I = 0x03
staticprivate
const unsigned char LITERAL = 0x04
staticprivate
const unsigned char CONTENT = 0x40
staticprivate
const unsigned char EXT_I_0 = 0x40
staticprivate
const unsigned char EXT_I_1 = 0x41
staticprivate
const unsigned char EXT_I_2 = 0x42
staticprivate
const unsigned char PI = 0x43
staticprivate
const unsigned char LITERAL_C = 0x44
staticprivate
const unsigned char ATTRIBUTE = 0x80
staticprivate
const unsigned char EXT_T_0 = 0x80
staticprivate
const unsigned char EXT_T_1 = 0x81
staticprivate
const unsigned char EXT_T_2 = 0x82
staticprivate
const unsigned char STR_T = 0x83
staticprivate
const unsigned char LITERAL_A = 0x84
staticprivate
const unsigned char EXT_0 = 0xC0
staticprivate
const unsigned char EXT_1 = 0xC1
staticprivate
const unsigned char EXT_2 = 0xC2
staticprivate
const unsigned char OPAQUE = 0xC3
staticprivate
const unsigned char LITERAL_AC = 0xC4
staticprivate
const unsigned char STR_D = EXT_I_0
staticprivate
const unsigned char STR_R = EXT_T_0
staticprivate
std::map<std::string, unsigned char> tags
staticprivate
std::map<std::string, unsigned char> attributes
staticprivate
std::map<std::string, unsigned char> values
staticprivate
std::ostream& os
private
bool singlePrecision
private
bool isBigEndian
private
std::map<std::string, unsigned int> stringValues
private
std::map<std::string, std::string> stringAttributes
private
std::map<std::string, std::vector<double> > colorAttributes
private
std::map<std::string, int64> longAttributes
private
std::map<std::string, int> intAttributes
private
std::map<std::string, bool> booleanAttributes
private
std::map<std::string, double> doubleAttributes
private
std::vector<double> points
private