Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
cheprep::DefaultHepRepTypeTree Class Reference

#include <DefaultHepRepTypeTree.h>

+ Inheritance diagram for cheprep::DefaultHepRepTypeTree:

Public Member Functions

 DefaultHepRepTypeTree (HEPREP::HepRepTreeID *typeTree)
 
 ~DefaultHepRepTypeTree ()
 
HEPREP::HepRepTypeTreecopy ()
 
void addType (HEPREP::HepRepType *type)
 
std::vector< HEPREP::HepRepType * > getTypeList ()
 
HEPREP::HepRepTypegetType (std::string name)
 
- Public Member Functions inherited from cheprep::DefaultHepRepTreeID
 DefaultHepRepTreeID (std::string name, std::string version, std::string qualifier="top_level")
 
 ~DefaultHepRepTreeID ()
 
std::string getQualifier ()
 
void setQualifier (std::string qualifier)
 
std::string getName ()
 
std::string getVersion ()
 
- Public Member Functions inherited from HEPREP::HepRepTreeID
virtual ~HepRepTreeID ()
 Destructor.
 
virtual std::string getName ()=0
 
virtual std::string getVersion ()=0
 
virtual std::string getQualifier ()=0
 
virtual void setQualifier (std::string qualifier)=0
 
- Public Member Functions inherited from HEPREP::HepRepTypeTree
virtual ~HepRepTypeTree ()
 Destructor.
 
virtual void addType (HepRepType *type)=0
 
virtual std::vector< HepRepType * > getTypeList ()=0
 
virtual HepRepTypegetType (std::string fullName)=0
 
virtual HepRepTypeTreecopy ()=0
 

Detailed Description

Definition at line 24 of file DefaultHepRepTypeTree.h.

Constructor & Destructor Documentation

◆ DefaultHepRepTypeTree()

cheprep::DefaultHepRepTypeTree::DefaultHepRepTypeTree ( HEPREP::HepRepTreeID typeTree)

Definition at line 15 of file DefaultHepRepTypeTree.cc.

16 : DefaultHepRepTreeID(typeTree->getName(), typeTree->getVersion()) {
17 delete typeTree;
18}
virtual std::string getName()=0
virtual std::string getVersion()=0
DefaultHepRepTreeID(std::string name, std::string version, std::string qualifier="top_level")

◆ ~DefaultHepRepTypeTree()

cheprep::DefaultHepRepTypeTree::~DefaultHepRepTypeTree ( )

Definition at line 20 of file DefaultHepRepTypeTree.cc.

20 {
21 for (vector<HepRepType*>::iterator i1 = types.begin(); i1 != types.end(); i1++) {
22 delete (*i1);
23 }
24}

Member Function Documentation

◆ addType()

void cheprep::DefaultHepRepTypeTree::addType ( HEPREP::HepRepType type)
virtual

Adds a type to this typetree.

Parameters
typeto be added.

Implements HEPREP::HepRepTypeTree.

Definition at line 31 of file DefaultHepRepTypeTree.cc.

31 {
32 // FIXME should check if type already exists
33 types.push_back(type);
34}

◆ copy()

HepRepTypeTree * cheprep::DefaultHepRepTypeTree::copy ( )
virtual

Returns a deep copy of this typetree.

Returns
copy of this typetree.

Implements HEPREP::HepRepTypeTree.

Definition at line 26 of file DefaultHepRepTypeTree.cc.

26 {
27 cerr << "DefaultHepRepTypeTree::copy() not implemented." << endl;
28 return NULL;
29}

◆ getType()

HepRepType * cheprep::DefaultHepRepTypeTree::getType ( std::string  fullName)
virtual

Returns type

Implements HEPREP::HepRepTypeTree.

Definition at line 40 of file DefaultHepRepTypeTree.cc.

40 {
41 cerr << "DefaultHepRepTypeTree::getType(string) not implemented." << endl;
42 return NULL;
43}

◆ getTypeList()

vector< HepRepType * > cheprep::DefaultHepRepTypeTree::getTypeList ( )
virtual

Returns a collection of all types in this tree.

Returns
collection of HepRepTypes.

Implements HEPREP::HepRepTypeTree.

Definition at line 36 of file DefaultHepRepTypeTree.cc.

36 {
37 return types;
38}

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