Type.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/core/data/mapping/type/Type.hpp"

Void

Void Object Class.

namespace oatpp { namespace data { namespace mapping { namespace type { namespace __class { 
  class Void {}
}}}}}

Fields

Type Name Summary
const char* const CLASS_NAME Name of the class - CLASS_NAME = "Void".

Methods

Return Type Name Summary
Type* getType Get class type information.

Void::CLASS_NAME

Name of the class - CLASS_NAME = "Void".

static const char* const CLASS_NAME

Void::getType

Get class type information.

static Type* getType()

PolymorphicWrapper

PolymorphicWrapper holds std::shared_ptr to object, object static type, plus object dynamic type information.

  • @tparam T - Object Type

namespace oatpp { namespace data { namespace mapping { namespace type { 
  template <class T>
  class PolymorphicWrapper {}
}}}}

Typedefs

Type Name Summary
T ObjectType Static object type
__class::Void Class PolymorphicWrapper has no static object Class info. It treats object as of class oatpp::data::mapping::type::__class::Void.

Fields

Type Name Summary
const Type* const valueType Value type information. See Type.

PolymorphicWrapper::ObjectType

Static object type

typedef T ObjectType

PolymorphicWrapper::Class

PolymorphicWrapper has no static object Class info. It treats object as of class oatpp::data::mapping::type::__class::Void.

typedef __class::Void Class

PolymorphicWrapper::valueType

Value type information. See Type.

const Type* const valueType

ObjectWrapper

ObjectWrapper holds std::shared_ptr to object, object static type, object static class information, plus object dynamic type information.

  • @tparam T - Object type.
  • @tparam Clazz - Static Object class information.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  template <class T, class Clazz>
  class ObjectWrapper : public PolymorphicWrapper<T> {}
}}}}

Typedefs

Type Name Summary
T ObjectType Object type.
Clazz Class Static object class information.

ObjectWrapper::ObjectType

Object type.

typedef T ObjectType

ObjectWrapper::Class

Static object class information.

typedef Clazz Class

AbstractObjectWrapper

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

PolymorphicWrapper over oatpp::base::Countable object.

typedef PolymorphicWrapper<oatpp::base::Countable> AbstractObjectWrapper

Type

Object type data.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  class Type {}
}}}}

Fields

Type Name Summary
const char* const name Type name.
const char* const nameQualifier Type name qualifier.
std::list<Type*> params List of type parameters - for templated types.
const Creator creator Creator - function to create instance of this type.
const Properties* const properties Pointer to type properties.

Methods

Return Type Name Summary
[none] Type Multiple implementations:
  1. Constructor.
  2. Constructor.
  3. Constructor.

Type::name

Type name.

const char* const name

Type::nameQualifier

Type name qualifier.

const char* const nameQualifier

Type::params

List of type parameters - for templated types.

std::list<Type*> params

Type::creator

Creator - function to create instance of this type.

const Creator creator

Type::properties

Pointer to type properties.

const Properties* const properties

Type::Type

  1. Constructor.
    • @param pName - type name.
    • @param pNameQualifier - type name qualifier.
    Type(const char* pName, const char* pNameQualifier)
    
  2. Constructor.
    • @param pName - type name.
    • @param pNameQualifier - type name qualifier.
    • @param pCreator - function pointer of Creator - function to create instance of this type.
    Type(const char* pName, const char* pNameQualifier, Creator pCreator)
    
  3. Constructor.
    • @param pName - type name.
    • @param pNameQualifier - type name qualifier.
    • @param pCreator - function pointer of Creator - function to create instance of this type.
    • @param pProperties - pointer to type properties.
    Type(const char* pName, const char* pNameQualifier, Creator pCreator, Properties* pProperties)
    

Type::Properties

Object type properties table.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  class Type {
    class Properties {}
  };
}}}}

Methods

Return Type Name Summary
void pushBack Add property to the end of the list.
void pushFrontAll Add all properties to the beginning of the list.
const std::unordered_map<std::string, Property*>& getMap Get properties as unordered map for random access.
const std::list<Property*>& getList Get properties in ordered way.

Type::Properties::pushBack

Add property to the end of the list.

  • @param property

void pushBack(Property* property)

Type::Properties::pushFrontAll

Add all properties to the beginning of the list.

  • @param properties

void pushFrontAll(Properties* properties)

Type::Properties::getMap

Get properties as unordered map for random access.

const std::unordered_map<std::string, Property*>& getMap() const

Type::Properties::getList

Get properties in ordered way.

const std::list<Property*>& getList() const

Type::Property

Class to map object properties.

namespace oatpp { namespace data { namespace mapping { namespace type { 
  class Type {
    class Property {}
  };
}}}}

Fields

Type Name Summary
const char* const name Property name.
const Type* const type Property type.

Methods

Return Type Name Summary
[none] Property Constructor.
void set Set value of object field mapped by this property.
AbstractObjectWrapper get Get value of object field mapped by this property.
AbstractObjectWrapper& getAsRef Get reference to ObjectWrapper of the object field.

Type::Property::name

Property name.

const char* const name

Type::Property::type

Property type.

const Type* const type

Type::Property::Property

Constructor.

  • @param properties - Type::Properties*. to push this property to.
  • @param pOffset - memory offset of object field from object start address.
  • @param pName - name of the property.
  • @param pType - Type of the property.

Property(Properties* properties, v_int64 pOffset, const char* pName, Type* pType)

Type::Property::set

Set value of object field mapped by this property.

  • @param object - object address.
  • @param value - value to set.

void set(void* object, const AbstractObjectWrapper& value)

Type::Property::get

Get value of object field mapped by this property.

  • @param object - object address.
  • @return - value of the field.

AbstractObjectWrapper get(void* object)

Type::Property::getAsRef

Get reference to ObjectWrapper of the object field.

  • @param object - object address.
  • @return - reference to ObjectWrapper of the object field.

AbstractObjectWrapper& getAsRef(void* object)