+ map<int, TypeDescription>::const_iterator i(typeDescriptions.find(id));
+ if (i != typeDescriptions.end()) {
+ return i->second;
+ } else {
+ std::stringstream msg;
+ msg << "invalid type ID " << id;
+ throw invalid_argument(msg.str());
+ }
+}
+
+
+int TypeDescription::GetMaxSize() {
+ int max = 0;
+ for (map<int, TypeDescription>::const_iterator
+ i(typeDescriptions.begin()),
+ end(typeDescriptions.end());
+ i != end; ++i) {
+ if (i->second.Size() > max) {
+ max = i->second.Size();
+ }
+ }
+ return max;