[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_HEPREPATTRIBUTE_H |
---|
| 8 | #define HEPREP_HEPREPATTRIBUTE_H 1 |
---|
| 9 | |
---|
| 10 | // Copyright 2000-2005, FreeHEP. |
---|
| 11 | |
---|
| 12 | #include <set> |
---|
| 13 | #include <string> |
---|
| 14 | #include <vector> |
---|
| 15 | |
---|
| 16 | #include "HEPREP/Types.h" |
---|
| 17 | |
---|
| 18 | #include "HEPREP/HepRepConstants.h" |
---|
| 19 | |
---|
| 20 | namespace HEPREP { |
---|
| 21 | |
---|
| 22 | class HepRepAttValue; |
---|
| 23 | |
---|
| 24 | /** |
---|
| 25 | * HepRepAttribute interface. |
---|
| 26 | * |
---|
| 27 | * @author Mark Donszelmann |
---|
| 28 | */ |
---|
| 29 | class HepRepAttribute { |
---|
| 30 | |
---|
| 31 | public: |
---|
| 32 | /// Destructor. |
---|
| 33 | virtual ~HepRepAttribute() { /* nop */; } |
---|
| 34 | |
---|
| 35 | /** |
---|
| 36 | * Adds an attValue. |
---|
| 37 | * |
---|
| 38 | * @param attValue to be added. |
---|
| 39 | */ |
---|
| 40 | virtual void addAttValue(HepRepAttValue * attValue) = 0; |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | /** |
---|
| 44 | * Adds a char* attValue as a String. |
---|
| 45 | * This call should be mapped to addAttValue(std::string, std::string, int); and necessary |
---|
| 46 | * because C++ converts char* into bool and would thus call addAttValue(std::string, bool, int) |
---|
| 47 | * for a call such as addAttValue("drawAs", "Cylinder", 0); |
---|
| 48 | * |
---|
| 49 | * @param key name of attValue |
---|
| 50 | * @param value value of attValue |
---|
| 51 | * @param showLabel show this as label |
---|
| 52 | */ |
---|
| 53 | virtual void addAttValue(std::string key, char* value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 54 | /** |
---|
| 55 | * Adds an attValue. |
---|
| 56 | * |
---|
| 57 | * @param key name of attValue |
---|
| 58 | * @param value value of attValue |
---|
| 59 | * @param showLabel show this as label |
---|
| 60 | */ |
---|
| 61 | virtual void addAttValue(std::string key, std::string value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 62 | |
---|
| 63 | /** |
---|
| 64 | * Adds an attValue. |
---|
| 65 | * |
---|
| 66 | * @param key name of attValue |
---|
| 67 | * @param value value of attValue |
---|
| 68 | * @param showLabel show this as label |
---|
| 69 | */ |
---|
| 70 | virtual void addAttValue(std::string key, int64 value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 71 | |
---|
| 72 | /** |
---|
| 73 | * Adds an attValue. |
---|
| 74 | * |
---|
| 75 | * @param key name of attValue |
---|
| 76 | * @param value value of attValue |
---|
| 77 | * @param showLabel show this as label |
---|
| 78 | */ |
---|
| 79 | virtual void addAttValue(std::string key, int value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 80 | |
---|
| 81 | /** |
---|
| 82 | * Adds an attValue. |
---|
| 83 | * |
---|
| 84 | * @param key name of attValue |
---|
| 85 | * @param value value of attValue |
---|
| 86 | * @param showLabel show this as label |
---|
| 87 | */ |
---|
| 88 | virtual void addAttValue(std::string key, double value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 89 | |
---|
| 90 | /** |
---|
| 91 | * Adds an attValue. |
---|
| 92 | * |
---|
| 93 | * @param key name of attValue |
---|
| 94 | * @param value value of attValue |
---|
| 95 | * @param showLabel show this as label |
---|
| 96 | */ |
---|
| 97 | virtual void addAttValue(std::string key, bool value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 98 | |
---|
| 99 | /** |
---|
| 100 | * Adds a Color attValue. |
---|
| 101 | * |
---|
| 102 | * @param key name of attValue |
---|
| 103 | * @param value value of attValue |
---|
| 104 | * @param showLabel show this as label |
---|
| 105 | */ |
---|
| 106 | virtual void addAttValue(std::string key, std::vector<double> value, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 107 | |
---|
| 108 | /** |
---|
| 109 | * Adds a Color attValue. |
---|
| 110 | * |
---|
| 111 | * @param key name of attValue |
---|
| 112 | * @param red color |
---|
| 113 | * @param green color |
---|
| 114 | * @param blue color |
---|
| 115 | * @param alpha value |
---|
| 116 | * @param showLabel show this as label |
---|
| 117 | */ |
---|
| 118 | virtual void addAttValue(std::string key, double red, double green, double blue, double alpha = 1.0, int showLabel = HepRepConstants::SHOW_NONE) = 0; |
---|
| 119 | |
---|
| 120 | /** |
---|
| 121 | * Remove the attvalue named by key. |
---|
| 122 | * |
---|
| 123 | * @param key name of the attValue to be removed. |
---|
| 124 | * @return removed HepRepAttValue, or null if not removed. |
---|
| 125 | */ |
---|
| 126 | virtual HepRepAttValue * removeAttValue(std::string key) = 0; |
---|
| 127 | |
---|
| 128 | /** |
---|
| 129 | * Returns the attValue specified by name. This attValue is normally searched |
---|
| 130 | * on the node itself and then on its type, moving up the typetree. |
---|
| 131 | * |
---|
| 132 | * @param name of attribute value. |
---|
| 133 | * @return attribute value. |
---|
| 134 | */ |
---|
| 135 | virtual HepRepAttValue * getAttValue(std::string name) = 0; |
---|
| 136 | |
---|
| 137 | /** |
---|
| 138 | * Returns a collection of all attribute values from this node. |
---|
| 139 | * |
---|
| 140 | * @return collection of HepRepAttValues. |
---|
| 141 | */ |
---|
| 142 | virtual std::set<HepRepAttValue *> getAttValuesFromNode() = 0; |
---|
| 143 | |
---|
| 144 | /** |
---|
| 145 | * Returns a named attribute value from this node. |
---|
| 146 | * |
---|
| 147 | * @param lowerCaseName name in all lowercase. |
---|
| 148 | * @return corresponding HepRepAttValue. |
---|
| 149 | */ |
---|
| 150 | virtual HepRepAttValue * getAttValueFromNode(std::string lowerCaseName) = 0; |
---|
| 151 | }; // class |
---|
| 152 | } // namespace HEPREP |
---|
| 153 | #endif /* ifndef HEPREP_HEPREPATTRIBUTE_H */ |
---|