0.07.7
C++ Open Travel Request Parsing Library
OutputFormat.hpp
Go to the documentation of this file.
1
#ifndef __OPENTREP_OUTPUTFORMAT_HPP
2
#define __OPENTREP_OUTPUTFORMAT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <string>
9
// OpenTrep
10
#include <
opentrep/OPENTREP_Types.hpp
>
11
12
namespace
OPENTREP
{
13
17
struct
OutputFormat
{
18
public
:
19
typedef
enum
{
20
SHORT
= 0,
21
FULL
,
22
JSON
,
23
PROTOBUF
,
24
LAST_VALUE
25
}
EN_OutputFormat
;
26
30
static
const
std::string&
getLabel
(
const
EN_OutputFormat
&);
31
36
static
EN_OutputFormat
getFormat
(
const
char
);
37
41
static
char
getFormatLabel
(
const
EN_OutputFormat
&);
42
46
static
std::string
getFormatLabelAsString
(
const
EN_OutputFormat
&);
47
51
static
std::string
describeLabels
();
52
56
EN_OutputFormat
getFormat
()
const
;
57
61
char
getFormatAsChar
()
const
;
62
66
std::string
getFormatAsString
()
const
;
67
72
const
std::string
describe
()
const
;
73
74
public
:
78
bool
operator==
(
const
EN_OutputFormat
&)
const
;
79
80
public
:
84
OutputFormat
(
const
EN_OutputFormat
&);
88
OutputFormat
(
const
char
iFormat);
92
OutputFormat
(
const
std::string& iFormat);
96
OutputFormat
(
const
OutputFormat
&);
97
98
private
:
102
OutputFormat
();
103
104
105
private
:
109
static
const
std::string _labels[
LAST_VALUE
];
113
static
const
char
_formatLabels[
LAST_VALUE
];
114
115
private
:
116
// //////// Attributes /////////
120
EN_OutputFormat
_format;
121
};
122
123
}
124
#endif // __OPENTREP_OUTPUTFORMAT_HPP
OPENTREP::OutputFormat::SHORT
Definition:
OutputFormat.hpp:20
OPENTREP::OutputFormat::getFormatAsString
std::string getFormatAsString() const
Definition:
OutputFormat.cpp:122
OPENTREP_Types.hpp
OPENTREP::OutputFormat::FULL
Definition:
OutputFormat.hpp:21
OPENTREP::OutputFormat::LAST_VALUE
Definition:
OutputFormat.hpp:24
OPENTREP::OutputFormat::getFormatLabelAsString
static std::string getFormatLabelAsString(const EN_OutputFormat &)
Definition:
OutputFormat.cpp:91
OPENTREP::OutputFormat::JSON
Definition:
OutputFormat.hpp:22
OPENTREP::OutputFormat::getLabel
static const std::string & getLabel(const EN_OutputFormat &)
Definition:
OutputFormat.cpp:79
OPENTREP::OutputFormat::getFormat
EN_OutputFormat getFormat() const
Definition:
OutputFormat.cpp:111
OPENTREP
Definition:
BasChronometer.cpp:10
OPENTREP::OutputFormat::operator==
bool operator==(const EN_OutputFormat &) const
Definition:
OutputFormat.cpp:137
OPENTREP::OutputFormat
Enumeration of output formats.
Definition:
OutputFormat.hpp:17
OPENTREP::OutputFormat::EN_OutputFormat
EN_OutputFormat
Definition:
OutputFormat.hpp:19
OPENTREP::OutputFormat::getFormatLabel
static char getFormatLabel(const EN_OutputFormat &)
Definition:
OutputFormat.cpp:85
OPENTREP::OutputFormat::describe
const std::string describe() const
Definition:
OutputFormat.cpp:129
OPENTREP::OutputFormat::getFormatAsChar
char getFormatAsChar() const
Definition:
OutputFormat.cpp:116
OPENTREP::OutputFormat::PROTOBUF
Definition:
OutputFormat.hpp:23
OPENTREP::OutputFormat::describeLabels
static std::string describeLabels()
Definition:
OutputFormat.cpp:98
Generated on Sun Nov 14 2021 19:26:13 for OpenTREP by
1.8.14