Public Member Functions | Private Attributes | List of all members
cheprep::DefaultHepRepInstance Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/source/visualization/HepRep/include/cheprep/DefaultHepRepInstance.h"

Inheritance diagram for cheprep::DefaultHepRepInstance:
cheprep::DefaultHepRepAttribute HEPREP::HepRepInstance HEPREP::HepRepAttribute HEPREP::HepRepAttribute

Public Member Functions

 DefaultHepRepInstance (HEPREP::HepRepInstance *parent, HEPREP::HepRepType *type)
 
 DefaultHepRepInstance (HEPREP::HepRepInstanceTree *parent, HEPREP::HepRepType *type)
 
 ~DefaultHepRepInstance ()
 
void overlay (HEPREP::HepRepInstance *instance)
 
HEPREP::HepRepInstancecopy (HEPREP::HepRepTypeTree *typeTree, HEPREP::HepRepInstance *parent, HEPREP::HepRepSelectFilter *filter)
 
HEPREP::HepRepInstancecopy (HEPREP::HepRepTypeTree *typeTree, HEPREP::HepRepInstanceTree *parent, HEPREP::HepRepSelectFilter *filter)
 
HEPREP::HepRepTypegetType ()
 
void addPoint (HEPREP::HepRepPoint *point)
 
std::vector< HEPREP::HepRepPoint * > getPoints ()
 
HEPREP::HepRepInstancegetSuperInstance ()
 
void addInstance (HEPREP::HepRepInstance *instance)
 
void removeInstance (HEPREP::HepRepInstance *instance)
 
std::vector< HEPREP::HepRepInstance * > getInstances ()
 
HEPREP::HepRepAttValuegetAttValue (std::string name)
 
voidgetParent ()
 
std::set< HEPREP::HepRepAttValue * > getAttValuesFromNode ()
 
void addAttValue (HEPREP::HepRepAttValue *hepRepAttValue)
 
void addAttValue (std::string key, char *value, int showLabel)
 
void addAttValue (std::string key, std::string value, int showLabel)
 
void addAttValue (std::string key, int value, int showLabel)
 
void addAttValue (std::string key, int64 value, int showLabel)
 
void addAttValue (std::string key, double value, int showLabel)
 
void addAttValue (std::string key, bool value, int showLabel)
 
void addAttValue (std::string key, std::vector< double > value, int showLabel)
 
void addAttValue (std::string key, double red, double green, double blue, double alpha, int showLabel)
 
HEPREP::HepRepAttValuegetAttValueFromNode (std::string lowerCaseName)
 
HEPREP::HepRepAttValueremoveAttValue (std::string key)
 

Private Attributes

HEPREP::HepRepInstanceparent
 
HEPREP::HepRepTypetype
 
std::vector< HEPREP::HepRepPoint * > points
 
std::vector< HEPREP::HepRepInstance * > instances
 

Detailed Description

Definition at line 27 of file DefaultHepRepInstance.h.

Constructor & Destructor Documentation

cheprep::DefaultHepRepInstance::DefaultHepRepInstance ( HEPREP::HepRepInstance parent,
HEPREP::HepRepType type 
)
cheprep::DefaultHepRepInstance::DefaultHepRepInstance ( HEPREP::HepRepInstanceTree parent,
HEPREP::HepRepType type 
)
cheprep::DefaultHepRepInstance::~DefaultHepRepInstance ( )

Member Function Documentation

void cheprep::DefaultHepRepAttribute::addAttValue ( HEPREP::HepRepAttValue attValue)
virtualinherited

Adds an attValue.

Parameters
attValueto be added.

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
char *  value,
int  showLabel 
)
virtualinherited

Adds a char* attValue as a String. This call should be mapped to addAttValue(std::string, std::string, int); and necessary because C++ converts char* into bool and would thus call addAttValue(std::string, bool, int) for a call such as addAttValue("drawAs", "Cylinder", 0);

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
std::string  value,
int  showLabel 
)
virtualinherited

Adds an attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
int  value,
int  showLabel 
)
virtualinherited

Adds an attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
int64  value,
int  showLabel 
)
virtualinherited

Adds an attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
double  value,
int  showLabel 
)
virtualinherited

Adds an attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
bool  value,
int  showLabel 
)
virtualinherited

Adds an attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
std::vector< double >  value,
int  showLabel 
)
virtualinherited

Adds a Color attValue.

Parameters
keyname of attValue
valuevalue of attValue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepAttribute::addAttValue ( std::string  key,
double  red,
double  green,
double  blue,
double  alpha,
int  showLabel 
)
virtualinherited

Adds a Color attValue.

Parameters
keyname of attValue
redcolor
greencolor
bluecolor
alphavalue
showLabelshow this as label

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepInstance::addInstance ( HEPREP::HepRepInstance instance)
virtual

Adds an sub-instance to this instance.

Parameters
instancesub-instance.

Implements HEPREP::HepRepInstance.

void cheprep::DefaultHepRepInstance::addPoint ( HEPREP::HepRepPoint point)
virtual

Adds a point to this instance.

Parameters
pointto be added.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepInstance* cheprep::DefaultHepRepInstance::copy ( HEPREP::HepRepTypeTree typeTree,
HEPREP::HepRepInstance parent,
HEPREP::HepRepSelectFilter filter 
)
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.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepInstance* cheprep::DefaultHepRepInstance::copy ( HEPREP::HepRepTypeTree typeTree,
HEPREP::HepRepInstanceTree parent,
HEPREP::HepRepSelectFilter filter 
)
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.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepAttValue* cheprep::DefaultHepRepInstance::getAttValue ( std::string  name)
virtual

Returns the attValue specified by name. This attValue is normally searched on the node itself and then on its type, moving up the typetree.

Parameters
nameof attribute value.
Returns
attribute value.

Implements cheprep::DefaultHepRepAttribute.

HEPREP::HepRepAttValue* cheprep::DefaultHepRepAttribute::getAttValueFromNode ( std::string  lowerCaseName)
virtualinherited

Returns a named attribute value from this node.

Parameters
lowerCaseNamename in all lowercase.
Returns
corresponding HepRepAttValue.

Implements HEPREP::HepRepAttribute.

std::set<HEPREP::HepRepAttValue*> cheprep::DefaultHepRepAttribute::getAttValuesFromNode ( )
virtualinherited

Returns a collection of all attribute values from this node.

Returns
collection of HepRepAttValues.

Implements HEPREP::HepRepAttribute.

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

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

Returns
collection of HepRepInstances.

Implements HEPREP::HepRepInstance.

void* cheprep::DefaultHepRepInstance::getParent ( )
inline

Definition at line 53 of file DefaultHepRepInstance.h.

References parent.

53 { return parent; }
HEPREP::HepRepInstance * parent
std::vector<HEPREP::HepRepPoint *> cheprep::DefaultHepRepInstance::getPoints ( )
virtual

Returns a collection of all points this instance keeps.

Returns
collection of HepRepPoints.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepInstance* cheprep::DefaultHepRepInstance::getSuperInstance ( )
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.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepType* cheprep::DefaultHepRepInstance::getType ( )
virtual

Returns the associated type for this instance.

Returns
associated HepRepType.

Implements HEPREP::HepRepInstance.

void cheprep::DefaultHepRepInstance::overlay ( HEPREP::HepRepInstance instance)
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.

Implements HEPREP::HepRepInstance.

HEPREP::HepRepAttValue* cheprep::DefaultHepRepAttribute::removeAttValue ( std::string  key)
virtualinherited

Remove the attvalue named by key.

Parameters
keyname of the attValue to be removed.
Returns
removed HepRepAttValue, or null if not removed.

Implements HEPREP::HepRepAttribute.

void cheprep::DefaultHepRepInstance::removeInstance ( HEPREP::HepRepInstance instance)
virtual

Removes a sub-instance from this instance.

Parameters
instancesub-instance.

Implements HEPREP::HepRepInstance.

Member Data Documentation

std::vector<HEPREP::HepRepInstance*> cheprep::DefaultHepRepInstance::instances
private

Definition at line 33 of file DefaultHepRepInstance.h.

HEPREP::HepRepInstance* cheprep::DefaultHepRepInstance::parent
private

Definition at line 30 of file DefaultHepRepInstance.h.

Referenced by getParent().

std::vector<HEPREP::HepRepPoint*> cheprep::DefaultHepRepInstance::points
private

Definition at line 32 of file DefaultHepRepInstance.h.

HEPREP::HepRepType* cheprep::DefaultHepRepInstance::type
private

Definition at line 31 of file DefaultHepRepInstance.h.


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