X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FTypeDescription.h;h=cc00662a6855ad893c754181a30812afddbe3596;hb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;hp=ab8c1bf1ba13328b399d721c46fb26cb2053af65;hpb=4bc70f5311dcbcca4e6b9e852bbcb19602f50eeb;p=l2e.git diff --git a/src/loader/TypeDescription.h b/src/loader/TypeDescription.h index ab8c1bf..cc00662 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,7 +63,7 @@ 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); @@ -89,7 +82,8 @@ private: int id; int size; - static std::vector typeDescriptions; + static std::map typeDescriptions; + static std::map typeName2ID; };