15 static constexpr char capabilityCategory[] =
"capability";
16 using undumpFactory = Capability*(*)(
ObjectId id);
17 using createFactory = Capability*(*)(std::shared_ptr<GameObject> future_parent,
const nlohmann::json& template_data);
18 using deleteFactory = void(*)( Capability* ptr );
20 static std::shared_ptr<Capability> createFromTemplate(std::shared_ptr<GameObject> owner,
21 const std::string& capability,
22 const nlohmann::json& template_data );
23 static std::shared_ptr<GameObject> createFromDump(
ObjectId id,
24 const std::string&
type );
28 virtual ~Capability();
31 std::shared_ptr<DynamicLoader> _plugin_handle;
GameObject(const std::string &category, ObjectId id, const std::string &type)
Create a GameObject object.
Definition gameobject.cpp:38
const std::string & type() const
return the type (ship_xxx, station_xxx, planet_xxx...)
Definition gameobject.h:213