-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobject.hpp
65 lines (37 loc) · 846 Bytes
/
object.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TOKOX_CPP_JSON_OBJECT_HPP
#define TOKOX_CPP_JSON_OBJECT_HPP
#include "types.hpp"
namespace tokox::json
{
class object
{
public:
object();
object(const object& o);
object(const std::any& v);
template<object_type T>
object(const T& v);
object& operator=(const object& o);
object& operator=(const std::any& v);
template<object_type T>
object& operator=(const T& v);
const std::any& get_any() const;
operator std::any() const;
value_type get_value_type() const;
operator value_type() const;
template<object_type T>
T& get_value();
template<object_type T>
const T& get_value() const;
template<object_type T>
operator T() const;
template<value_type V>
auto& get_value();
template<value_type V>
const auto& get_value() const;
private:
std::any actual_object;
};
}
#include "object.cpp"
#endif