| [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_HEPREPWRITER_H
|
|---|
| 8 | #define HEPREP_HEPREPWRITER_H 1
|
|---|
| 9 |
|
|---|
| 10 | // Copyright 2002-2005, Freehep.
|
|---|
| 11 |
|
|---|
| 12 | #include <string>
|
|---|
| 13 | #include <vector>
|
|---|
| 14 |
|
|---|
| 15 | namespace HEPREP {
|
|---|
| 16 |
|
|---|
| 17 | class HepRep;
|
|---|
| 18 | class HepRepAction;
|
|---|
| 19 | class HepRepAttDef;
|
|---|
| 20 | class HepRepAttValue;
|
|---|
| 21 | class HepRepAttribute;
|
|---|
| 22 | class HepRepDefinition;
|
|---|
| 23 | class HepRepInstance;
|
|---|
| 24 | class HepRepInstanceTree;
|
|---|
| 25 | class HepRepPoint;
|
|---|
| 26 | class HepRepTreeID;
|
|---|
| 27 | class HepRepType;
|
|---|
| 28 | class HepRepTypeTree;
|
|---|
| 29 |
|
|---|
| 30 | /**
|
|---|
| 31 | * HepRepWriter interface.
|
|---|
| 32 | *
|
|---|
| 33 | * @author Mark Donszelmann
|
|---|
| 34 | */
|
|---|
| 35 | class HepRepWriter {
|
|---|
| 36 |
|
|---|
| 37 | public:
|
|---|
| 38 | /// Destructor.
|
|---|
| 39 | virtual ~HepRepWriter() { /* nop */; }
|
|---|
| 40 |
|
|---|
| 41 | /**
|
|---|
| 42 | * Adds a property, to be written to the HepRep file when closed.
|
|---|
| 43 | *
|
|---|
| 44 | * @param key
|
|---|
| 45 | * @param value
|
|---|
| 46 | * @return false in case of a stream problem.
|
|---|
| 47 | */
|
|---|
| 48 | virtual bool addProperty(std::string key, std::string value) = 0;
|
|---|
| 49 |
|
|---|
| 50 | /**
|
|---|
| 51 | * Closes the writer and its underlying stream.
|
|---|
| 52 | *
|
|---|
| 53 | * @return false in case of a stream problem.
|
|---|
| 54 | */
|
|---|
| 55 | virtual bool close() = 0;
|
|---|
| 56 |
|
|---|
| 57 | /**
|
|---|
| 58 | * Writes a HepRep.
|
|---|
| 59 | *
|
|---|
| 60 | * @param heprep to be written.
|
|---|
| 61 | * @param name for the heprep to be written (for tagged access), may be ommited.
|
|---|
| 62 | * @return false in case of a stream problem.
|
|---|
| 63 | */
|
|---|
| 64 | virtual bool write(HepRep * heprep, std::string name) = 0;
|
|---|
| 65 |
|
|---|
| 66 | /**
|
|---|
| 67 | * Writes the layerOrder.
|
|---|
| 68 | *
|
|---|
| 69 | * @param layerOrder to be written.
|
|---|
| 70 | * @return false in case of a stream problem.
|
|---|
| 71 | */
|
|---|
| 72 | virtual bool write(std::vector<std::string> layerOrder) = 0;
|
|---|
| 73 |
|
|---|
| 74 | /**
|
|---|
| 75 | * Writes a HepRepTypeTree.
|
|---|
| 76 | *
|
|---|
| 77 | * @param typeTree to be written.
|
|---|
| 78 | * @return false in case of a stream problem.
|
|---|
| 79 | */
|
|---|
| 80 | virtual bool write(HepRepTypeTree * typeTree) = 0;
|
|---|
| 81 |
|
|---|
| 82 | /**
|
|---|
| 83 | * Writes a HepRepType.
|
|---|
| 84 | *
|
|---|
| 85 | * @param type to be written.
|
|---|
| 86 | * @return false in case of a stream problem.
|
|---|
| 87 | */
|
|---|
| 88 | virtual bool write(HepRepType * type) = 0;
|
|---|
| 89 |
|
|---|
| 90 | /**
|
|---|
| 91 | * Writes a HepRepTreeID.
|
|---|
| 92 | *
|
|---|
| 93 | * @param treeID to be written.
|
|---|
| 94 | * @return false in case of a stream problem.
|
|---|
| 95 | */
|
|---|
| 96 | virtual bool write(HepRepTreeID * treeID) = 0;
|
|---|
| 97 |
|
|---|
| 98 | /**
|
|---|
| 99 | * Writes a HepRepAction.
|
|---|
| 100 | *
|
|---|
| 101 | * @param action to be written.
|
|---|
| 102 | * @return false in case of a stream problem.
|
|---|
| 103 | */
|
|---|
| 104 | virtual bool write(HepRepAction * action) = 0;
|
|---|
| 105 |
|
|---|
| 106 | /**
|
|---|
| 107 | * Writes a HepRepInstanceTree.
|
|---|
| 108 | *
|
|---|
| 109 | * @param instanceTree to be written.
|
|---|
| 110 | * @return false in case of a stream problem.
|
|---|
| 111 | */
|
|---|
| 112 | virtual bool write(HepRepInstanceTree * instanceTree) = 0;
|
|---|
| 113 |
|
|---|
| 114 | /**
|
|---|
| 115 | * Writes a HepRepInstance.
|
|---|
| 116 | *
|
|---|
| 117 | * @param instance to be written.
|
|---|
| 118 | * @return false in case of a stream problem.
|
|---|
| 119 | */
|
|---|
| 120 | virtual bool write(HepRepInstance * instance) = 0;
|
|---|
| 121 |
|
|---|
| 122 | /**
|
|---|
| 123 | * Writes a HepRepPoint.
|
|---|
| 124 | *
|
|---|
| 125 | * @param point to be written.
|
|---|
| 126 | * @return false in case of a stream problem.
|
|---|
| 127 | */
|
|---|
| 128 | virtual bool write(HepRepPoint * point) = 0;
|
|---|
| 129 |
|
|---|
| 130 | /**
|
|---|
| 131 | * Writes a HepRepAttribute.
|
|---|
| 132 | *
|
|---|
| 133 | * @param attribute to be written.
|
|---|
| 134 | * @return false in case of a stream problem.
|
|---|
| 135 | */
|
|---|
| 136 | virtual bool write(HepRepAttribute * attribute) = 0;
|
|---|
| 137 |
|
|---|
| 138 | /**
|
|---|
| 139 | * Writes a HepRepDefinition.
|
|---|
| 140 | *
|
|---|
| 141 | * @param definition to be written.
|
|---|
| 142 | * @return false in case of a stream problem.
|
|---|
| 143 | */
|
|---|
| 144 | virtual bool write(HepRepDefinition * definition) = 0;
|
|---|
| 145 |
|
|---|
| 146 | /**
|
|---|
| 147 | * Writes a HepRepAttValue.
|
|---|
| 148 | *
|
|---|
| 149 | * @param attValue to be written.
|
|---|
| 150 | * @return false in case of a stream problem.
|
|---|
| 151 | */
|
|---|
| 152 | virtual bool write(HepRepAttValue * attValue) = 0;
|
|---|
| 153 |
|
|---|
| 154 | /**
|
|---|
| 155 | * Writes a HepRepAttDef.
|
|---|
| 156 | *
|
|---|
| 157 | * @param attDef to be written.
|
|---|
| 158 | * @return false in case of a stream problem.
|
|---|
| 159 | */
|
|---|
| 160 | virtual bool write(HepRepAttDef * attDef) = 0;
|
|---|
| 161 | }; // class
|
|---|
| 162 | } // namespace HEPREP
|
|---|
| 163 | #endif /* ifndef HEPREP_HEPREPWRITER_H */
|
|---|