-
Notifications
You must be signed in to change notification settings - Fork 71
/
TypeInfoGenerator.h
42 lines (32 loc) · 1.07 KB
/
TypeInfoGenerator.h
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
#pragma once
#include "Meta.h"
#include <USRefl/config.h>
namespace Ubpa::USRefl {
class TypeInfoGenerator {
public:
enum class ConstMode {
Constepxr,
Const,
NonConst
};
struct Config {
bool nonNamespaceNameWithoutQuotation{ false };
bool namespaceNameWithQuotation{ false };
bool isAttrValueToFunction{ false };
std::string_view nameof_namespace = UMeta::nameof_namespace;
bool isInitializerAsAttr{ false };
std::string_view nameof_initializer = UMeta::nameof_initializer;
std::string_view nameof_constructor = UMeta::nameof_constructor;
std::string_view nameof_destructor = UMeta::nameof_destructor;
bool generateDefaultFunctions{ true };
std::string_view nameof_default_functions = UMeta::nameof_default_functions;
ConstMode attrListConstMode{ ConstMode::Constepxr };
ConstMode fieldListConstMode{ ConstMode::Constepxr };
};
TypeInfoGenerator() = default;
TypeInfoGenerator(Config config ) : config{ std::move(config) } {}
std::string Generate(const std::vector<TypeMeta>& typeMetas);
private:
Config config;
};
}