X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FTypeDescription.h;h=7b7483624bfe1577979e5ff849405ab25e2fc65b;hb=1970312e983541d32d4ff73c81b8d90156a7bb99;hp=ab8c1bf1ba13328b399d721c46fb26cb2053af65;hpb=4bc70f5311dcbcca4e6b9e852bbcb19602f50eeb;p=l2e.git diff --git a/src/loader/TypeDescription.h b/src/loader/TypeDescription.h index ab8c1bf..7b74836 100644 --- a/src/loader/TypeDescription.h +++ b/src/loader/TypeDescription.h @@ -1,10 +1,3 @@ -/* - * TypeDescription.h - * - * Created on: Sep 4, 2012 - * Author: holy - */ - #ifndef LOADER_TYPEDESCRIPTION_H_ #define LOADER_TYPEDESCRIPTION_H_ @@ -70,10 +63,12 @@ public: FieldIterator FieldsBegin() const { return fields.begin(); } FieldIterator FieldsEnd() const { return fields.end(); } - static TypeDescription &CreateOrGet(const std::string &name); + static TypeDescription &Create(int id, const std::string &name); static int GetTypeId(const std::string &); static const TypeDescription &Get(int id); + static int GetMaxSize(); + static void WriteSourceWiki(std::ostream &); private: @@ -89,10 +84,11 @@ private: int id; int size; - static std::vector typeDescriptions; + static std::map typeDescriptions; + static std::map typeName2ID; }; } -#endif /* LOADER_TYPEDESCRIPTION_H_ */ +#endif