rcpp_framework/core/nodes/node_tree.h

35 lines
513 B
C
Raw Normal View History

#ifndef NODE_TREE_H
#define NODE_TREE_H
#include "core/object.h"
#include "core/threading/rw_lock.h"
2022-01-07 19:28:16 +01:00
class Node;
class NodeTree : public Object {
RCPP_OBJECT(NodeTree, Object);
public:
2022-01-07 19:28:16 +01:00
Node *get_root();
virtual void set_root(Node *root);
virtual void update();
2022-01-07 19:28:16 +01:00
void request_write_lock();
virtual float get_update_delta_time();
NodeTree();
~NodeTree();
protected:
virtual void _send_update();
2022-01-07 19:28:16 +01:00
Node *_root_node;
float _update_interval;
bool _write_lock_requested;
RWLock _rw_lock;
};
#endif