X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FTypeDescription.h;h=262f76b9e9d79ff9bad507e31f5643ead1f4a606;hb=4309d259becd96ead792678257e910c03a6b4a3d;hp=ab8c1bf1ba13328b399d721c46fb26cb2053af65;hpb=4bc70f5311dcbcca4e6b9e852bbcb19602f50eeb;p=l2e.git diff --git a/src/loader/TypeDescription.h b/src/loader/TypeDescription.h index ab8c1bf..262f76b 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,10 +82,11 @@ private: int id; int size; - static std::vector typeDescriptions; + static std::map typeDescriptions; + static std::map typeName2ID; }; } -#endif /* LOADER_TYPEDESCRIPTION_H_ */ +#endif