Revision: 40763
http://brlcad.svn.sourceforge.net/brlcad/?rev=40763&view=rev
Author: davidloman
Date: 2010-09-28 19:16:12 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Stub in NetMsgRouter. It shall be used for.... routing NetMsgs...
Modified Paths:
--------------
rt^3/trunk/src/libNet/CMakeLists.txt
Added Paths:
-----------
rt^3/trunk/include/NetMsgRouter.h
rt^3/trunk/src/libNet/NetMsgRouter.cxx
Property Changed:
----------------
rt^3/trunk/src/libNet/
Added: rt^3/trunk/include/NetMsgRouter.h
===================================================================
--- rt^3/trunk/include/NetMsgRouter.h (rev 0)
+++ rt^3/trunk/include/NetMsgRouter.h 2010-09-28 19:16:12 UTC (rev 40763)
@@ -0,0 +1,63 @@
+/* N E T M S G R O U T E R . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file NetMsgRouter.h
+ *
+ * Brief description
+ *
+ */
+
+
+#ifndef __NETMSGROUTER_H__
+#define __NETMSGROUTER_H__
+
+#include "NetMsgTypes.h"
+#include "INetMsgHandler.h"
+#include "NetMsg.h"
+
+#include <QtCore/QMap>
+#include <QtCore/QList>
+
+class NetMsgRouter {
+public:
+ static NetMsgRouter* getInstance();
+ virtual ~NetMsgRouter();
+
+ bool registerType(quint16 type, INetMsgHandler* handler);
+ bool routeMsg(NetMsg* msg);
+
+private:
+ static NetMsgRouter* pInstance;
+ NetMsgRouter();
+
+ QMap<quint16,QList<INetMsgHandler*>*>* routingTable;
+
+};
+
+#endif /* __NETMSGROUTER_H__ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: rt^3/trunk/include/NetMsgRouter.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Property changes on: rt^3/trunk/src/libNet
___________________________________________________________________
Modified: svn:ignore
- __
CMakeFiles
cmake_install.cmake
Makefile
*.so
+ __
CMakeFiles
cmake_install.cmake
Makefile
*.so
*.backup
Modified: rt^3/trunk/src/libNet/CMakeLists.txt
===================================================================
--- rt^3/trunk/src/libNet/CMakeLists.txt 2010-09-28 19:02:14 UTC (rev
40762)
+++ rt^3/trunk/src/libNet/CMakeLists.txt 2010-09-28 19:16:12 UTC (rev
40763)
@@ -49,6 +49,7 @@
Portal.cxx
PortalManager.cxx
NetMsgFactory.cxx
+ NetMsgRouter.cxx
netMsg/NetMsg.cxx
netMsg/TypeOnlyMsg.cxx
netMsg/GenericOneStringMsg.cxx
@@ -74,6 +75,7 @@
NetMsgTypes.h
INetMsgHandler.h
NetMsgFactory.h
+ NetMsgRouter.h
NetMsg.h
TypeOnlyMsg.h
RemoteNodenameSetMsg.h
Added: rt^3/trunk/src/libNet/NetMsgRouter.cxx
===================================================================
--- rt^3/trunk/src/libNet/NetMsgRouter.cxx (rev 0)
+++ rt^3/trunk/src/libNet/NetMsgRouter.cxx 2010-09-28 19:16:12 UTC (rev
40763)
@@ -0,0 +1,65 @@
+/* N E T M S G R O U T E R . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file NetMsgRouter.cxx
+ *
+ * Brief description
+ *
+ */
+
+#include "NetMsgRouter.h"
+
+NetMsgRouter* NetMsgRouter::pInstance = NULL;
+
+NetMsgRouter*
+NetMsgRouter::getInstance() {
+ if (NetMsgRouter::pInstance == NULL) {
+ NetMsgRouter::pInstance = new NetMsgRouter();
+ }
+ return NetMsgRouter::pInstance;
+}
+
+NetMsgRouter::NetMsgRouter() {
+ this->routingTable = new QMap<quint16,QList<INetMsgHandler*>*>();
+}
+
+NetMsgRouter::~NetMsgRouter() {
+ delete routingTable;
+}
+
+
+bool
+NetMsgRouter::registerType(quint16 type, INetMsgHandler* handler) {
+
+
+}
+
+bool
+NetMsgRouter::routeMsg(NetMsg* msg) {
+
+}
+
+// Local Variables:
+// tab-width: 8
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: t
+// c-file-style: "stroustrup"
+// End:
+// ex: shiftwidth=4 tabstop=8
Property changes on: rt^3/trunk/src/libNet/NetMsgRouter.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits