feat: added get_singleton() functions to c/s-nodes
This commit is contained in:
parent
a5df2ff598
commit
badf83cf91
4 changed files with 12 additions and 0 deletions
|
|
@ -50,6 +50,10 @@ void ClientNode::_notification(int what) {
|
|||
}
|
||||
}
|
||||
|
||||
ClientNode *ClientNode::get_singleton() {
|
||||
return singleton_instance;
|
||||
}
|
||||
|
||||
void ClientNode::connect_to_server(String const &server) {
|
||||
ydi::client::connect(server);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ protected:
|
|||
void _notification(int what);
|
||||
|
||||
public:
|
||||
static ClientNode *get_singleton();
|
||||
void connect_to_server(String const &url);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -62,3 +62,7 @@ void ServerNode::_notification(int what) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ServerNode *ServerNode::get_singleton() {
|
||||
return singleton_instance;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ class ServerNode : public Node {
|
|||
protected:
|
||||
void _notification(int what);
|
||||
|
||||
public:
|
||||
static ServerNode *get_singleton();
|
||||
|
||||
public:
|
||||
static String const sig_clue_revealed;
|
||||
static String const sig_connection_established;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue