OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScoreType.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_BAS_SCORETYPE_HPP
2 #define __OPENTREP_BAS_SCORETYPE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // OpenTrep
11 
12 namespace OPENTREP {
13 
25  struct ScoreType : public StructAbstract {
26  public:
27  typedef enum {
36  } EN_ScoreType;
37 
41  static const std::string& getLabel (const EN_ScoreType&);
42 
46  const std::string& getLongLabel() const;
47 
51  static char getTypeLabel (const EN_ScoreType&);
52 
56  static std::string getTypeLabelAsString (const EN_ScoreType&);
57 
61  static std::string describeLabels();
62 
66  EN_ScoreType getType() const;
67 
71  std::string getTypeAsString() const;
72 
77  std::string describe() const;
78 
83  bool isIndividualScore() const;
84 
89  static bool isIndividualScore (const EN_ScoreType&);
90 
91 
92  public:
96  bool operator== (const EN_ScoreType&) const;
97 
98  public:
102  ScoreType (const EN_ScoreType&);
103 
107  ScoreType (const char iType);
108 
109 
110  private:
114  static const std::string _labels[LAST_VALUE];
115 
119  static const char _typeLabels[LAST_VALUE];
120 
121 
122  private:
123  // //////// Attributes /////////
127  EN_ScoreType _type;
128  };
129 
130 }
131 #endif // __OPENTREP_BAS_SCORETYPE_HPP
static char getTypeLabel(const EN_ScoreType &)
Definition: ScoreType.cpp:60
bool isIndividualScore() const
Definition: ScoreType.cpp:104
static std::string describeLabels()
Definition: ScoreType.cpp:73
Base class for the light structures.
std::string describe() const
Definition: ScoreType.cpp:97
EN_ScoreType getType() const
Definition: ScoreType.cpp:85
std::string getTypeAsString() const
Definition: ScoreType.cpp:90
static std::string getTypeLabelAsString(const EN_ScoreType &)
Definition: ScoreType.cpp:66
Enumeration of score types.
Definition: ScoreType.hpp:25
const std::string & getLongLabel() const
Definition: ScoreType.cpp:50
bool operator==(const EN_ScoreType &) const
Definition: ScoreType.cpp:119
ScoreType(const EN_ScoreType &)
Definition: ScoreType.cpp:23
static const std::string & getLabel(const EN_ScoreType &)
Definition: ScoreType.cpp:55