8 #include <msp/core/application.h>
9 #include <msp/datafile/objectloader.h>
14 class SetupGen: public Msp::RegisteredApplication<SetupGen>
17 class Loader: public Msp::DataFile::ObjectLoader<SetupGen>
23 void init_actions() override;
25 void enum_def(const Msp::DataFile::Symbol &);
26 void name_space(const std::string &);
27 void struct_def(Struct::Kind, const Msp::DataFile::Symbol &);
32 std::string name_space;
33 std::map<std::string, Type> types;
34 std::vector<std::unique_ptr<Enum>> enums;
35 std::vector<std::unique_ptr<Struct>> structs;
36 std::set<std::string> headers;
39 SetupGen(int, char **);
43 void create_standard_types();
44 Type &add_type(const std::string &, Type::Kind);
46 const Type &get_type(const std::string &) const;
50 void collect_headers();
51 void generate_header(Msp::IO::Base &) const;
52 void generate_code(Msp::IO::Base &) const;