| [834] | 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_HEPREPFACTORY_H
|
|---|
| 8 | #define HEPREP_HEPREPFACTORY_H 1
|
|---|
| 9 |
|
|---|
| 10 | // Copyright 2000-2005, FreeHEP.
|
|---|
| 11 |
|
|---|
| 12 | #include <iostream>
|
|---|
| 13 | #include <string>
|
|---|
| 14 |
|
|---|
| 15 | namespace HEPREP {
|
|---|
| 16 |
|
|---|
| 17 | class HepRep;
|
|---|
| 18 | class HepRepAction;
|
|---|
| 19 | class HepRepInstance;
|
|---|
| 20 | class HepRepInstanceTree;
|
|---|
| 21 | class HepRepPoint;
|
|---|
| 22 | class HepRepReader;
|
|---|
| 23 | class HepRepTreeID;
|
|---|
| 24 | class HepRepType;
|
|---|
| 25 | class HepRepTypeTree;
|
|---|
| 26 | class HepRepWriter;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * HepRepFactory interface.
|
|---|
| 30 | *
|
|---|
| 31 | * @author Mark Donszelmann
|
|---|
| 32 | */
|
|---|
| 33 | class HepRepFactory {
|
|---|
| 34 |
|
|---|
| 35 | public:
|
|---|
| 36 | /// Destructor.
|
|---|
| 37 | virtual ~HepRepFactory() { /* nop */; }
|
|---|
| 38 |
|
|---|
| 39 | /**
|
|---|
| 40 | * Creates a HepRepReader from a stream.
|
|---|
| 41 | *
|
|---|
| 42 | * @param in input stream.
|
|---|
| 43 | */
|
|---|
| 44 | virtual HepRepReader * createHepRepReader(std::istream * in) = 0;
|
|---|
| 45 |
|
|---|
| 46 | /**
|
|---|
| 47 | * Creates a HepRepReader from a file name.
|
|---|
| 48 | *
|
|---|
| 49 | * @param inputFileName file name.
|
|---|
| 50 | */
|
|---|
| 51 | virtual HepRepReader * createHepRepReader(std::string inputFileName) = 0;
|
|---|
| 52 |
|
|---|
| 53 | /**
|
|---|
| 54 | * Creates a HepRepWriter.
|
|---|
| 55 | *
|
|---|
| 56 | * @param out output stream.
|
|---|
| 57 | * @param randomAccess create a writer in a format that will allow random access (may be ignored).
|
|---|
| 58 | * @param compress create a writer that uses compression (may be ignored).
|
|---|
| 59 | */
|
|---|
| 60 | virtual HepRepWriter * createHepRepWriter(std::ostream * out, bool randomAccess, bool compress) = 0;
|
|---|
| 61 |
|
|---|
| 62 | /**
|
|---|
| 63 | * Creates a HepRepPoint.
|
|---|
| 64 | *
|
|---|
| 65 | * @param instance to add the point to.
|
|---|
| 66 | * @param x x coordinate of point.
|
|---|
| 67 | * @param y y coordinate of point.
|
|---|
| 68 | * @param z z coordinate of point.
|
|---|
| 69 | */
|
|---|
| 70 | virtual HepRepPoint * createHepRepPoint(HepRepInstance * instance, double x, double y, double z) = 0;
|
|---|
| 71 |
|
|---|
| 72 | /**
|
|---|
| 73 | * Creates a HepRepInstance.
|
|---|
| 74 | *
|
|---|
| 75 | * @parent to add the instance to.
|
|---|
| 76 | * @type type the associated type.
|
|---|
| 77 | */
|
|---|
| 78 | virtual HepRepInstance * createHepRepInstance(HepRepInstance * parent, HepRepType * type) = 0;
|
|---|
| 79 |
|
|---|
| 80 | /**
|
|---|
| 81 | * Creates a HepRepInstance.
|
|---|
| 82 | *
|
|---|
| 83 | * @parent to add the instance to.
|
|---|
| 84 | * @type type the associated type.
|
|---|
| 85 | */
|
|---|
| 86 | virtual HepRepInstance * createHepRepInstance(HepRepInstanceTree * parent, HepRepType * type) = 0;
|
|---|
| 87 |
|
|---|
| 88 | /**
|
|---|
| 89 | * Creates a HepRepTreeID.
|
|---|
| 90 | *
|
|---|
| 91 | * @param name of the treeID.
|
|---|
| 92 | * @param version of the treeID.
|
|---|
| 93 | * @param qualifier of the treeID.
|
|---|
| 94 | */
|
|---|
| 95 | virtual HepRepTreeID * createHepRepTreeID(std::string name, std::string version, std::string qualifier = "top-level") = 0;
|
|---|
| 96 |
|
|---|
| 97 | /**
|
|---|
| 98 | * Creates a HepRepAction.
|
|---|
| 99 | *
|
|---|
| 100 | * @param name of the action.
|
|---|
| 101 | * @param expression of the action.
|
|---|
| 102 | */
|
|---|
| 103 | virtual HepRepAction * createHepRepAction(std::string name, std::string expression) = 0;
|
|---|
| 104 |
|
|---|
| 105 | /**
|
|---|
| 106 | * Creates a HepRepInstanceTree.
|
|---|
| 107 | * <p>
|
|---|
| 108 | * The tree needs to be added to the HepRep.
|
|---|
| 109 | *
|
|---|
| 110 | * @param name of the instancetree.
|
|---|
| 111 | * @param version of the instancetree.
|
|---|
| 112 | * @param typeTree associated typetree.
|
|---|
| 113 | */
|
|---|
| 114 | virtual HepRepInstanceTree * createHepRepInstanceTree(std::string name, std::string version, HepRepTreeID * typeTree) = 0;
|
|---|
| 115 |
|
|---|
| 116 | /**
|
|---|
| 117 | * Creates a HepRepType.
|
|---|
| 118 | *
|
|---|
| 119 | * @param parent to add this type to.
|
|---|
| 120 | * @param name of the type to create.
|
|---|
| 121 | */
|
|---|
| 122 | virtual HepRepType * createHepRepType(HepRepTypeTree * parent, std::string name) = 0;
|
|---|
| 123 |
|
|---|
| 124 | /**
|
|---|
| 125 | * Creates a HepRepType.
|
|---|
| 126 | *
|
|---|
| 127 | * @param parent to add this type to.
|
|---|
| 128 | * @param name of the type to create.
|
|---|
| 129 | */
|
|---|
| 130 | virtual HepRepType * createHepRepType(HepRepType * parent, std::string name) = 0;
|
|---|
| 131 |
|
|---|
| 132 | /**
|
|---|
| 133 | * Creates a HepRepTypeTree.
|
|---|
| 134 | * <p>
|
|---|
| 135 | * The tree needs to be added to the HepRep.
|
|---|
| 136 | *
|
|---|
| 137 | * @param treeID to name the tree being created.
|
|---|
| 138 | */
|
|---|
| 139 | virtual HepRepTypeTree * createHepRepTypeTree(HepRepTreeID * treeID) = 0;
|
|---|
| 140 |
|
|---|
| 141 | /**
|
|---|
| 142 | * Creates a HepRep.
|
|---|
| 143 | *
|
|---|
| 144 | */
|
|---|
| 145 | virtual HepRep * createHepRep() = 0;
|
|---|
| 146 | }; // class
|
|---|
| 147 | } // namespace HEPREP
|
|---|
| 148 | #endif /* ifndef HEPREP_HEPREPFACTORY_H */
|
|---|