cgv
io_reflection_handler.h
1
#pragma once
2
3
#include <fstream>
4
#include <cgv/reflect/reflection_handler.h>
5
#include <cgv/reflect/reflect_enum.h>
6
7
#include "lib_begin.h"
8
9
namespace
cgv
{
10
namespace
data {
11
13
enum
IOReflectionError
{ RE_NO_ERROR, RE_FILE_OPEN_ERROR, RE_FILE_READ_ERROR, RE_FILE_WRITE_ERROR, RE_CONTENT_MISMATCH, RE_VERSION_MISMATCH };
14
15
extern
CGV_API
cgv::reflect::enum_reflection_traits<IOReflectionError>
get_reflection_traits(
const
IOReflectionError
&);
16
18
class
CGV_API
io_reflection_handler
:
public
cgv::reflect::reflection_handler
19
{
20
public
:
21
protected
:
22
unsigned
version;
23
std::string file_content;
24
25
bool
in_header;
26
IOReflectionError
last_error;
27
public
:
29
io_reflection_handler
(
const
std::string& _content,
unsigned
_ver);
31
bool
failed()
const
;
33
IOReflectionError
get_error_code()
const
;
35
static
std::string get_error_message(
IOReflectionError
ae);
37
bool
reflect_method_void(
const
std::string& method_name,
cgv::reflect::method_interface
* mi_ptr,
38
cgv::reflect::abst_reflection_traits
* return_traits,
const
std::vector<cgv::reflect::abst_reflection_traits*>& param_value_traits);
39
};
40
41
42
}
43
}
44
45
#include <cgv/config/lib_end.h>
cgv::reflect::abst_reflection_traits
abstract interface for type reflection with basic type management and optional string conversion
Definition:
reflection_traits.h:24
cgv::data::io_reflection_handler
Definition:
io_reflection_handler.h:19
cgv::reflect::method_interface
Definition:
reflection_handler.h:24
cgv::reflect::reflection_handler
Definition:
reflection_handler.h:63
cgv::data::IOReflectionError
IOReflectionError
different error codes
Definition:
io_reflection_handler.h:13
cgv::reflect::enum_reflection_traits
this type specific reflection traits class is used by the reflect_enum function to reflect enum types
Definition:
reflect_enum.h:34
cgv
the cgv namespace
Definition:
vr_calib.cxx:9
projects
git
cgv
cgv
data
io_reflection_handler.h
Generated by
1.8.18