VL
TypeResolver.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <functional>
4#include "vl_fwd.h"
5
7{
8public:
9 typedef std::function<std::string(const vl::Object& object)> FGetTypeId;
10 typedef std::function<vl::Object& (const std::string& protoId)> FGetProto;
11
12 TypeResolver() = default;
13 TypeResolver(const FGetTypeId& fGetTypeId, const FGetProto& fGetProto);
14
15 operator bool() const;
16
17 std::string GetTypeId(const vl::Object& object) const;
18 const vl::Object& GetProto(const std::string& protoId) const;
19
20protected:
23};
24
Definition: TypeResolver.h:7
TypeResolver()=default
std::function< std::string(const vl::Object &object)> FGetTypeId
Definition: TypeResolver.h:9
std::function< vl::Object &(const std::string &protoId)> FGetProto
Definition: TypeResolver.h:10
FGetProto mGetProto
Definition: TypeResolver.h:22
FGetTypeId mGetTypeId
Definition: TypeResolver.h:21
std::string GetTypeId(const vl::Object &object) const
Definition: TypeResolver.cpp:16
const vl::Object & GetProto(const std::string &protoId) const
Definition: TypeResolver.cpp:25
Definition: vl.h:173