* create an instance by providing its id * * @param id */
| 64 | * @param id |
| 65 | */ |
| 66 | static T* Create(const ID& id) { |
| 67 | Registry* reg = GetRegistry(); |
| 68 | CHECK(reg->find(id) != reg->end()) |
| 69 | << "The creation function for " << id << " has not been registered"; |
| 70 | return (*reg)[id](); |
| 71 | } |
| 72 | |
| 73 | static const std::vector<ID> GetIDs() { |
| 74 | std::vector<ID> keys; |