-/*
- * TypeDescription.h
- *
- * Created on: Sep 4, 2012
- * Author: holy
- */
-
#ifndef LOADER_TYPEDESCRIPTION_H_
#define LOADER_TYPEDESCRIPTION_H_
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);
int id;
int size;
- static std::vector<TypeDescription> typeDescriptions;
+ static std::map<int, TypeDescription> typeDescriptions;
+ static std::map<std::string, int> typeName2ID;
};