Revision: 41593
http://brlcad.svn.sourceforge.net/brlcad/?rev=41593&view=rev
Author: davidloman
Date: 2010-12-14 14:09:23 +0000 (Tue, 14 Dec 2010)
Log Message:
-----------
More Code cleanup. Disabled more default constructors, copy constructors, and
equality operators.
Modified Paths:
--------------
rt^3/trunk/include/Logger.h
rt^3/trunk/include/NetMsgFactory.h
rt^3/trunk/include/NetMsgRouter.h
rt^3/trunk/include/NewNodeOnNetMsg.h
rt^3/trunk/include/NewSessionReqMsg.h
rt^3/trunk/include/PkgClient.h
rt^3/trunk/include/PkgServer.h
rt^3/trunk/include/PkgTcpClient.h
rt^3/trunk/include/PkgTcpServer.h
rt^3/trunk/include/PkgUdpClient.h
rt^3/trunk/include/PkgUdpServer.h
rt^3/trunk/include/Portal.h
rt^3/trunk/include/PortalManager.h
rt^3/trunk/include/RemoteNodenameSetMsg.h
rt^3/trunk/include/RouteMsgJob.h
rt^3/trunk/include/Session.h
rt^3/trunk/include/SessionInfoMsg.h
rt^3/trunk/include/SessionManager.h
rt^3/trunk/include/SuccessMsg.h
rt^3/trunk/include/TypeOnlyMsg.h
Modified: rt^3/trunk/include/Logger.h
===================================================================
--- rt^3/trunk/include/Logger.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/Logger.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -85,9 +85,9 @@
bool printToConsole;
bool printToFile;
- Logger();
- Logger(const Logger& logger){};
- Logger& operator=(const Logger& log){};
+ Logger(); /* Disable Default cstr */
+ Logger(const Logger& logger){}; /* Disable Copy cstr */
+ Logger& operator=(const Logger& log){}; /* Disable equals operator */
void log(quint32 logLevel, QString origin, QString string);
};
Modified: rt^3/trunk/include/NetMsgFactory.h
===================================================================
--- rt^3/trunk/include/NetMsgFactory.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/NetMsgFactory.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -45,6 +45,10 @@
private:
NetMsgFactory();
static NetMsgFactory* pInstance;
+
+ /* Disable copy cstr and =operator */
+ NetMsgFactory(NetMsgFactory const&){};
+ NetMsgFactory& operator=(NetMsgFactory const&){};
};
#endif /* __NETMSGFACTORY_H__ */
Modified: rt^3/trunk/include/NetMsgRouter.h
===================================================================
--- rt^3/trunk/include/NetMsgRouter.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/NetMsgRouter.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -56,6 +56,10 @@
QMutex mapLock;
QMap<quint16,QList<INetMsgHandler*>*>* routingTable;
+
+ /* Disable copy cstr and =operator */
+ NetMsgRouter(NetMsgRouter const&){};
+ NetMsgRouter& operator=(NetMsgRouter const&){};
};
#endif /* __NETMSGROUTER_H__ */
Modified: rt^3/trunk/include/NewNodeOnNetMsg.h
===================================================================
--- rt^3/trunk/include/NewNodeOnNetMsg.h 2010-12-14 13:34:06 UTC (rev
41592)
+++ rt^3/trunk/include/NewNodeOnNetMsg.h 2010-12-14 14:09:23 UTC (rev
41593)
@@ -44,6 +44,11 @@
virtual ~NewNodeOnNetMsg();
QString getNewNodename();
+
+private:
+ /* Disable copy cstr and =operator */
+ NewNodeOnNetMsg(NewNodeOnNetMsg const&):GenericOneStringMsg(0,""){};
+ NewNodeOnNetMsg& operator=(NewNodeOnNetMsg const&){};
};
#endif /* __NEWNODEONNETMSG_H__ */
Modified: rt^3/trunk/include/NewSessionReqMsg.h
===================================================================
--- rt^3/trunk/include/NewSessionReqMsg.h 2010-12-14 13:34:06 UTC (rev
41592)
+++ rt^3/trunk/include/NewSessionReqMsg.h 2010-12-14 14:09:23 UTC (rev
41593)
@@ -56,6 +56,13 @@
virtual bool _serialize(QDataStream* ds);
virtual bool _equals(const NetMsg& msg);
+
+
+private:
+ /* Disable copy cstr and =operator */
+ NewSessionReqMsg(NewSessionReqMsg const&):NetMsg(0){};
+ NewSessionReqMsg& operator=(NewSessionReqMsg const&){};
+
};
#endif /* __NEWSESSIONREQMSG_H__ */
Modified: rt^3/trunk/include/PkgClient.h
===================================================================
--- rt^3/trunk/include/PkgClient.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgClient.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -85,6 +85,11 @@
private:
std::string proto;
pkg_conn* conn;
+
+ /* Disable copy cstr and =operator */
+ PkgClient(PkgClient const&){};
+ PkgClient& operator=(PkgClient const&){};
+
};
#endif /* __PKGCLIENT_H__ */
Modified: rt^3/trunk/include/PkgServer.h
===================================================================
--- rt^3/trunk/include/PkgServer.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgServer.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -48,8 +48,12 @@
std::string proto;
int listenFD;
- virtual PkgClient*
- getNewClient(pkg_conn* conn) = 0;
+ virtual PkgClient* getNewClient(pkg_conn* conn) = 0;
+
+ /* Disable copy cstr and =operator */
+ PkgServer(PkgServer const&){};
+ PkgServer& operator=(PkgServer const&){};
+
};
#endif /* __PKGSERVER_H__ */
Modified: rt^3/trunk/include/PkgTcpClient.h
===================================================================
--- rt^3/trunk/include/PkgTcpClient.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgTcpClient.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -34,8 +34,14 @@
public:
PkgTcpClient(std::string ipOrHostname, int port, struct pkg_switch*
callBackTableIn);
PkgTcpClient(pkg_conn* conn);
- virtual
- ~PkgTcpClient();
+ virtual ~PkgTcpClient();
+
+
+private:
+ /* Disable copy cstr and =operator */
+ PkgTcpClient(PkgTcpClient const&):PkgClient("",NULL){};
+ PkgTcpClient& operator=(PkgTcpClient const&){};
+
};
#endif /* __PKGTCPCLIENT_H__ */
Modified: rt^3/trunk/include/PkgTcpServer.h
===================================================================
--- rt^3/trunk/include/PkgTcpServer.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgTcpServer.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -34,12 +34,14 @@
{
public:
PkgTcpServer();
- virtual
- ~PkgTcpServer();
+ virtual ~PkgTcpServer();
private:
- PkgClient*
- getNewClient(pkg_conn* conn);
+ PkgClient* getNewClient(pkg_conn* conn);
+
+ /* Disable copy cstr and =operator */
+ PkgTcpServer(PkgTcpServer const&):PkgServer(""){};
+ PkgTcpServer& operator=(PkgTcpServer const&){};
};
#endif /* __PKGTCPSERVER_H__ */
Modified: rt^3/trunk/include/PkgUdpClient.h
===================================================================
--- rt^3/trunk/include/PkgUdpClient.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgUdpClient.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -34,8 +34,12 @@
public:
PkgUdpClient(std::string ipOrHostname, int port, struct pkg_switch*
callBackTableIn);
PkgUdpClient(pkg_conn* conn);
- virtual
- ~PkgUdpClient();
+ virtual ~PkgUdpClient();
+
+private:
+ /* Disable copy cstr and =operator */
+ PkgUdpClient(PkgUdpClient const&):PkgClient("",NULL){};
+ PkgUdpClient& operator=(PkgUdpClient const&){};
};
#endif /* __PKGUDPCLIENT_H__ */
Modified: rt^3/trunk/include/PkgUdpServer.h
===================================================================
--- rt^3/trunk/include/PkgUdpServer.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PkgUdpServer.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -34,12 +34,14 @@
{
public:
PkgUdpServer();
- virtual
- ~PkgUdpServer();
+ virtual ~PkgUdpServer();
private:
- PkgClient*
- getNewClient(pkg_conn* conn);
+ PkgClient* getNewClient(pkg_conn* conn);
+
+ /* Disable copy cstr and =operator */
+ PkgUdpServer(PkgUdpServer const&):PkgServer(""){};
+ PkgUdpServer& operator=(PkgUdpServer const&){};
};
#endif /* __PKGUDPSERVER_H__ */
Modified: rt^3/trunk/include/Portal.h
===================================================================
--- rt^3/trunk/include/Portal.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/Portal.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -71,6 +71,10 @@
bool handshakeComplete;
static void callbackSpringboard(struct pkg_conn* conn, char* buf);
+
+ /* Disable copy cstr and =operator */
+ Portal(Portal const&){};
+ Portal& operator=(Portal const&){};
};
#endif /* __PORTAL_H__ */
Modified: rt^3/trunk/include/PortalManager.h
===================================================================
--- rt^3/trunk/include/PortalManager.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/PortalManager.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -69,6 +69,10 @@
struct pkg_switch* makeNewSwitchTable();
void closeFD(int fd, QString logComment);
void handleDisconnectReqMsg(TypeOnlyMsg* msg);
+
+ /* Disable copy cstr and =operator */
+ PortalManager(PortalManager const&){};
+ PortalManager& operator=(PortalManager const&){};
};
#endif /* __PORTALMANAGER_H__ */
Modified: rt^3/trunk/include/RemoteNodenameSetMsg.h
===================================================================
--- rt^3/trunk/include/RemoteNodenameSetMsg.h 2010-12-14 13:34:06 UTC (rev
41592)
+++ rt^3/trunk/include/RemoteNodenameSetMsg.h 2010-12-14 14:09:23 UTC (rev
41593)
@@ -44,6 +44,11 @@
virtual ~RemoteNodenameSetMsg();
QString getRemoteNodename();
+
+private:
+ /* Disable copy cstr and =operator */
+ RemoteNodenameSetMsg(RemoteNodenameSetMsg
const&):GenericOneStringMsg(0, ""){};
+ RemoteNodenameSetMsg& operator=(RemoteNodenameSetMsg const&){};
};
#endif /* __REMOTENODENAMESETMSG_H__ */
Modified: rt^3/trunk/include/RouteMsgJob.h
===================================================================
--- rt^3/trunk/include/RouteMsgJob.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/RouteMsgJob.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -40,6 +40,10 @@
private:
NetMsg* msg;
+
+ /* Disable copy cstr and =operator */
+ RouteMsgJob(RouteMsgJob const&){};
+ RouteMsgJob& operator=(RouteMsgJob const&){};
};
#endif /* __ROUTEMSGJOB_H__ */
Modified: rt^3/trunk/include/Session.h
===================================================================
--- rt^3/trunk/include/Session.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/Session.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -57,6 +57,10 @@
QUuid sessionID;
Account* a;
time_t lastAccess;
+
+ /* Disable copy cstr and =operator */
+ Session(Session const&){};
+ Session& operator=(Session const&){};
};
#endif /* __SESSION_H__ */
Modified: rt^3/trunk/include/SessionInfoMsg.h
===================================================================
--- rt^3/trunk/include/SessionInfoMsg.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/SessionInfoMsg.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -54,6 +54,11 @@
bool _serialize(QDataStream* ds);
bool _equals(const NetMsg& msg);
+
+private:
+ /* Disable copy cstr and =operator */
+ SessionInfoMsg(SessionInfoMsg const&):NetMsg(0){};
+ SessionInfoMsg& operator=(SessionInfoMsg const&){};
};
#endif /* __SESSIONINFOMSG_H__ */
Modified: rt^3/trunk/include/SessionManager.h
===================================================================
--- rt^3/trunk/include/SessionManager.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/SessionManager.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -61,6 +61,10 @@
void handleNewSessionReqMsg(NewSessionReqMsg* msg);
void handleDisconnectReqMsg(TypeOnlyMsg* msg);
+
+ /* Disable copy cstr and =operator */
+ SessionManager(SessionManager const&){};
+ SessionManager& operator=(SessionManager const&){};
};
#endif /* __SESSIONMANAGER_H__ */
Modified: rt^3/trunk/include/SuccessMsg.h
===================================================================
--- rt^3/trunk/include/SuccessMsg.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/SuccessMsg.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -47,6 +47,11 @@
*Getters n Setters
*/
quint8 getSuccessCode();
+
+private:
+ /* Disable copy cstr and =operator */
+ SuccessMsg(SuccessMsg const&):GenericOneByteMsg(0, (quint8)0){};
+ SuccessMsg& operator=(SuccessMsg const&){};
};
#endif /* __SUCCESSMSG_H__ */
Modified: rt^3/trunk/include/TypeOnlyMsg.h
===================================================================
--- rt^3/trunk/include/TypeOnlyMsg.h 2010-12-14 13:34:06 UTC (rev 41592)
+++ rt^3/trunk/include/TypeOnlyMsg.h 2010-12-14 14:09:23 UTC (rev 41593)
@@ -46,6 +46,11 @@
protected:
bool _serialize(QDataStream* ds);
bool _equals(const NetMsg& msg);
+
+private:
+ /* Disable copy cstr and =operator */
+ TypeOnlyMsg(TypeOnlyMsg const&):NetMsg(0){};
+ TypeOnlyMsg& operator=(TypeOnlyMsg const&){};
};
#endif /* __TYPEONLYMSG_H__ */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits