OpenTREP Logo  0.07.20
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
DBType.hpp
Go to the documentation of this file.
1#ifndef __OPENTREP_DBTYPE_HPP
2#define __OPENTREP_DBTYPE_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <string>
9// OpenTrep
11
12namespace OPENTREP {
13
17 struct DBType {
18 public:
19 typedef enum {
20 NODB = 0,
25 } EN_DBType;
26
31 static const std::string& getLabel (const EN_DBType&);
32
36 static EN_DBType getType (const char);
37
41 static char getTypeLabel (const EN_DBType&);
42
46 static std::string getTypeLabelAsString (const EN_DBType&);
47
51 static std::string describeLabels();
52
56 EN_DBType getType() const;
57
61 char getTypeAsChar() const;
62
66 std::string getTypeAsString() const;
67
72 const std::string describe() const;
73
74 public:
78 bool operator== (const EN_DBType&) const;
79 bool operator== (const DBType&) const;
80
81 public:
85 DBType (const EN_DBType&);
89 DBType (const char iType);
93 DBType (const std::string& iType);
97 DBType (const DBType&);
98
99 private:
103 DBType();
104
105
106 private:
110 static const std::string _labels[LAST_VALUE];
114 static const char _typeLabels[LAST_VALUE];
115
116 private:
117 // //////// Attributes /////////
121 EN_DBType _type;
122 };
123
124}
125#endif // __OPENTREP_DBTYPE_HPP
Enumeration of database types.
Definition DBType.hpp:17
static std::string describeLabels()
Definition DBType.cpp:105
DBType(const EN_DBType &)
Definition DBType.cpp:30
const std::string describe() const
Definition DBType.cpp:135
static std::string getTypeLabelAsString(const EN_DBType &)
Definition DBType.cpp:98
EN_DBType getType() const
Definition DBType.cpp:117
bool operator==(const EN_DBType &) const
Definition DBType.cpp:142
std::string getTypeAsString() const
Definition DBType.cpp:128
static char getTypeLabel(const EN_DBType &)
Definition DBType.cpp:93
static const std::string & getLabel(const EN_DBType &)
Definition DBType.cpp:88
char getTypeAsChar() const
Definition DBType.cpp:122