OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::OutputFormat Struct Reference

Enumeration of output formats. More...

#include <opentrep/OutputFormat.hpp>

Public Types

enum  EN_OutputFormat {
  SHORT = 0, FULL, JSON, PROTOBUF,
  LAST_VALUE
}
 

Public Member Functions

EN_OutputFormat getFormat () const
 
char getFormatAsChar () const
 
std::string getFormatAsString () const
 
const std::string describe () const
 
bool operator== (const EN_OutputFormat &) const
 
 OutputFormat (const EN_OutputFormat &)
 
 OutputFormat (const char iFormat)
 
 OutputFormat (const std::string &iFormat)
 
 OutputFormat (const OutputFormat &)
 

Static Public Member Functions

static const std::string & getLabel (const EN_OutputFormat &)
 
static EN_OutputFormat getFormat (const char)
 
static char getFormatLabel (const EN_OutputFormat &)
 
static std::string getFormatLabelAsString (const EN_OutputFormat &)
 
static std::string describeLabels ()
 

Detailed Description

Enumeration of output formats.

Definition at line 17 of file OutputFormat.hpp.

Member Enumeration Documentation

Enumerator
SHORT 
FULL 
JSON 
PROTOBUF 
LAST_VALUE 

Definition at line 19 of file OutputFormat.hpp.

Constructor & Destructor Documentation

OPENTREP::OutputFormat::OutputFormat ( const EN_OutputFormat iOutputFormat)

Main constructor.

Definition at line 33 of file OutputFormat.cpp.

OPENTREP::OutputFormat::OutputFormat ( const char  iFormat)

Alternative constructor.

Definition at line 61 of file OutputFormat.cpp.

OPENTREP::OutputFormat::OutputFormat ( const std::string &  iFormat)

Alternative constructor.

Definition at line 67 of file OutputFormat.cpp.

References getFormat().

OPENTREP::OutputFormat::OutputFormat ( const OutputFormat iOutputFormat)

Default copy constructor.

Definition at line 27 of file OutputFormat.cpp.

Member Function Documentation

const std::string & OPENTREP::OutputFormat::getLabel ( const EN_OutputFormat iFormat)
static

Get the label as a string (e.g., "Short", "Full", "JSON" or "PROTOBUF").

Definition at line 77 of file OutputFormat.cpp.

OutputFormat::EN_OutputFormat OPENTREP::OutputFormat::getFormat ( const char  iFormatChar)
static

Get the format value from parsing a single char (e.g., 'S', 'F', 'J' or 'P').

Definition at line 39 of file OutputFormat.cpp.

References describeLabels(), FULL, JSON, LAST_VALUE, PROTOBUF, and SHORT.

Referenced by OPENTREP::OpenTrepSearcher::generate(), and OPENTREP::OpenTrepSearcher::search().

char OPENTREP::OutputFormat::getFormatLabel ( const EN_OutputFormat iFormat)
static

Get the label as a single char (e.g., 'S', 'F', 'J' or 'P').

Definition at line 83 of file OutputFormat.cpp.

std::string OPENTREP::OutputFormat::getFormatLabelAsString ( const EN_OutputFormat iFormat)
static

Get the label as a string of a single char (e.g., "S", "F", "J" or "P").

Definition at line 89 of file OutputFormat.cpp.

std::string OPENTREP::OutputFormat::describeLabels ( )
static

List the labels.

Definition at line 96 of file OutputFormat.cpp.

References LAST_VALUE.

Referenced by getFormat().

OutputFormat::EN_OutputFormat OPENTREP::OutputFormat::getFormat ( ) const

Get the enumerated value.

Definition at line 109 of file OutputFormat.cpp.

Referenced by OutputFormat().

char OPENTREP::OutputFormat::getFormatAsChar ( ) const

Get the enumerated value as a short string (e.g., 'S', 'F', 'J' or 'P').

Definition at line 114 of file OutputFormat.cpp.

std::string OPENTREP::OutputFormat::getFormatAsString ( ) const

Get the enumerated value as a short string (e.g., "S", "F", "J" or "P").

Definition at line 120 of file OutputFormat.cpp.

const std::string OPENTREP::OutputFormat::describe ( ) const

Give a description of the structure (e.g., "Short", "Full", "JSON" or "PROTOBUF").

Definition at line 127 of file OutputFormat.cpp.

bool OPENTREP::OutputFormat::operator== ( const EN_OutputFormat iFormat) const

Comparison operator.

Definition at line 135 of file OutputFormat.cpp.


The documentation for this struct was generated from the following files: