6#include "../utils/dynamicloader.hpp"
7#include "../utils/json.hpp"
25 using undumpFactory = Command*(*)(
ObjectId);
26 using networkFactory = Command*(*)(
const nlohmann::json&);
27 using deleteFactory = void(*)( Command* ptr );
29 static constexpr char commandCategory[] =
"command";
30 static std::shared_ptr<Command> createFromDump(
ObjectId id,
const std::string&
type );
31 static std::shared_ptr<Command> createFromNetwork(
ObjectId player_id,
32 const nlohmann::json& command_json );
36 virtual bool performCommand() = 0;
47 virtual void _finalizeUndump();
49 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