Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
DefaultHepRepAttValue.h
Go to the documentation of this file.
1// Copyright FreeHEP, 2005.
2#ifndef CHEPREP_DEFAULTHEPREPATTVALUE_H
3#define CHEPREP_DEFAULTHEPREPATTVALUE_H 1
4
5#include "cheprep/config.h"
6
7#include <string>
8
10
11/**
12 * @author Mark Donszelmann
13 */
14namespace cheprep {
15
17
18 private:
19 enum { LABELSTRINGS_LEN = 4 };
20 std::string name;
21 int type;
22
23 // values implemented as separate items, so that they do not take up unnecessary space for an Object
24 // only ONE of these is filled
25 std::string stringValue;
26 int64 longValue;
27 double doubleValue;
28 bool booleanValue;
29 std::vector<double> colorValue;
30
31 int showLabelValue;
32 static std::string labelStrings[LABELSTRINGS_LEN];
33
34 void init();
35
36 public:
37 DefaultHepRepAttValue(std::string name, std::string value, int showLabel);
38 DefaultHepRepAttValue(std::string name, int64 value, int showLabel);
39 DefaultHepRepAttValue(std::string name, int value, int showLabel);
40 DefaultHepRepAttValue(std::string name, double value, int showLabel);
41 DefaultHepRepAttValue(std::string name, bool value, int showLabel);
42 DefaultHepRepAttValue(std::string name, std::vector<double> value, int showLabel);
44
46
47 std::string getName();
48 std::string getLowerCaseName();
49 int getType();
50 std::string getTypeName();
51 int showLabel();
52 std::string getString();
53 std::string getLowerCaseString();
54 int64 getLong();
55 int getInteger();
56 double getDouble();
57 bool getBoolean();
58 std::vector<double> getColor();
59
60 std::string getAsString();
61 static std::string getAsString(std::vector<double> c);
62 static std::string getAsString(int i);
63 static std::string getAsString(int64 i);
64 static std::string getAsString(double d);
65 static std::string getAsString(bool b);
66
67 std::string toShowLabel();
68 static std::string toShowLabel(int showLabel);
69};
70
71} // cheprep
72
73
74#endif
75
HEPREP::HepRepAttValue * copy()
long long int64
Definition: config.h:30