3#include "find_reflection_handler.h"
4#include <cgv/config/cpp_version.h>
14 const void* value_ptr;
15 std::string value_type;
22 const std::string& _value_type,
23 const void* _value_ptr,
32#ifdef REFLECT_TRAITS_WITH_DECLTYPE
34template <
typename T,
typename Q>
35 bool set_member(T& variable,
const std::string& target,
const Q& value) {
38namespace compatibility {
39 template <
typename T,
typename Q,
typename RQ>
40 bool set_member_impl(T& variable,
const std::string& target,
const Q& value,
const RQ&)
45 srh.reflect_member(
"", variable);
46 return srh.found_target();
48#ifndef REFLECT_TRAITS_WITH_DECLTYPE
49 template <
bool use_get,
typename T,
typename Q>
50 struct set_member_dispatch {
static bool set_member(T& variable,
const std::string& target,
const Q& value) {
52 template <
typename T,
typename Q>
53 struct set_member_dispatch<true,T,Q> {
static bool set_member(T& variable,
const std::string& target,
const Q& value) {
54 return set_member_impl(variable, target, value, get_reflection_traits(value)); } };
57template <
typename T,
typename Q>
58bool set_member(T& variable,
const std::string& target,
const Q& value)
67#include <cgv/config/lib_end.h>
find_reflection_handler(const std::string &_target)
construct from textual target description
GroupKind
different support group types
bool is_creative() const
this should return true
void process_member_void(const std::string &member_name, void *member_ptr, abst_reflection_traits *rt, GroupKind group_kind, unsigned grp_size)
virtual method that is overloaded by derived classes to handle the target member
set_reflection_handler(const std::string &_target, const std::string &_value_type, const void *_value_ptr, abst_reflection_traits *_value_rt=0)
construct from target, value type, pointer to value and optionally reflection_traits
in this namespace reflection of types is implemented
this header is dependency free
abstract interface for type reflection with basic type management and optional string conversion
the reflection_traits_info defines compile time information about reflection_traits for a given type ...
Default implementation of the reflection traits providing type specific interface.