Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
HepRepInstance.h
Go to the documentation of this file.
1// -*- C++ -*-
2// AID-GENERATED
3// =========================================================================
4// This class was generated by AID - Abstract Interface Definition
5// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6// =========================================================================
7#ifndef HEPREP_HEPREPINSTANCE_H
8#define HEPREP_HEPREPINSTANCE_H 1
9
10// Copyright 2000-2005, FreeHEP.
11
12#include <vector>
13
15
16namespace HEPREP {
17
18class HepRepInstanceTree;
19class HepRepPoint;
20class HepRepSelectFilter;
21class HepRepType;
22class HepRepTypeTree;
23
24/**
25 * HepRepInstance interface.
26 *
27 * @author Mark Donszelmann
28 */
29class HepRepInstance : virtual public HepRepAttribute {
30
31public:
32 /// Destructor.
33 virtual ~HepRepInstance() { /* nop */; }
34
35 /**
36 * Overlays the instance on the current instance.
37 *
38 * Attributes of the instance override or are added to the current instance.
39 * Sub-instances of the instance are added only if the current instance has no sub-instances.
40 * Points of the instance are added only if the current instance has no points.
41 */
42 virtual void overlay(HepRepInstance * instance) = 0;
43
44 /**
45 * Adds an sub-instance to this instance.
46 *
47 * @param instance sub-instance.
48 */
49 virtual void addInstance(HepRepInstance * instance) = 0;
50
51 /**
52 * Removes a sub-instance from this instance.
53 *
54 * @param instance sub-instance.
55 */
56 virtual void removeInstance(HepRepInstance * instance) = 0;
57
58 /**
59 * Returns a collection of all sub-instances this instance keeps.
60 *
61 * @return collection of HepRepInstances.
62 */
63 virtual std::vector<HepRepInstance *> getInstances() = 0;
64
65 /**
66 * Returns the associated type for this instance.
67 *
68 * @return associated HepRepType.
69 */
70 virtual HepRepType * getType() = 0;
71
72 /**
73 * Adds a point to this instance.
74 *
75 * @param point to be added.
76 */
77 virtual void addPoint(HepRepPoint * point) = 0;
78
79 /**
80 * Returns a collection of all points this instance keeps.
81 *
82 * @return collection of HepRepPoints.
83 */
84 virtual std::vector<HepRepPoint *> getPoints() = 0;
85
86 /**
87 * Fills a double[3][n] array with the coordinates of all points, if
88 * none of the points have any attributes defined on them.
89 * The actual number of points filled is returned. In case the number
90 * of points is larger than n, or if any points have attributes, -1 is returned.
91 * One could then call getPoint().
92 *
93 * @see #getPoints()
94 *
95 * @param xyz a double[3][n] array to be filled with points.
96 * @return number of points filled in xyz, or -1 in case of error or non-implementation.
97 *
98 * ONLY in JAVA
99 */
100 /**
101 * Returns true if this instance has a frame. Speedy access for iterator.
102 *
103 * ONLY in JAVA
104 */
105 /**
106 * Returns String layername. Speedy access for iterator.
107 *
108 * ONLY in JAVA
109 */
110 /**
111 * Returns the parent of this instance.
112 *
113 * @return parent of instance, or null if top-level.
114 */
116
117 /**
118 * Returns a deep copy of this instance.
119 *
120 * @param typeTree needed to find the associated type.
121 * @param parent to which the copy is added.
122 * @param filter run on all instances before copying.
123 * @return copy of this instance.
124 */
125 virtual HepRepInstance * copy(HepRepTypeTree * typeTree, HepRepInstance * parent, HepRepSelectFilter * filter = NULL) = 0;
126
127 /**
128 * Returns a deep copy of this instance.
129 *
130 * @param typeTree needed to find the associated type.
131 * @param parent to which the copy is added.
132 * @param filter run on all instances before copying.
133 * @return copy of this instance.
134 */
135 virtual HepRepInstance * copy(HepRepTypeTree * typeTree, HepRepInstanceTree * parent, HepRepSelectFilter * filter = NULL) = 0;
136}; // class
137} // namespace HEPREP
138#endif /* ifndef HEPREP_HEPREPINSTANCE_H */
virtual void addPoint(HepRepPoint *point)=0
virtual void overlay(HepRepInstance *instance)=0
virtual ~HepRepInstance()
Destructor.
virtual HepRepInstance * copy(HepRepTypeTree *typeTree, HepRepInstanceTree *parent, HepRepSelectFilter *filter=NULL)=0
virtual HepRepInstance * getSuperInstance()=0
virtual HepRepType * getType()=0
virtual void removeInstance(HepRepInstance *instance)=0
virtual void addInstance(HepRepInstance *instance)=0
virtual HepRepInstance * copy(HepRepTypeTree *typeTree, HepRepInstance *parent, HepRepSelectFilter *filter=NULL)=0
virtual std::vector< HepRepPoint * > getPoints()=0
virtual std::vector< HepRepInstance * > getInstances()=0