VGM Version 5.3
Loading...
Searching...
No Matches
XmlVGM::Maps Class Reference

Utility class for mapping XML element values to their names within the XML exporter precision. More...

#include <Maps.h>

Public Types

typedef std::map< VGM::ThreeVector, std::string, std::less< VGM::ThreeVector > > ThreeVectorMap
 
typedef std::multimap< VGM::ThreeVector, const VGM::IIsotope *, std::less< VGM::ThreeVector > > IsotopeMap
 
typedef std::multimap< VGM::ThreeVector, const VGM::IElement *, std::less< VGM::ThreeVector > > ElementMap
 
typedef std::map< std::string, const VGM::IMaterial *, std::less< std::string > > MaterialMap
 
typedef std::map< std::string, const VGM::IMedium *, std::less< std::string > > MediumMap
 

Public Member Functions

 Maps (double numPrecision, double angleUnit, double lengthUnit)
 
virtual ~Maps ()
 
std::string AddPosition (const VGM::Transform &transform)
 
std::string AddRotation (const VGM::Transform &transform)
 
std::string AddBooleanPosition ()
 
std::string AddBooleanRotation ()
 
const VGM::IIsotopeAddIsotope (const VGM::IIsotope *isotope)
 
const VGM::IElementAddElement (const VGM::IElement *element)
 
const VGM::IMaterialAddMaterial (const VGM::IMaterial *material)
 
const VGM::IMediumAddMedium (const VGM::IMedium *medium)
 
std::string FindPositionName (const VGM::Transform &transform) const
 
std::string FindRotationName (const VGM::Transform &transform) const
 
void WriteAllPositions (IWriter *writer)
 
void WriteAllRotations (IWriter *writer)
 
void WriteAllIsotopes (IWriter *writer)
 
void WriteAllElements (IWriter *writer)
 
void WriteAllMaterials (IWriter *writer)
 
void WriteAllMedia (IWriter *writer)
 
void WriteAllMediaFromMaterials (IWriter *writer)
 
void SetNumPrecision (double precision)
 
void ClearAllMaps ()
 

Protected Member Functions

 Maps ()
 
 Maps (const Maps &right)
 
Mapsoperator= (const Maps &)
 

Detailed Description

Utility class for mapping XML element values to their names within the XML exporter precision.

Author
I. Hrivnacova, 19.1.2004

Definition at line 41 of file Maps.h.

Member Typedef Documentation

◆ ThreeVectorMap

std::map<VGM::ThreeVector, std::string, std::less<VGM::ThreeVector> > XmlVGM::Maps::ThreeVectorMap

Definition at line 45 of file Maps.h.

◆ IsotopeMap

Definition at line 48 of file Maps.h.

◆ ElementMap

Definition at line 51 of file Maps.h.

◆ MaterialMap

std::map<std::string, const VGM::IMaterial*, std::less<std::string> > XmlVGM::Maps::MaterialMap

Definition at line 53 of file Maps.h.

◆ MediumMap

std::map<std::string, const VGM::IMedium*, std::less<std::string> > XmlVGM::Maps::MediumMap

Definition at line 55 of file Maps.h.

Constructor & Destructor Documentation

◆ Maps() [1/3]

XmlVGM::Maps::Maps ( double numPrecision,
double angleUnit,
double lengthUnit )

Standard constructor

Parameters
numPrecisionfixed format number precision
angleUnitthe unit for angle values
lengthUnitthe unit for length values

Definition at line 37 of file Maps.cxx.

◆ ~Maps()

XmlVGM::Maps::~Maps ( )
virtual

Definition at line 94 of file Maps.cxx.

◆ Maps() [2/3]

XmlVGM::Maps::Maps ( )
protected

Protected default constructor

Definition at line 57 of file Maps.cxx.

◆ Maps() [3/3]

XmlVGM::Maps::Maps ( const Maps & right)
protected

Protected copy constructor

Definition at line 76 of file Maps.cxx.

Member Function Documentation

◆ AddPosition()

std::string XmlVGM::Maps::AddPosition ( const VGM::Transform & transform)

Check if the specified position is not yet present (within the maps precision), add it to the map and return its generated name

Definition at line 172 of file Maps.cxx.

◆ AddRotation()

std::string XmlVGM::Maps::AddRotation ( const VGM::Transform & transform)

Check if the specified rotation matrix is not yet present, add it to the map and return its generated name

Definition at line 203 of file Maps.cxx.

◆ AddBooleanPosition()

std::string XmlVGM::Maps::AddBooleanPosition ( )

Increase Boolean position counter and generate position name

Definition at line 236 of file Maps.cxx.

◆ AddBooleanRotation()

std::string XmlVGM::Maps::AddBooleanRotation ( )

Increase Boolean position counter and generate position name

Definition at line 249 of file Maps.cxx.

◆ AddIsotope()

const VGM::IIsotope * XmlVGM::Maps::AddIsotope ( const VGM::IIsotope * isotope)

Check if the specified isotope is not yet present (within the maps precision) and add it to the map. Return the isotope (if added) or 0.

Definition at line 262 of file Maps.cxx.

◆ AddElement()

const VGM::IElement * XmlVGM::Maps::AddElement ( const VGM::IElement * element)

Check if the specified element is not yet present (within the maps precision) and add it to the map. Return the element (if added) or 0.

Definition at line 288 of file Maps.cxx.

◆ AddMaterial()

const VGM::IMaterial * XmlVGM::Maps::AddMaterial ( const VGM::IMaterial * material)

Check if the specified material is not yet present and add it to the map. Return the material (if added) or 0.

Definition at line 314 of file Maps.cxx.

◆ AddMedium()

const VGM::IMedium * XmlVGM::Maps::AddMedium ( const VGM::IMedium * medium)

Check if the specified material is not yet present and add it to the map. Return the material (if added) or 0.

Definition at line 331 of file Maps.cxx.

◆ FindPositionName()

std::string XmlVGM::Maps::FindPositionName ( const VGM::Transform & transform) const

Find the position from the given transformation in the map (within the maps precision) and return its xml name. Return an empty string if not found.

Definition at line 348 of file Maps.cxx.

◆ FindRotationName()

std::string XmlVGM::Maps::FindRotationName ( const VGM::Transform & transform) const

Find the rotation from the given transformation in the map (within the maps precision) and return its xml name. Return an empty string if not found.

Definition at line 373 of file Maps.cxx.

◆ WriteAllPositions()

void XmlVGM::Maps::WriteAllPositions ( IWriter * writer)

Write all positions in the map with the given writer

Definition at line 401 of file Maps.cxx.

◆ WriteAllRotations()

void XmlVGM::Maps::WriteAllRotations ( IWriter * writer)

Write all rotations in the map with the given writer

Definition at line 411 of file Maps.cxx.

◆ WriteAllIsotopes()

void XmlVGM::Maps::WriteAllIsotopes ( IWriter * writer)

Write all isotopes from the map with the given writer

Definition at line 421 of file Maps.cxx.

◆ WriteAllElements()

void XmlVGM::Maps::WriteAllElements ( IWriter * writer)

Write all elements from the map with the given writer

Definition at line 431 of file Maps.cxx.

◆ WriteAllMaterials()

void XmlVGM::Maps::WriteAllMaterials ( IWriter * writer)

Write all materials from the map with the given writer

Definition at line 441 of file Maps.cxx.

◆ WriteAllMedia()

void XmlVGM::Maps::WriteAllMedia ( IWriter * writer)

Write all materials from the map with the given writer

Definition at line 451 of file Maps.cxx.

◆ WriteAllMediaFromMaterials()

void XmlVGM::Maps::WriteAllMediaFromMaterials ( IWriter * writer)

Write all materials from the map with the given writer

Definition at line 461 of file Maps.cxx.

◆ SetNumPrecision()

void XmlVGM::Maps::SetNumPrecision ( double precision)
inline

Set numerical precision

Definition at line 121 of file Maps.h.

◆ ClearAllMaps()

void XmlVGM::Maps::ClearAllMaps ( )

Clear all maps

Definition at line 471 of file Maps.cxx.

◆ operator=()

XmlVGM::Maps & XmlVGM::Maps::operator= ( const Maps & right)
protected

Protected assignement operator

Definition at line 104 of file Maps.cxx.


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