Geant4  10.00.p02
G4HepRepFileXMLWriter Class Reference

#include <G4HepRepFileXMLWriter.hh>

Public Member Functions

 G4HepRepFileXMLWriter ()
 
void addType (const char *name, int newTypeDepth)
 
void addInstance ()
 
void addPrimitive ()
 
void addPoint (double x, double y, double z)
 
void addAttDef (const char *name, const char *desc, const char *type, const char *extra)
 
void addAttValue (const char *name, const char *value)
 
void addAttValue (const char *name, double value)
 
void addAttValue (const char *name, int value)
 
void addAttValue (const char *name, bool value)
 
void addAttValue (const char *name, double value1, double value2, double value3)
 
void open (const char *filespec)
 
void close ()
 
void endTypes ()
 

Public Attributes

bool isOpen
 
int typeDepth
 
bool inType [50]
 
bool inInstance [50]
 
char * prevTypeName [50]
 

Private Member Functions

void init ()
 
void endType ()
 
void endInstance ()
 
void endPrimitive ()
 
void endPoint ()
 
void indent ()
 

Private Attributes

std::ofstream fout
 
bool inPrimitive
 
bool inPoint
 

Detailed Description

Definition at line 51 of file G4HepRepFileXMLWriter.hh.

Constructor & Destructor Documentation

G4HepRepFileXMLWriter::G4HepRepFileXMLWriter ( )

Definition at line 48 of file G4HepRepFileXMLWriter.cc.

References init(), and isOpen.

+ Here is the call graph for this function:

Member Function Documentation

void G4HepRepFileXMLWriter::addAttDef ( const char *  name,
const char *  desc,
const char *  type,
const char *  extra 
)

Definition at line 195 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

Referenced by G4HepRepFileSceneHandler::AddCompound(), and G4HepRepFileSceneHandler::CheckFileOpen().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::addAttValue ( const char *  name,
const char *  value 
)

Definition at line 214 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4HepRepFileSceneHandler::AddHepRepInstance(), G4HepRepFileSceneHandler::AddPrimitive(), G4HepRepFileSceneHandler::AddSolid(), G4HepRepFileSceneHandler::CheckFileOpen(), G4HepRepFileSceneHandler::InitHit(), and G4HepRepFileSceneHandler::InitTrajectory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::addAttValue ( const char *  name,
double  value 
)

Definition at line 230 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

+ Here is the call graph for this function:

void G4HepRepFileXMLWriter::addAttValue ( const char *  name,
int  value 
)

Definition at line 246 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

+ Here is the call graph for this function:

void G4HepRepFileXMLWriter::addAttValue ( const char *  name,
bool  value 
)

Definition at line 262 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

+ Here is the call graph for this function:

void G4HepRepFileXMLWriter::addAttValue ( const char *  name,
double  value1,
double  value2,
double  value3 
)

Definition at line 281 of file G4HepRepFileXMLWriter.cc.

References fout, G4cout, G4endl, and indent().

+ Here is the call graph for this function:

void G4HepRepFileXMLWriter::addInstance ( )

Definition at line 120 of file G4HepRepFileXMLWriter.cc.

References endInstance(), fout, G4cout, G4endl, indent(), inInstance, inType, and typeDepth.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4HepRepFileSceneHandler::AddHepRepInstance(), addType(), G4HepRepFileSceneHandler::InitHit(), and G4HepRepFileSceneHandler::InitTrajectory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::addPoint ( double  x,
double  y,
double  z 
)

Definition at line 164 of file G4HepRepFileXMLWriter.cc.

References endPoint(), fout, G4cout, G4endl, G4HepRepMessenger::getCenter(), G4HepRepMessenger::GetInstance(), G4HepRepMessenger::getScale(), indent(), inPoint, and inPrimitive.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4HepRepFileSceneHandler::AddPrimitive(), and G4HepRepFileSceneHandler::AddSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::addPrimitive ( )

Definition at line 142 of file G4HepRepFileXMLWriter.cc.

References endPrimitive(), fout, G4cout, G4endl, indent(), inInstance, inPrimitive, and typeDepth.

Referenced by G4HepRepFileSceneHandler::AddCompound(), G4HepRepFileSceneHandler::AddPrimitive(), and G4HepRepFileSceneHandler::AddSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::addType ( const char *  name,
int  newTypeDepth 
)

Definition at line 71 of file G4HepRepFileXMLWriter.cc.

References addInstance(), endPrimitive(), endType(), fout, G4cout, G4endl, indent(), inType, prevTypeName, and typeDepth.

Referenced by G4HepRepFileSceneHandler::AddCompound(), and G4HepRepFileSceneHandler::AddHepRepInstance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::close ( )

Definition at line 321 of file G4HepRepFileXMLWriter.cc.

References endTypes(), fout, G4cout, G4endl, and isOpen.

Referenced by open(), and G4HepRepFileViewer::ShowView().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::endInstance ( )
private

Definition at line 354 of file G4HepRepFileXMLWriter.cc.

References endPrimitive(), fout, G4endl, indent(), inInstance, and typeDepth.

Referenced by addInstance(), and endType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::endPoint ( )
private

Definition at line 376 of file G4HepRepFileXMLWriter.cc.

References fout, G4endl, indent(), and inPoint.

Referenced by addPoint(), and endPrimitive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::endPrimitive ( )
private

Definition at line 365 of file G4HepRepFileXMLWriter.cc.

References endPoint(), fout, G4endl, indent(), and inPrimitive.

Referenced by addPrimitive(), addType(), and endInstance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::endType ( )
private

Definition at line 342 of file G4HepRepFileXMLWriter.cc.

References endInstance(), fout, G4endl, indent(), inType, prevTypeName, and typeDepth.

Referenced by addType(), and endTypes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::endTypes ( )

Definition at line 335 of file G4HepRepFileXMLWriter.cc.

References endType(), and typeDepth.

Referenced by close().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::indent ( )
private

Definition at line 386 of file G4HepRepFileXMLWriter.cc.

References fout, inInstance, inPoint, inPrimitive, and inType.

Referenced by addAttDef(), addAttValue(), addInstance(), addPoint(), addPrimitive(), addType(), endInstance(), endPoint(), endPrimitive(), and endType().

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::init ( )
private

Definition at line 54 of file G4HepRepFileXMLWriter.cc.

References inInstance, inPoint, inPrimitive, inType, prevTypeName, and typeDepth.

Referenced by G4HepRepFileXMLWriter(), and open().

+ Here is the caller graph for this function:

void G4HepRepFileXMLWriter::open ( const char *  filespec)

Definition at line 302 of file G4HepRepFileXMLWriter.cc.

References close(), fout, G4cout, G4endl, init(), and isOpen.

Referenced by G4HepRepFileSceneHandler::CheckFileOpen().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::ofstream G4HepRepFileXMLWriter::fout
private
bool G4HepRepFileXMLWriter::inInstance[50]

Definition at line 91 of file G4HepRepFileXMLWriter.hh.

Referenced by addInstance(), addPrimitive(), endInstance(), indent(), and init().

bool G4HepRepFileXMLWriter::inPoint
private

Definition at line 100 of file G4HepRepFileXMLWriter.hh.

Referenced by addPoint(), endPoint(), indent(), and init().

bool G4HepRepFileXMLWriter::inPrimitive
private

Definition at line 99 of file G4HepRepFileXMLWriter.hh.

Referenced by addPoint(), addPrimitive(), endPrimitive(), indent(), and init().

bool G4HepRepFileXMLWriter::inType[50]

Definition at line 90 of file G4HepRepFileXMLWriter.hh.

Referenced by addInstance(), addType(), endType(), indent(), and init().

bool G4HepRepFileXMLWriter::isOpen
char* G4HepRepFileXMLWriter::prevTypeName[50]
int G4HepRepFileXMLWriter::typeDepth

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