YAPOG  0.0.1
Yet Another Pokemon Online Game
DynamicObjectFactory.hxx
Go to the documentation of this file.
1 #ifndef YAPOG_SERVER_DYNAMICOBJECTFACTORY_HXX
2 # define YAPOG_SERVER_DYNAMICOBJECTFACTORY_HXX
3 
5 
7 
8 namespace yse
9 {
10  template <typename T>
12  const yap::String& typeName,
13  const yap::ID& id) const
14  {
15  T* object = yap::ObjectFactory::Instance ().Create<T> (typeName, id);
16 
17  object->SetWorldID (IDGenerator::Instance ().GetID ());
18 
19  return object;
20  }
21 } // namespace yse
22 
23 #endif // YAPOG_SERVER_DYNAMICOBJECTFACTORY_HXX