OpenAstra
 
Loading...
Searching...
No Matches
starsystemobject.h
1#ifndef STARSYSTEMOBJECT_H
2#define STARSYSTEMOBJECT_H
3
4#include "capabilitymanager.h"
5#include "commandmanager.h"
6#include "modulemanager.h"
7
8#include "gameobject.h"
9
10class Command;
11
12class StarsystemObject
13 : public GameObject
14{
15public:
16 static constexpr char starsystemCategory[] = "starsystemobject";
17 static std::shared_ptr<GameObject> createFromDump( ObjectId id, const std::string& type );
18 static std::shared_ptr<StarsystemObject> createFromTemplate( const nlohmann::json& config_data );
19
20public:
21 StarsystemObject(ObjectId id,
22 const std::string& type );
23 virtual ~StarsystemObject();
24
25 std::unique_ptr<CapabilityManager> capability_manager;
26 std::unique_ptr<CommandManager> command_manager;
27 std::unique_ptr<ModuleManager> module_manager;
28
29 virtual void tick( double delta_time_s, double total_time_s );
30
31private:
32 virtual void _finalizeUndump();
33};
34
35#endif // STARSYSTEMOBJECT_H
The Command class.
Definition command.h:23
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
Definition gameid.hpp:9