cgv
|
#include <ascii_io_reflection_handlers.h>
Public Types | |
enum | GroupTraversal |
different values for group traversal strategy More... | |
enum | GroupKind |
different support group types | |
Public Member Functions | |
bool | is_creative () const |
this should return true | |
int | reflect_group_begin (GroupKind group_kind, const std::string &group_name, void *group_ptr, cgv::reflect::abst_reflection_traits *rt, unsigned grp_size) |
abstract interface to start reflection of a group of members. More... | |
bool | reflect_member_void (const std::string &member_name, void *member_ptr, cgv::reflect::abst_reflection_traits *rt) |
void | reflect_group_end (GroupKind group_kind) |
abstract interface to terminate reflection of a group of members More... | |
bool | reflect_method_void (const std::string &method_name, cgv::reflect::method_interface *mi_ptr, cgv::reflect::abst_reflection_traits *return_traits, const std::vector< cgv::reflect::abst_reflection_traits * > ¶m_value_traits) |
Static Public Member Functions | |
static std::string | group_traversal_name (GroupTraversal gt) |
return the group traversals as a string | |
static const char * | group_kind_name (GroupKind gk) |
return the group kind as a string | |
static bool | is_array_kind (GroupKind gk) |
check whether a group kind is of array or vector kind | |
read from ascii file
|
inherited |
different values for group traversal strategy
@ basic types with helper functions
|
virtual |
abstract interface to start reflection of a group of members.
The return value gives information about further traversal of the group:
Reimplemented from cgv::data::ascii_reflection_handler.
|
virtualinherited |
abstract interface to terminate reflection of a group of members
This function should only be called if group is traversed completely.
Reimplemented from cgv::reflect::reflection_handler.
|
inherited |
call this to reflect a member by member name and reference to the member. The member type is deduced from the reference via templates. The method uses reflect_member_impl to dispath types with implementation of a self_reflect method and types without. For polymorphic objects with a polymorphic self_reflect() method the parameter hard_cast
steers whether the concrete implementation T::self_reflect() is used or the overloaded function member_ref.self_reflect(). This is important for self reflection of base classes in polymorphic objects where hard_cast is set to true. In most other cases one can use the default argument false.
|
inherited |
reflect a member of pointer type.
This is only a minimal implementation that allows pointers to memory allocated with new. No reference counting or pointers into memory ranges allocated differently are supported. This will be later on.
|
virtual |
abstract interface to reflect a member variable, where the member type is specified as a string. Returns whether to continue the reflection.
Implements cgv::reflect::reflection_handler.
|
inherited |
call this to reflect a method by method name and reference to the member. The method type is deduced from the reference via templates. This only works, if you additionally include the header <cgv/reflect/method_interface_impl.h>, where the template code is located. This header is not included automatically, because of its length.
To give names to the parameters, append them to the name enclosed in parenthesis, i.e. "sin(x)" or "dot_prod(p,q)".
|
virtualinherited |
abstract interface to reflect a method, where return and parameter types are specified as strings. Returns whether to continue the reflection.
Implements cgv::reflect::reflection_handler.