X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tools%2Fsetupgen%2Fsetupgen.h;h=e4c1b333b2df110130c7ec203d58c3fcbba0839f;hb=f4ca190e869b9d03bf4f8b7b002c65af9f56c0ad;hp=98d1ab80472332d08b409cde37a0b644ebfe1599;hpb=bb1c22d58cc71e68555a144ac884137c775ef427;p=libs%2Fgame.git diff --git a/tools/setupgen/setupgen.h b/tools/setupgen/setupgen.h index 98d1ab8..e4c1b33 100644 --- a/tools/setupgen/setupgen.h +++ b/tools/setupgen/setupgen.h @@ -1,12 +1,14 @@ #ifndef SETUPGEN_H_ #define SETUPGEN_H_ +#include #include #include #include #include #include #include +#include #include "enum.h" #include "struct.h" #include "type.h" @@ -14,10 +16,20 @@ class SetupGen: public Msp::RegisteredApplication { private: + struct Module + { + std::string name_space; + std::vector> enums; + std::vector> structs; + }; + class Loader: public Msp::DataFile::ObjectLoader { + private: + Module &mod; + public: - Loader(SetupGen &); + Loader(SetupGen &, Module &); private: void init_actions() override; @@ -29,7 +41,7 @@ private: std::string in_fn; std::string out_fn; - std::string name_space; + std::list modules; std::map types; std::vector> enums; std::vector> structs; @@ -46,10 +58,10 @@ public: const Type &get_type(const std::string &) const; private: - void load(); - void collect_headers(); - void generate_header(Msp::IO::Base &) const; - void generate_code(Msp::IO::Base &) const; + void load(const Msp::FS::Path &); + void collect_headers(const Module &); + void generate_header(const Module &, Msp::IO::Base &) const; + void generate_code(const Module &, Msp::IO::Base &) const; }; #endif