X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FTypeDescription.h;h=fb1b07890a8fe57bff4b46d58e540d7734e583eb;hb=8c8061a4f8b88410d6d93c039afe6affc4b69cf2;hp=0f530d8a6ab1910f6dd43f9b9610f116817e0f94;hpb=1907ca03c5e865c4d398170042aa384c67ffff29;p=l2e.git diff --git a/src/loader/TypeDescription.h b/src/loader/TypeDescription.h index 0f530d8..fb1b078 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_ @@ -48,6 +41,7 @@ public: const FieldDescription &GetField(const std::string &name) const; void Construct(void *) const; void Load(void *) const; + bool NeedsLinking() const { return link; } void SetConstructor(void (*ctor)(void *)) { constructor = ctor; } void SetLoader(void (*ld)(void *)) { loader = ld; } @@ -74,10 +68,12 @@ public: static int GetTypeId(const std::string &); static const TypeDescription &Get(int id); + static int GetMaxSize(); + static void WriteSourceWiki(std::ostream &); private: - TypeDescription(int id, const std::string &name) : constructor(0), loader(0), description(0), name(name), id(id), size(0) { } + TypeDescription(int id, const std::string &name) : constructor(0), loader(0), description(0), name(name), id(id), size(0), link(false) { } private: void (*constructor)(void *); @@ -88,6 +84,7 @@ private: std::map supertypes; int id; int size; + bool link; static std::map typeDescriptions; static std::map typeName2ID; @@ -96,4 +93,4 @@ private: } -#endif /* LOADER_TYPEDESCRIPTION_H_ */ +#endif