Geant4 9.6.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 25 of file DefaultHepRepTypeTree.h.

Constructor & Destructor Documentation

◆ DefaultHepRepTypeTree()

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

Definition at line 16 of file DefaultHepRepTypeTree.cc.

17 : DefaultHepRepTreeID(typeTree->getName(), typeTree->getVersion()) {
18 delete typeTree;
19}
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 21 of file DefaultHepRepTypeTree.cc.

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

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 32 of file DefaultHepRepTypeTree.cc.

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

◆ copy()

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

Returns a deep copy of this typetree.

Returns
copy of this typetree.

Implements HEPREP::HepRepTypeTree.

Definition at line 27 of file DefaultHepRepTypeTree.cc.

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

◆ getType()

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

Returns type

Implements HEPREP::HepRepTypeTree.

Definition at line 41 of file DefaultHepRepTypeTree.cc.

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

◆ 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 37 of file DefaultHepRepTypeTree.cc.

37 {
38 return types;
39}

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