disabled copy constructors for channel and connection objects, because the end-user is not supposed to copy them
This commit is contained in:
parent
8759258a3e
commit
d35dba71a1
|
|
@ -33,6 +33,12 @@ public:
|
||||||
_implementation->attach(connection);
|
_implementation->attach(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy'ing of channel objects is not supported
|
||||||
|
* @param channel
|
||||||
|
*/
|
||||||
|
Channel(const Channel &channel) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,12 @@ protected:
|
||||||
ChannelImpl() {}
|
ChannelImpl() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy'ing of channel objects is not supported
|
||||||
|
* @param channel
|
||||||
|
*/
|
||||||
|
ChannelImpl(const ChannelImpl &channel) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,12 @@ public:
|
||||||
*/
|
*/
|
||||||
Connection(ConnectionHandler *handler) : _implementation(this, handler, Login(), "/") {}
|
Connection(ConnectionHandler *handler) : _implementation(this, handler, Login(), "/") {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No copy'ing, we do not support having two identical connection objects
|
||||||
|
* @param connection
|
||||||
|
*/
|
||||||
|
Connection(const Connection &connection) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,12 @@ private:
|
||||||
ConnectionImpl(Connection *parent, ConnectionHandler *handler, const Login &login, const std::string &vhost);
|
ConnectionImpl(Connection *parent, ConnectionHandler *handler, const Login &login, const std::string &vhost);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy'ing connections is impossible
|
||||||
|
* @param connection
|
||||||
|
*/
|
||||||
|
ConnectionImpl(const ConnectionImpl &connection) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue