1#include "reflection_traits.h"
2#include "reflection_handler.h"
the self reflection handler is passed to the virtual self_reflect() method of cgv::base::base.
virtual std::string get_enum_name(unsigned i) const
return the name of the i-th enum item
virtual bool is_enum_type() const
return whether type is an enum type - this is independent of whether enum interface is implemented
virtual bool has_string_conversions() const
whether type can be converted to string, defaults to false
virtual int get_enum_value(unsigned i) const
return the value of the i-th enum item
virtual ~abst_reflection_traits()
provide virtual destructor to allow generation of copies
virtual bool has_external_implementation() const
whether type can be converted to string, defaults to false
virtual void get_to_string(const void *instance_ptr, std::string &str_val)
convert given instance into a string value
virtual bool has_enum_interface() const
return whether the traits class implements the enum interface
virtual bool external_implementation(reflection_handler &rh, void *member_ptr)
call the external implementation
virtual bool set_from_string(void *instance_ptr, const std::string &str_val)
convert a given string value to the reflected type and store in the instance pointer
virtual unsigned get_nr_enum_items() const
return the number of enum items
Default implementation of the reflection traits providing type specific interface.