Revision: 40839
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40839&view=rev
Author:   davidloman
Date:     2010-09-29 16:44:09 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Introduce RouteMsgJob.  Designed for moving the job of routing a NetMsg to its 
destination off of the selector thread.

Modified Paths:
--------------
    rt^3/trunk/src/libNet/CMakeLists.txt

Added Paths:
-----------
    rt^3/trunk/include/RouteMsgJob.h
    rt^3/trunk/src/libNet/RouteMsgJob.cxx

Added: rt^3/trunk/include/RouteMsgJob.h
===================================================================
--- rt^3/trunk/include/RouteMsgJob.h                            (rev 0)
+++ rt^3/trunk/include/RouteMsgJob.h    2010-09-29 16:44:09 UTC (rev 40839)
@@ -0,0 +1,55 @@
+/*                   R O U T E M S G J O B . 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 RouteMsgJob.h
+ *
+ * Brief description
+ *
+ */
+
+#ifndef __ROUTEMSGJOB_H__
+#define __ROUTEMSGJOB_H__
+
+#include "libjob.h"
+#include "NetMsg.h"
+
+class RouteMsgJob : public AbstractJob
+{
+public:
+       RouteMsgJob(NetMsg* msg);
+       virtual ~RouteMsgJob();
+
+protected:
+       JobResult _doJob();
+
+private:
+       NetMsg* msg;
+};
+
+#endif /* __ROUTEMSGJOB_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/RouteMsgJob.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Revision Date Author
Added: svn:eol-style
   + native

Modified: rt^3/trunk/src/libNet/CMakeLists.txt
===================================================================
--- rt^3/trunk/src/libNet/CMakeLists.txt        2010-09-29 16:33:06 UTC (rev 
40838)
+++ rt^3/trunk/src/libNet/CMakeLists.txt        2010-09-29 16:44:09 UTC (rev 
40839)
@@ -66,6 +66,7 @@
        netMsg/GeometryReqMsg.cxx
        netMsg/GeometryManifestMsg.cxx
        netMsg/GeometryChunkMsg.cxx
+       RouteMsgJob.cxx
 )
 
 #Set INST Headers
@@ -92,6 +93,7 @@
        GeometryReqMsg.h
        GeometryManifestMsg.h
        GeometryChunkMsg.h
+       RouteMsgJob.h
 )
 
 #Set NOINST headers

Added: rt^3/trunk/src/libNet/RouteMsgJob.cxx
===================================================================
--- rt^3/trunk/src/libNet/RouteMsgJob.cxx                               (rev 0)
+++ rt^3/trunk/src/libNet/RouteMsgJob.cxx       2010-09-29 16:44:09 UTC (rev 
40839)
@@ -0,0 +1,49 @@
+/*                 R O U T E M S G J O B . 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 RouteMsgJob.cxx
+ *
+ * Brief description
+ *
+ */
+
+#include "RouteMsgJob.h"
+#include "NetMsgRouter.h"
+
+RouteMsgJob::RouteMsgJob(NetMsg* msg) :
+       msg(msg)
+{
+}
+
+RouteMsgJob::~RouteMsgJob() {
+}
+
+JobResult RouteMsgJob::_doJob()
+{
+       NetMsgRouter::getInstance()->routeMsg(this->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/RouteMsgJob.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

Reply via email to