spacebox/src/Node.hpp

42 lines
679 B
C++
Raw Normal View History

2019-04-23 01:42:19 -04:00
#ifndef Node_h_
#define Node_h_
#include <iostream>
2019-05-04 03:25:35 -04:00
#include "json/json.hpp"
2019-05-03 02:09:48 -04:00
#include "SDL.h"
2019-05-02 06:45:41 -04:00
#include "filesystem.hpp"
2019-04-23 01:42:19 -04:00
struct Game;
2019-05-03 02:09:48 -04:00
struct Delegate;
2019-05-07 03:33:54 -04:00
struct Display;
2019-04-23 01:42:19 -04:00
struct Node
{
Node *parent;
bool active;
2019-04-23 01:42:19 -04:00
2019-05-02 06:45:41 -04:00
Node();
Node(Node*, bool=true);
void set_parent(Node*);
2019-06-16 03:05:02 -04:00
void activate();
void deactivate();
bool is_active() const;
2019-05-04 03:25:35 -04:00
Game* get_root();
nlohmann::json& get_configuration();
Delegate& get_delegate();
Display& get_display();
2019-05-02 20:11:45 -04:00
void print_branch();
virtual std::string get_class_name() { return "Node"; };
virtual ~Node();
2019-04-23 01:42:19 -04:00
};
#include "Configuration.hpp"
#include "Delegate.hpp"
#include "Display.hpp"
2019-04-23 01:42:19 -04:00
#endif