Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
DefaultHepRepAttValue.h
이 파일의 문서화 페이지로 가기
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 
15 namespace cheprep {
16 
18 
19  private:
20  enum { LABELSTRINGS_LEN = 4 };
21  std::string name;
22  int type;
23 
24  // values implemented as separate items, so that they do not take up unnecessary space for an Object
25  // only ONE of these is filled
26  std::string stringValue;
28  double doubleValue;
30  std::vector<double> colorValue;
31 
33  static std::string labelStrings[LABELSTRINGS_LEN];
34 
35  void init();
36 
37  public:
38  DefaultHepRepAttValue(std::string name, std::string value, int showLabel);
39  DefaultHepRepAttValue(std::string name, int64 value, int showLabel);
40  DefaultHepRepAttValue(std::string name, int value, int showLabel);
41  DefaultHepRepAttValue(std::string name, double value, int showLabel);
42  DefaultHepRepAttValue(std::string name, bool value, int showLabel);
43  DefaultHepRepAttValue(std::string name, std::vector<double> value, int showLabel);
45 
47 
48  std::string getName();
49  std::string getLowerCaseName();
50  int getType();
51  std::string getTypeName();
52  int showLabel();
53  std::string getString();
54  std::string getLowerCaseString();
55  int64 getLong();
56  int getInteger();
57  double getDouble();
58  bool getBoolean();
59  std::vector<double> getColor();
60 
61  std::string getAsString();
62  static std::string getAsString(std::vector<double> c);
63  static std::string getAsString(int i);
64  static std::string getAsString(int64 i);
65  static std::string getAsString(double d);
66  static std::string getAsString(bool b);
67 
68  std::string toShowLabel();
69  static std::string toShowLabel(int showLabel);
70 };
71 
72 } // cheprep
73 
74 
75 #endif
76 
const XML_Char * name
Definition: expat.h:151
static std::string labelStrings[LABELSTRINGS_LEN]
HEPREP::HepRepAttValue * copy()
const XML_Char int const XML_Char * value
Definition: expat.h:331
long long int64
Definition: config.h:31
Float_t d
DefaultHepRepAttValue(std::string name, std::string value, int showLabel)