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 oatpp::data::mapping::type::ObjectWrapper over oatpp::base::StrBuffer

namespace oatpp { namespace data { namespace mapping { namespace type { 
  class String : public oatpp::data::mapping::type::ObjectWrapper<oatpp::base::StrBuffer, __class::String> {}
}}}}

Primitive

Template for primitive mapping-enabled types.

  • @tparam ValueType - type of the value ex.: v_int32.
  • @tparam Clazz - Class holding static class information.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  template<typename ValueType, class Clazz>
  class Primitive : public oatpp::base::Countable {}
}}}}

Methods

Return Type Name Summary
[none] Primitive Constructor.
std::shared_ptr<Primitive> createShared Create shared primitive.
std::shared_ptr<Countable> createAbstract Create shared primitive upcasted to oatpp::base::Countable.
void setValue Set value.
ValueType getValue Get value.

Primitive::Primitive

Constructor.

  • @param value - initial value.

Primitive(const ValueType& value)
  : m_value(value)

Primitive::createShared

Create shared primitive.

  • @param value - initial value.
  • @return - std::shared_ptr to Primitive.

static std::shared_ptr<Primitive> createShared(const ValueType& value)

Primitive::createAbstract

Create shared primitive upcasted to oatpp::base::Countable.

static std::shared_ptr<Countable> createAbstract(const ValueType& value)

Primitive::setValue

Set value.

  • @param value.

void setValue(const ValueType& value)

Primitive::getValue

Get value.

  • @return - value.

ValueType getValue()

Primitive::ObjectWrapper

ObjectWrapper template for Primitive.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  template<typename ValueType, class Clazz>
  class Primitive : public oatpp::base::Countable {
    class ObjectWrapper : public oatpp::data::mapping::type::ObjectWrapper<Primitive, Clazz> {}
  };
}}}}

Int8

Namespace: oatpp::data::mapping::type

Int8 is an ObjectWrapper over Primitive and __class::Int8.

typedef Primitive<v_int8, __class::Int8>::ObjectWrapper Int8

Int16

Namespace: oatpp::data::mapping::type

Int16 is an ObjectWrapper over Primitive and __class::Int16.

typedef Primitive<v_int16, __class::Int16>::ObjectWrapper Int16

Int32

Namespace: oatpp::data::mapping::type

Int32 is an ObjectWrapper over Primitive and __class::Int32.

typedef Primitive<v_int32, __class::Int32>::ObjectWrapper Int32

Int64

Namespace: oatpp::data::mapping::type

Int64 is an ObjectWrapper over Primitive and __class::Int64.

typedef Primitive<v_int64, __class::Int64>::ObjectWrapper Int64

Float32

Namespace: oatpp::data::mapping::type

Float32 is an ObjectWrapper over Primitive and __class::Float32.

typedef Primitive<v_float32, __class::Float32>::ObjectWrapper Float32

Float64

Namespace: oatpp::data::mapping::type

Float64 is an ObjectWrapper over Primitive and __class::Float64.

typedef Primitive<v_float64, __class::Float64>::ObjectWrapper Float64

Boolean

Namespace: oatpp::data::mapping::type

Boolean is an ObjectWrapper over Primitive and __class::Boolean.

typedef Primitive<bool, __class::Boolean>::ObjectWrapper Boolean