| 1 | // Copyright FreeHEP, 2005.
|
|---|
| 2 | #ifndef CHEPREP_DEFAULTHEPREPINSTANCE_H
|
|---|
| 3 | #define CHEPREP_DEFAULTHEPREPINSTANCE_H 1
|
|---|
| 4 |
|
|---|
| 5 | #include "cheprep/config.h"
|
|---|
| 6 |
|
|---|
| 7 | #include <string>
|
|---|
| 8 | #include <vector>
|
|---|
| 9 |
|
|---|
| 10 | #include "HEPREP/HepRep.h"
|
|---|
| 11 | #include "HEPREP/HepRepSelectFilter.h"
|
|---|
| 12 | #include "HEPREP/HepRepInstanceTree.h"
|
|---|
| 13 | #include "HEPREP/HepRepInstance.h"
|
|---|
| 14 | #include "HEPREP/HepRepWriter.h"
|
|---|
| 15 | #include "HEPREP/HepRepType.h"
|
|---|
| 16 | #include "HEPREP/HepRepPoint.h"
|
|---|
| 17 | #include "HEPREP/HepRepAttValue.h"
|
|---|
| 18 |
|
|---|
| 19 | #include "DefaultHepRepAttribute.h"
|
|---|
| 20 |
|
|---|
| 21 | /**
|
|---|
| 22 | * @author Mark Donszelmann
|
|---|
| 23 | * @version $Id: DefaultHepRepInstance.h,v 1.3 2005/06/02 21:28:45 duns Exp $
|
|---|
| 24 | */
|
|---|
| 25 | namespace cheprep {
|
|---|
| 26 |
|
|---|
| 27 | class DefaultHepRepInstance : public DefaultHepRepAttribute, public virtual HEPREP::HepRepInstance {
|
|---|
| 28 |
|
|---|
| 29 | private:
|
|---|
| 30 | HEPREP::HepRepInstance* parent;
|
|---|
| 31 | HEPREP::HepRepType* type;
|
|---|
| 32 | std::vector<HEPREP::HepRepPoint*> points;
|
|---|
| 33 | std::vector<HEPREP::HepRepInstance*> instances;
|
|---|
| 34 |
|
|---|
| 35 | public:
|
|---|
| 36 | DefaultHepRepInstance(HEPREP::HepRepInstance* parent, HEPREP::HepRepType* type);
|
|---|
| 37 | DefaultHepRepInstance(HEPREP::HepRepInstanceTree* parent, HEPREP::HepRepType* type);
|
|---|
| 38 | ~DefaultHepRepInstance();
|
|---|
| 39 |
|
|---|
| 40 | void overlay(HEPREP::HepRepInstance * instance);
|
|---|
| 41 | HEPREP::HepRepInstance* copy(HEPREP::HepRepTypeTree* typeTree, HEPREP::HepRepInstance* parent, HEPREP::HepRepSelectFilter* filter);
|
|---|
| 42 | HEPREP::HepRepInstance* copy(HEPREP::HepRepTypeTree* typeTree, HEPREP::HepRepInstanceTree* parent, HEPREP::HepRepSelectFilter* filter);
|
|---|
| 43 | HEPREP::HepRepType* getType();
|
|---|
| 44 | void addPoint(HEPREP::HepRepPoint* point);
|
|---|
| 45 | std::vector<HEPREP::HepRepPoint *> getPoints();
|
|---|
| 46 | HEPREP::HepRepInstance* getSuperInstance();
|
|---|
| 47 | void addInstance(HEPREP::HepRepInstance* instance);
|
|---|
| 48 | void removeInstance(HEPREP::HepRepInstance* instance);
|
|---|
| 49 | std::vector<HEPREP::HepRepInstance *> getInstances();
|
|---|
| 50 |
|
|---|
| 51 | HEPREP::HepRepAttValue* getAttValue(std::string name);
|
|---|
| 52 |
|
|---|
| 53 | void *getParent() { return parent; }
|
|---|
| 54 | };
|
|---|
| 55 |
|
|---|
| 56 | } // cheprep
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | #endif
|
|---|