Ylva And Malin
meta.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 #include <utility>
4 #include <vector>
5 
6 namespace meta
7 {
8  struct type_info
9  {
10  enum data_type
11  {
14  };
15 
16  struct key_value
17  {
18  std::string key;
19  std::string value;
20  };
21 
23  std::string name;
24  std::vector<key_value> values;
25  };
26 
27  struct file
28  {
29  std::string filename;
30  std::string contents;
31  };
32 
33  // Return a pair of .h and .cpp file?
34  std::pair<file, file>
35  parse(const char* filename,
36  const char* string);
37 
38  const char*
39  tokenize_enum(const char* string,
40  type_info& info);
41 
42  std::pair<std::string, std::string>
44 }
std::string name
Definition: meta.h:23
Definition: meta.h:16
std::pair< std::string, std::string > generate_enum_to_string(const type_info &e)
Definition: meta.cpp:131
Definition: meta.h:13
std::pair< file, file > parse(const char *filename, const char *string)
Definition: meta.cpp:32
std::string contents
Definition: meta.h:30
std::string filename
Definition: meta.h:29
Definition: meta.h:8
std::vector< key_value > values
Definition: meta.h:24
Definition: meta.h:6
Definition: meta.h:27
std::string key
Definition: meta.h:18
data_type
Definition: meta.h:10
const char * tokenize_enum(const char *string, type_info &info)
Definition: meta.cpp:88
data_type type
Definition: meta.h:22
std::string value
Definition: meta.h:19
Definition: meta.h:12