# DynamicObject.hpp
This File On Github
Ask A Question
API: latest
module: oatpp-protobuf
#include "oatpp-protobuf/reflection/DynamicObject.hpp"
# DynamicClass
A dynamic class that will be automatically generated for the proto object.
namespace oatpp { namespace protobuf { namespace reflection {
class DynamicClass {}
}}}
# Methods
Return Type | Name | Summary |
---|---|---|
DynamicClass* | registryGetClass | Multiple implementations:
|
const std::string | getName | Get class name. |
std::shared_ptr<Message> | createProto | Instantiate shared proto object. |
const oatpp::Type* | getType | Get oatpp::Type of this class. |
const oatpp::Type* | getVectorType | Get oatpp::Type of oatpp::Vector<This-Class> |
# DynamicClass::registryGetClass
- Get class by name of the proto object type.
- @param name
- @return
static DynamicClass* registryGetClass(const std::string& name)
- Get class for proto object type.
- @tparam T
- @return
template<class T> static DynamicClass* registryGetClass()
# DynamicClass::getName
Get class name.
- @return
const std::string getName() const
# DynamicClass::createProto
Instantiate shared proto object.
- @return
std::shared_ptr<Message> createProto() const
# DynamicClass::getType
Get oatpp::Type of this class.
- @return
const oatpp::Type* getType()
# DynamicClass::getVectorType
Get oatpp::Type of oatpp::Vector<This-Class>
- @return
const oatpp::Type* getVectorType()
# DynamicClass::PolymorphicDispatcher
Polymorphic Dispatcher
namespace oatpp { namespace protobuf { namespace reflection {
class DynamicClass {
class PolymorphicDispatcher : public oatpp::data::mapping::type::__class::AbstractObject::PolymorphicDispatcher {}
};
}}}
# DynamicClass::VectorPolymorphicDispatcher
Vector Polymorphic Dispatcher
namespace oatpp { namespace protobuf { namespace reflection {
class DynamicClass {
class VectorPolymorphicDispatcher : public oatpp::data::mapping::type::__class::AbstractVector::PolymorphicDispatcher {}
};
}}}
# DynamicObject
A dynamic oatpp object that will be created from the proto object.
namespace oatpp { namespace protobuf { namespace reflection {
class DynamicObject : public oatpp::BaseObject {}
}}}
# Methods
Return Type | Name | Summary |
---|---|---|
std::shared_ptr<DynamicObject> | createShared | Create shared. |
DynamicClass* | getClass | Get a DynamicClass of this object. |
# DynamicObject::createShared
Create shared.
- @param proto
- @return
static std::shared_ptr<DynamicObject> createShared(const Message& proto)
# DynamicObject::getClass
Get a DynamicClass of this object.
- @return
DynamicClass* getClass() const