5#include "io_reflection_handler.h"
28class CGV_API ascii_reflection_handler :
public io_reflection_handler
37 std::string extend_name(
const std::string& name,
bool assign =
true);
40 bool reflect_header();
42 ascii_reflection_handler(
const std::string& _content,
unsigned _ver,
unsigned _tab = 3);
50class CGV_API ascii_read_reflection_handler :
public ascii_reflection_handler
53 std::ifstream file_is;
56 bool read_reflect_header(
const std::string& _content,
unsigned _ver);
58 ascii_read_reflection_handler(
const std::string& file_name,
const std::string& _content,
unsigned _ver,
NamingConvention _nc = NC_SHORT,
unsigned _tab = 3);
60 ascii_read_reflection_handler(std::istream& _is,
const std::string& _content,
unsigned _ver,
NamingConvention _nc = NC_SHORT,
unsigned _tab = 3);
76 std::ofstream file_os;
98#include <cgv/config/lib_end.h>
bool reflect_member_void(const std::string &member_name, void *member_ptr, cgv::reflect::abst_reflection_traits *rt)
abstract interface to reflect a member variable, where the member type is specified as a string.
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.
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.
void reflect_group_end(GroupKind group_kind)
abstract interface to terminate reflection of a group of members
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.
bool reflect_member_void(const std::string &member_name, void *member_ptr, cgv::reflect::abst_reflection_traits *rt)
abstract interface to reflect a member variable, where the member type is specified as a string.
ascii_write_reflection_handler(const std::string &file_name, const std::string &_content, unsigned _ver, NamingConvention _nc=NC_SHORT, unsigned _tab=3)
construct from file_name by opening file in ascii mode
GroupKind
different support group types
namespace for data management components
NamingConvention
different naming conventions for member names
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
this type specific reflection traits class is used by the reflect_enum function to reflect enum types