Skip to content

builtin/rest_helper.h

Namespaces

Name
org
org::openapitools
org::openapitools::server
org::openapitools::server::helpers
org::openapitools::server::helpers::sfinae_helpers

Classes

Name
class org::openapitools::server::helpers::ValidationException
struct org::openapitools::server::helpers::sfinae_helpers::NoType
class org::openapitools::server::helpers::sfinae_helpers::EqualsOperatorAvailable

Functions

Name
bool validateRfc3339_date(std::string const & str)
bool validateRfc3339_date_time(std::string const & str)
template <typename T1 ,typename T2 >
NoType
operator==(T1 const & , T2 const & )
template <typename T >
bool
hasOnlyUniqueItems(std::vector< T > const & vec)
std::string toStringValue(const std::string & value)
std::string toStringValue(const int32_t value)
std::string toStringValue(const int64_t value)
std::string toStringValue(const bool value)
std::string toStringValue(const float value)
std::string toStringValue(const double value)
bool fromStringValue(const std::string & inStr, std::string & value)
bool fromStringValue(const std::string & inStr, int32_t & value)
bool fromStringValue(const std::string & inStr, int64_t & value)
bool fromStringValue(const std::string & inStr, bool & value)
bool fromStringValue(const std::string & inStr, float & value)
bool fromStringValue(const std::string & inStr, double & value)
template <typename T >
bool
fromStringValue(std::vector< std::string > const & inStr, std::vector< T > & value)
template <typename T >
bool
fromStringValue(std::string const & inStr, std::vector< T > & value, char separator =',')

Functions Documentation

function validateRfc3339_date

bool validateRfc3339_date(
    std::string const & str
)

Validate a string against the full-date definition of RFC 3339, section 5.6.

function validateRfc3339_date_time

bool validateRfc3339_date_time(
    std::string const & str
)

Validate a string against the date-time definition of RFC 3339, section 5.6.

function operator==

template <typename T1 ,
typename T2 >
NoType operator==(
    T1 const & ,
    T2 const & 
)

function hasOnlyUniqueItems

template <typename T >
bool hasOnlyUniqueItems(
    std::vector< T > const & vec
)

Determine if the given vector only has unique elements. T must provide the == operator.

function toStringValue

std::string toStringValue(
    const std::string & value
)

function toStringValue

std::string toStringValue(
    const int32_t value
)

function toStringValue

std::string toStringValue(
    const int64_t value
)

function toStringValue

std::string toStringValue(
    const bool value
)

function toStringValue

std::string toStringValue(
    const float value
)

function toStringValue

std::string toStringValue(
    const double value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    std::string & value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    int32_t & value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    int64_t & value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    bool & value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    float & value
)

function fromStringValue

bool fromStringValue(
    const std::string & inStr,
    double & value
)

function fromStringValue

template <typename T >
bool fromStringValue(
    std::vector< std::string > const & inStr,
    std::vector< T > & value
)

function fromStringValue

template <typename T >
bool fromStringValue(
    std::string const & inStr,
    std::vector< T > & value,
    char separator =','
)