# Primitive.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/data/mapping/type/Primitive.hpp"
# String
Mapping-enables String is type::ObjectWrapper over std::string
;
namespace oatpp { namespace data { namespace mapping { namespace type {
class String : public type::ObjectWrapper<std::string, __class::String> {}
}}}}
# Methods
Return Type | Name | Summary |
---|---|---|
String | loadFromFile | Load data from file and store in oatpp::String. |
void | saveToFile | Save content of the buffer to file. |
bool | equalsCI_ASCII | Multiple implementations:
|
std::string | getValue | Get underlying value. |
# String::loadFromFile
Load data from file and store in oatpp::String.
- @param filename - name of the file.
- @return - oatpp::String.
static String loadFromFile(const char* filename)
# String::saveToFile
Save content of the buffer to file.
- @param filename - name of the file.
void saveToFile(const char* filename) const
# String::equalsCI_ASCII
- Case insensitive compare (ASCII only).
- @param other
- @return
bool equalsCI_ASCII(const std::string& other)
- Case insensitive compare (ASCII only).
- @param other
- @return
bool equalsCI_ASCII(const String& other)
- Case insensitive compare (ASCII only).
- @param other
- @return
bool equalsCI_ASCII(const char* str)
# String::getValue
Get underlying value.
- @param defaultValue - value to return in case stored value is
nullptr
. - @return - value or
defaultValue
if stored value isnullptr
.
std::string getValue(const std::string& defaultValue) const
# Primitive
Template for primitive mapping-enabled types.
- @tparam TValueType - type of the value ex.: v_int64.
- @tparam Clazz - Class holding static class information.
namespace oatpp { namespace data { namespace mapping { namespace type {
template<typename TValueType, class Clazz>
class Primitive : public type::ObjectWrapper<TValueType, Clazz> {}
}}}}
# Boolean
ObjectWrapper for Boolean.
namespace oatpp { namespace data { namespace mapping { namespace type {
class Boolean : public type::ObjectWrapper<bool, __class::Boolean> {}
}}}}
# Int8
Namespace: oatpp::data::mapping::type
Int8 is an ObjectWrapper over v_int8
and __class::Int8.
typedef Primitive<v_int8, __class::Int8> Int8
# UInt8
Namespace: oatpp::data::mapping::type
UInt8 is an ObjectWrapper over v_uint8
and __class::UInt8.
typedef Primitive<v_uint8, __class::UInt8> UInt8
# Int16
Namespace: oatpp::data::mapping::type
Int16 is an ObjectWrapper over v_int16
and __class::Int16.
typedef Primitive<v_int16, __class::Int16> Int16
# UInt16
Namespace: oatpp::data::mapping::type
UInt16 is an ObjectWrapper over v_uint16
and __class::UInt16.
typedef Primitive<v_uint16, __class::UInt16> UInt16
# Int32
Namespace: oatpp::data::mapping::type
Int32 is an ObjectWrapper over v_int32
and __class::Int32.
typedef Primitive<v_int32, __class::Int32> Int32
# UInt32
Namespace: oatpp::data::mapping::type
UInt32 is an ObjectWrapper over v_uint32
and __class::UInt32.
typedef Primitive<v_uint32, __class::UInt32> UInt32
# Int64
Namespace: oatpp::data::mapping::type
Int64 is an ObjectWrapper over v_int64
and __class::Int64.
typedef Primitive<v_int64, __class::Int64> Int64
# UInt64
Namespace: oatpp::data::mapping::type
UInt64 is an ObjectWrapper over v_uint64
and __class::UInt64.
typedef Primitive<v_uint64, __class::UInt64> UInt64
# Float32
Namespace: oatpp::data::mapping::type
Float32 is an ObjectWrapper over v_float32
and __class::Float32.
typedef Primitive<v_float32, __class::Float32> Float32
# Float64
Namespace: oatpp::data::mapping::type
Float64 is an ObjectWrapper over v_float64
and __class::Float64.
typedef Primitive<v_float64, __class::Float64> Float64