Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
HEPREP::HepRepInstance Class Referenceabstract

#include <HepRepInstance.h>

+ Inheritance diagram for HEPREP::HepRepInstance:

Public Member Functions

virtual ~HepRepInstance ()
 Destructor.
 
virtual void overlay (HepRepInstance *instance)=0
 
virtual void addInstance (HepRepInstance *instance)=0
 
virtual void removeInstance (HepRepInstance *instance)=0
 
virtual std::vector< HepRepInstance * > getInstances ()=0
 
virtual HepRepTypegetType ()=0
 
virtual void addPoint (HepRepPoint *point)=0
 
virtual std::vector< HepRepPoint * > getPoints ()=0
 
virtual HepRepInstancegetSuperInstance ()=0
 
virtual HepRepInstancecopy (HepRepTypeTree *typeTree, HepRepInstance *parent, HepRepSelectFilter *filter=NULL)=0
 
virtual HepRepInstancecopy (HepRepTypeTree *typeTree, HepRepInstanceTree *parent, HepRepSelectFilter *filter=NULL)=0
 
- Public Member Functions inherited from HEPREP::HepRepAttribute
virtual ~HepRepAttribute ()
 Destructor.
 
virtual void addAttValue (HepRepAttValue *attValue)=0
 
virtual void addAttValue (std::string key, char *value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, std::string value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, int64 value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, int value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, double value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, bool value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, std::vector< double > value, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual void addAttValue (std::string key, double red, double green, double blue, double alpha=1.0, int showLabel=HepRepConstants::SHOW_NONE)=0
 
virtual HepRepAttValueremoveAttValue (std::string key)=0
 
virtual HepRepAttValuegetAttValue (std::string name)=0
 
virtual std::set< HepRepAttValue * > getAttValuesFromNode ()=0
 
virtual HepRepAttValuegetAttValueFromNode (std::string lowerCaseName)=0
 

Detailed Description

HepRepInstance interface.

Author
Mark Donszelmann

Definition at line 29 of file HepRepInstance.h.

Constructor & Destructor Documentation

◆ ~HepRepInstance()

virtual HEPREP::HepRepInstance::~HepRepInstance ( )
inlinevirtual

Destructor.

Definition at line 33 of file HepRepInstance.h.

33{ /* nop */; }

Member Function Documentation

◆ addInstance()

virtual void HEPREP::HepRepInstance::addInstance ( HepRepInstance instance)
pure virtual

Adds an sub-instance to this instance.

Parameters
instancesub-instance.

Implemented in cheprep::DefaultHepRepInstance.

Referenced by cheprep::DefaultHepRepInstance::DefaultHepRepInstance().

◆ addPoint()

virtual void HEPREP::HepRepInstance::addPoint ( HepRepPoint point)
pure virtual

Adds a point to this instance.

Parameters
pointto be added.

Implemented in cheprep::DefaultHepRepInstance.

Referenced by cheprep::DefaultHepRepPoint::DefaultHepRepPoint().

◆ copy() [1/2]

virtual HepRepInstance * HEPREP::HepRepInstance::copy ( HepRepTypeTree typeTree,
HepRepInstance parent,
HepRepSelectFilter filter = NULL 
)
pure virtual

Returns a deep copy of this instance.

Parameters
typeTreeneeded to find the associated type.
parentto which the copy is added.
filterrun on all instances before copying.
Returns
copy of this instance.

Implemented in cheprep::DefaultHepRepInstance.

◆ copy() [2/2]

virtual HepRepInstance * HEPREP::HepRepInstance::copy ( HepRepTypeTree typeTree,
HepRepInstanceTree parent,
HepRepSelectFilter filter = NULL 
)
pure virtual

Returns a deep copy of this instance.

Parameters
typeTreeneeded to find the associated type.
parentto which the copy is added.
filterrun on all instances before copying.
Returns
copy of this instance.

Implemented in cheprep::DefaultHepRepInstance.

◆ getInstances()

virtual std::vector< HepRepInstance * > HEPREP::HepRepInstance::getInstances ( )
pure virtual

Returns a collection of all sub-instances this instance keeps.

Returns
collection of HepRepInstances.

Implemented in cheprep::DefaultHepRepInstance.

Referenced by cheprep::XMLHepRepWriter::write().

◆ getPoints()

virtual std::vector< HepRepPoint * > HEPREP::HepRepInstance::getPoints ( )
pure virtual

Returns a collection of all points this instance keeps.

Returns
collection of HepRepPoints.

Implemented in cheprep::DefaultHepRepInstance.

Referenced by cheprep::XMLHepRepWriter::write().

◆ getSuperInstance()

virtual HepRepInstance * HEPREP::HepRepInstance::getSuperInstance ( )
pure virtual

Fills a double[3][n] array with the coordinates of all points, if none of the points have any attributes defined on them. The actual number of points filled is returned. In case the number of points is larger than n, or if any points have attributes, -1 is returned. One could then call getPoint().

See also
getPoints()
Parameters
xyza double[3][n] array to be filled with points.
Returns
number of points filled in xyz, or -1 in case of error or non-implementation.

ONLY in JAVA Returns true if this instance has a frame. Speedy access for iterator.

ONLY in JAVA Returns String layername. Speedy access for iterator.

ONLY in JAVA Returns the parent of this instance.

Returns
parent of instance, or null if top-level.

Implemented in cheprep::DefaultHepRepInstance.

◆ getType()

virtual HepRepType * HEPREP::HepRepInstance::getType ( )
pure virtual

Returns the associated type for this instance.

Returns
associated HepRepType.

Implemented in cheprep::DefaultHepRepInstance.

Referenced by cheprep::XMLHepRepWriter::write().

◆ overlay()

virtual void HEPREP::HepRepInstance::overlay ( HepRepInstance instance)
pure virtual

Overlays the instance on the current instance.

Attributes of the instance override or are added to the current instance. Sub-instances of the instance are added only if the current instance has no sub-instances. Points of the instance are added only if the current instance has no points.

Implemented in cheprep::DefaultHepRepInstance.

◆ removeInstance()

virtual void HEPREP::HepRepInstance::removeInstance ( HepRepInstance instance)
pure virtual

Removes a sub-instance from this instance.

Parameters
instancesub-instance.

Implemented in cheprep::DefaultHepRepInstance.


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