X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FTypeDescription.cpp;h=1bb6c6505309117000822b92135c616cfb1d92a3;hb=8c8061a4f8b88410d6d93c039afe6affc4b69cf2;hp=c6e5d7e876498bf5a7c0aae6713ce148f956dfaf;hpb=0f30d8254ff8b9e63795960ec031577cf68fbf95;p=l2e.git diff --git a/src/loader/TypeDescription.cpp b/src/loader/TypeDescription.cpp index c6e5d7e..1bb6c65 100644 --- a/src/loader/TypeDescription.cpp +++ b/src/loader/TypeDescription.cpp @@ -23,6 +23,9 @@ void TypeDescription::AddField(const std::string &n, const FieldDescription &f) } else { fields.insert(std::make_pair(n, f)); } + if (f.IsReferenced() || f.IsAggregate()) { + link = true; + } } bool TypeDescription::HasField(const std::string &name) const { @@ -107,6 +110,20 @@ const TypeDescription &TypeDescription::Get(int id) { } +int TypeDescription::GetMaxSize() { + int max = 0; + for (map::const_iterator + i(typeDescriptions.begin()), + end(typeDescriptions.end()); + i != end; ++i) { + if (i->second.Size() > max) { + max = i->second.Size(); + } + } + return max; +} + + void TypeDescription::WriteSourceWiki(std::ostream &out) { vector types; for (map::const_iterator i(typeDescriptions.begin()), end(typeDescriptions.end()); i != end; ++i) {