adding extra reflection helpers
This commit is contained in:
parent
18a484e4bf
commit
6c589678df
1 changed files with 25 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
#include <fc/string.hpp>
|
||||
#include <fc/optional.hpp>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <fc/container/flat_fwd.hpp>
|
||||
|
||||
namespace fc {
|
||||
class value;
|
||||
class exception;
|
||||
|
|
@ -31,6 +35,27 @@ namespace fc {
|
|||
return n.c_str();
|
||||
}
|
||||
};
|
||||
template<typename T> struct get_typename<flat_set<T>>
|
||||
{
|
||||
static const char* name() {
|
||||
static std::string n = std::string("flat_set<") + get_typename<T>::name() + ">";
|
||||
return n.c_str();
|
||||
}
|
||||
};
|
||||
template<typename T> struct get_typename<optional<T>>
|
||||
{
|
||||
static const char* name() {
|
||||
static std::string n = std::string("optional<") + get_typename<T>::name() + ">";
|
||||
return n.c_str();
|
||||
}
|
||||
};
|
||||
template<typename K,typename V> struct get_typename<std::map<K,V>>
|
||||
{
|
||||
static const char* name() {
|
||||
static std::string n = std::string("std::map<") + get_typename<K>::name() + ","+get_typename<V>::name()+">";
|
||||
return n.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
struct signed_int;
|
||||
struct unsigned_int;
|
||||
|
|
|
|||
Loading…
Reference in a new issue