forked from codewhite7777/ft_irc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singleton.hpp
38 lines (30 loc) · 1.22 KB
/
Singleton.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Singleton.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 13:29:51 by mgo #+# #+# */
/* Updated: 2022/10/10 13:30:09 by mgo ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SINGLETON_HPP
# define SINGLETON_HPP
class Server;
class Singleton
{
public:
static Singleton& getInstance(void)
{
static Singleton instance;
return instance;
}
void setServerPtr(Server* ptr_sv);
Server* getServerPtr(void);
private:
Singleton(void);
~Singleton(void);
Server* ptr_sv_;
};
#endif