OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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

◆ EN_OutputFormat

Enumerator
SHORT 
FULL 
JSON 
PROTOBUF 
LAST_VALUE 

Definition at line 19 of file OutputFormat.hpp.

Constructor & Destructor Documentation

◆ OutputFormat() [1/4]

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

Main constructor.

Definition at line 32 of file OutputFormat.cpp.

Referenced by OutputFormat(), and OutputFormat().

◆ OutputFormat() [2/4]

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

Alternative constructor.

Definition at line 61 of file OutputFormat.cpp.

References getFormat(), and OutputFormat().

◆ OutputFormat() [3/4]

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

Alternative constructor.

Definition at line 66 of file OutputFormat.cpp.

References getFormat().

◆ OutputFormat() [4/4]

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

Default copy constructor.

Definition at line 26 of file OutputFormat.cpp.

References OutputFormat().

Member Function Documentation

◆ getLabel()

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 78 of file OutputFormat.cpp.

◆ getFormat() [1/2]

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(), OutputFormat(), and OPENTREP::OpenTrepSearcher::search().

◆ getFormatLabel()

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 84 of file OutputFormat.cpp.

◆ getFormatLabelAsString()

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 90 of file OutputFormat.cpp.

◆ describeLabels()

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

List the labels.

Definition at line 98 of file OutputFormat.cpp.

References LAST_VALUE.

Referenced by getFormat().

◆ getFormat() [2/2]

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

Get the enumerated value.

Definition at line 111 of file OutputFormat.cpp.

Referenced by OutputFormat().

◆ getFormatAsChar()

char OPENTREP::OutputFormat::getFormatAsChar ( ) const

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

Definition at line 116 of file OutputFormat.cpp.

◆ getFormatAsString()

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

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

Definition at line 122 of file OutputFormat.cpp.

◆ describe()

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

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

Definition at line 129 of file OutputFormat.cpp.

◆ operator==()

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

Comparison operator.

Definition at line 136 of file OutputFormat.cpp.


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