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

Enumeration of database types. More...

#include <opentrep/DBType.hpp>

Public Types

enum  EN_DBType { NODB = 0, SQLITE3, MYSQL, LAST_VALUE }
 

Public Member Functions

EN_DBType getType () const
 
char getTypeAsChar () const
 
std::string getTypeAsString () const
 
const std::string describe () const
 
bool operator== (const EN_DBType &) const
 
bool operator== (const DBType &) const
 
 DBType (const EN_DBType &)
 
 DBType (const char iType)
 
 DBType (const std::string &iType)
 
 DBType (const DBType &)
 

Static Public Member Functions

static const std::string & getLabel (const EN_DBType &)
 
static EN_DBType getType (const char)
 
static char getTypeLabel (const EN_DBType &)
 
static std::string getTypeLabelAsString (const EN_DBType &)
 
static std::string describeLabels ()
 

Detailed Description

Enumeration of database types.

Definition at line 17 of file DBType.hpp.

Member Enumeration Documentation

Enumerator
NODB 
SQLITE3 
MYSQL 
LAST_VALUE 

Definition at line 19 of file DBType.hpp.

Constructor & Destructor Documentation

OPENTREP::DBType::DBType ( const EN_DBType iDBType)

Main constructor.

Definition at line 30 of file DBType.cpp.

OPENTREP::DBType::DBType ( const char  iType)

Alternative constructor.

Definition at line 56 of file DBType.cpp.

OPENTREP::DBType::DBType ( const std::string &  iType)

Alternative constructor.

Definition at line 61 of file DBType.cpp.

References describeLabels(), LAST_VALUE, MYSQL, NODB, and SQLITE3.

OPENTREP::DBType::DBType ( const DBType iDBType)

Default copy constructor.

Definition at line 25 of file DBType.cpp.

Member Function Documentation

const std::string & OPENTREP::DBType::getLabel ( const EN_DBType iType)
static

Get the label as a string (e.g., "NoDB", "SQLite3", "MySQL/MariaDB").

Definition at line 84 of file DBType.cpp.

DBType::EN_DBType OPENTREP::DBType::getType ( const char  iTypeChar)
static

Get the type value from parsing a single char (e.g., 'N', 'S', 'M')

Definition at line 35 of file DBType.cpp.

References describeLabels(), LAST_VALUE, MYSQL, NODB, and SQLITE3.

char OPENTREP::DBType::getTypeLabel ( const EN_DBType iType)
static

Get the label as a single char (e.g., 'N', 'S', 'M')

Definition at line 89 of file DBType.cpp.

std::string OPENTREP::DBType::getTypeLabelAsString ( const EN_DBType iType)
static

Get the label as a string of a single char (e.g., 'N', 'S', 'M')

Definition at line 94 of file DBType.cpp.

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

List the labels.

Definition at line 101 of file DBType.cpp.

References LAST_VALUE.

Referenced by DBType(), and getType().

DBType::EN_DBType OPENTREP::DBType::getType ( ) const

Get the enumerated value.

Definition at line 113 of file DBType.cpp.

char OPENTREP::DBType::getTypeAsChar ( ) const

Get the enumerated value as a short string (e.g., "N", "S", "M")

Definition at line 118 of file DBType.cpp.

std::string OPENTREP::DBType::getTypeAsString ( ) const

Get the enumerated value as a short string (e.g., "N", "S", "M")

Definition at line 124 of file DBType.cpp.

const std::string OPENTREP::DBType::describe ( ) const
bool OPENTREP::DBType::operator== ( const EN_DBType iType) const

Comparison operators.

Definition at line 138 of file DBType.cpp.

bool OPENTREP::DBType::operator== ( const DBType iDBType) const

Definition at line 143 of file DBType.cpp.


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