source: trunk/source/visualization/HepRep/include/HEPREP/HepRep.h @ 834

Last change on this file since 834 was 834, checked in by garnier, 16 years ago

import all except CVS

File size: 7.2 KB
Line 
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_HEPREP_H
8#define HEPREP_HEPREP_H 1
9
10// Copyright 2000-2005, FreeHEP.
11
12#include <string>
13#include <vector>
14
15// Include all other HepRep header files here for convenience
16#include "HEPREP/HasHepRep.h"
17#include "HEPREP/HepRepAction.h"
18#include "HEPREP/HepRepAttDef.h"
19#include "HEPREP/HepRepAttribute.h"
20#include "HEPREP/HepRepAttributeListener.h"
21#include "HEPREP/HepRepAttValue.h"
22#include "HEPREP/HepRepConstants.h"
23#include "HEPREP/HepRepDefinition.h"
24#include "HEPREP/HepRepFactory.h"
25#include "HEPREP/HepRepFrameListener.h"
26#include "HEPREP/HepRepInstance.h"
27#include "HEPREP/HepRepInstanceTree.h"
28#include "HEPREP/HepRepIterator.h"
29#include "HEPREP/HepRepPoint.h"
30#include "HEPREP/HepRepSelectFilter.h"
31#include "HEPREP/HepRepTreeID.h"
32#include "HEPREP/HepRepType.h"
33#include "HEPREP/HepRepTypeTree.h"
34#include "HEPREP/HepRepWriter.h"
35
36namespace HEPREP {
37
38class HepRepAction;
39class HepRepInstanceTree;
40class HepRepSelectFilter;
41class HepRepTypeTree;
42
43/**
44 * The HepRep interface.
45 *
46 * Any of these methods may throw a UnsupportedOperationException in Java.
47 *
48 * This interface is NOT final yet.
49 *
50 * @author Mark Donszelmann
51 */
52class HepRep {
53
54public: 
55    /// Destructor.
56    virtual ~HepRep() { /* nop */; }
57
58    /**
59     * Add a layer to the list of layers in this heprep.
60     * The layer is added to the back of the list.
61     *
62     * @param layer name of layer to be added to the back of the list.
63     */
64    virtual void addLayer(std::string layer) = 0;
65
66    /**
67     * Returns the list of layers.
68     *
69     * @return the known layer names, in the order back-to-front.
70     */
71    virtual std::vector<std::string>  getLayerOrder() = 0;
72
73    /**
74     * Add a typetree to this heprep.
75     *
76     * @param typeTree to be added.
77     */
78    virtual void addTypeTree(HepRepTypeTree * typeTree) = 0;
79
80    /**
81     * Remove a typetree from this heprep.
82     *
83     * @param typeTree to be removed.
84     */
85    virtual void removeTypeTree(HepRepTypeTree * typeTree) = 0;
86
87    /**
88     * Returns the collection of all typetrees of this heprep.
89     *
90     * @return collection of HepRepTypeTrees.
91     */
92    virtual std::vector<HepRepTypeTree *>  getTypeTreeList() = 0;
93
94    /**
95     * Returns a named and versioned typetree.
96     *
97     * @param name name of the typetree.
98     * @param version version of the typetree.
99     * @return named and versioned HepRepTypeTree.
100     */
101    virtual HepRepTypeTree * getTypeTree(std::string name, std::string version) = 0;
102
103    /**
104     * Searches for a named type in any of the typetrees.
105     * The first occurrence found is returned.
106     *
107     * @param name name of type.
108     * @return named HepRepType.
109     */
110//    HepRepType* getType(String name);
111    /**
112     * Adds an instancetree to this heprep.
113     *
114     * @param instanceTree to be added.
115     */
116    virtual void addInstanceTree(HepRepInstanceTree * instanceTree) = 0;
117
118    /**
119     * Overlays an instancetree to this heprep, overriding attributes and adding children.
120     *
121     * @param instanceTree to be overlaid.
122     */
123    virtual void overlayInstanceTree(HepRepInstanceTree * instanceTree) = 0;
124
125    /**
126     * Remove an instanectree from this heprep.
127     *
128     * @param instanceTree to be removed.
129     */
130    virtual void removeInstanceTree(HepRepInstanceTree * instanceTree) = 0;
131
132    /**
133     * Returns a collection of instancetrees.
134     *
135     * @return collection of HepRepInstanceTrees.
136     */
137    virtual std::vector<HepRepInstanceTree *>  getInstanceTreeList() = 0;
138
139    /**
140     * Returns a named and versioned instancetree.
141     * FIXME: doc is incorrect here, should only return TOP of the tree. Filling
142     * in should be done by getInstances calls.
143     * <p>
144     * This tree needs to be added to the heprep afterwards.
145     *
146     * @param name name of the instancetree.
147     * @param version version of the instancetree.
148     * @return HepRepIntanceTree
149     */
150    virtual HepRepInstanceTree * getInstanceTreeTop(std::string name, std::string version) = 0;
151
152    /**
153     * Returns a named and versioned instancetree for a list of typenames.
154     * <p>
155     * This tree needs to be added to the heprep afterwards.
156     *
157     * @param name name of the instancetree.
158     * @param version version of the instancetree.
159     * @param typeNames a list of typenames for which we need instancetrees.
160     * @return HepRepIntanceTree
161     */
162    virtual HepRepInstanceTree * getInstances(std::string name, std::string version, std::vector<std::string>  typeNames) = 0;
163
164    /**
165     * Returns a named and versioned instancetree for a list of typenames
166     * after executing some action and for specific filters.
167     *
168     * This tree needs to be added to the heprep afterwards.
169     * <p>
170     * The inversion effect of invertAtts depends on the values of
171     * GetDrawAtts and GetNonDrawAtts as follows:
172     * <UL>
173     * <LI>GetDrawAtts  GetNonDrawAtts  effect of InvertAtts
174     * <LI>FALSE                FALSE                   all Attributes specified will be downloaded
175     * <LI>TRUE             FALSE                       Draw Attributes specified will be omitted, NonDraw Attributes specified will be included
176     * <LI>FALSE                TRUE                    Draw Attributes specified will be included, NonDraw Attributes specified will be omitted
177     * <LI>TRUE             TRUE                        all Attributes specified will be omitted
178     * </UL>
179     *
180     * @param name name of the instancetree.
181     * @param version version of the instancetree.
182     * @param typeNames a list of typenames for which we need instancetrees.
183     * @param actions execute this list of actions before returning.
184     * @param getPoints include the HepRepPoints in the instance tree.
185     * @param getDrawAtts include the Draw attributes in the instance tree.
186     * @param getNonDrawAtts include the Non-Draw attributes in the instance tree.
187     * @param invertAtts list of attributes to be included or not depending on getDrawAtts and getNonDrawAtts.
188     * @return HepRepIntanceTree
189     */
190    virtual HepRepInstanceTree * getInstancesAfterAction(std::string name, std::string version, std::vector<std::string>  typeNames, std::vector<HepRepAction *>  actions, bool getPoints, bool getDrawAtts, bool getNonDrawAtts, std::vector<std::string>  invertAtts) = 0;
191
192    /**
193     * Returns last exception thrown and clears it. Useful for implementations without
194     * exception handling.
195     *
196     * @return last exception and clears it.
197     */
198    virtual std::string checkForException() = 0;
199
200    /**
201     * Returns a deep copy of the heprep, with all its attached trees, where
202     * instances are filtered using a HepRepSelectFilter.
203     *
204     * @param filter to be used for filtering instances.
205     * @return copy of heprep.
206     */
207    virtual HepRep * copy(HepRepSelectFilter * filter = NULL) = 0;
208}; // class
209} // namespace HEPREP
210#endif /* ifndef HEPREP_HEPREP_H */
Note: See TracBrowser for help on using the repository browser.