File tree Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ class EventLoop
32
32
EventLoop (int capacity);
33
33
~EventLoop ();
34
34
35
+ // disable copying
36
+ EventLoop (const EventLoop &) = delete ;
37
+ EventLoop & operator =(const EventLoop &) = delete ;
38
+
35
39
std::optional<int > step ();
36
40
int exec ();
37
41
void exit (int code);
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ class TcpListener
31
31
TcpListener ();
32
32
~TcpListener ();
33
33
34
+ // disable copying
35
+ TcpListener (const TcpListener &) = delete ;
36
+ TcpListener & operator =(const TcpListener &) = delete ;
37
+
34
38
bool bind (const QHostAddress &addr, uint16_t port);
35
39
std::tuple<QHostAddress, uint16_t > localAddress () const ;
36
40
std::unique_ptr<TcpStream> accept ();
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ class TcpStream : public ReadWrite
34
34
TcpStream ();
35
35
~TcpStream ();
36
36
37
+ // disable copying
38
+ TcpStream (const TcpStream &) = delete ;
39
+ TcpStream & operator =(const TcpStream &) = delete ;
40
+
37
41
// returns true if connection starting, false on error
38
42
bool connect (const QHostAddress &addr, uint16_t port);
39
43
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ class TimerWheel
42
42
TimerWheel (int capacity);
43
43
~TimerWheel ();
44
44
45
+ // disable copying
46
+ TimerWheel (const TimerWheel &) = delete ;
47
+ TimerWheel & operator =(const TimerWheel &) = delete ;
48
+
45
49
// returns <0 if no capacity
46
50
int add (quint64 expires, size_t userData);
47
51
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ class UnixListener
31
31
UnixListener ();
32
32
~UnixListener ();
33
33
34
+ // disable copying
35
+ UnixListener (const UnixListener &) = delete ;
36
+ UnixListener & operator =(const UnixListener &) = delete ;
37
+
34
38
bool bind (const QString &path);
35
39
std::unique_ptr<UnixStream> accept ();
36
40
int errorCondition () const { return errorCondition_; }
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ class UnixStream : public ReadWrite
32
32
UnixStream ();
33
33
~UnixStream ();
34
34
35
+ // disable copying
36
+ UnixStream (const UnixStream &) = delete ;
37
+ UnixStream & operator =(const UnixStream &) = delete ;
38
+
35
39
// returns true if connection starting, false on error
36
40
bool connect (const QString &path);
37
41
You can’t perform that action at this time.
0 commit comments