Revision: 40741
http://brlcad.svn.sourceforge.net/brlcad/?rev=40741&view=rev
Author: davidloman
Date: 2010-09-28 16:54:13 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Introduce PortalProxy. pkg needs to have its pkg_switch table filled out
entirely prior to the creation of a pkg_conn, and current architecture has a
need for setting parts of the pkg_switch table after pkg_conn creation.
PortalProxy provides a simple way around this chicken/egg issue.
Modified Paths:
--------------
rt^3/trunk/src/libNet/CMakeLists.txt
Added Paths:
-----------
rt^3/trunk/include/PortalProxy.h
rt^3/trunk/src/libNet/PortalProxy.cxx
Added: rt^3/trunk/include/PortalProxy.h
===================================================================
--- rt^3/trunk/include/PortalProxy.h (rev 0)
+++ rt^3/trunk/include/PortalProxy.h 2010-09-28 16:54:13 UTC (rev 40741)
@@ -0,0 +1,58 @@
+/* P O R T A L P R O X Y . 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 PortalProxy.h
+ * PortalProxy.h
+ *
+ * Created on: Sep 28, 2010
+ * Author: dloman
+ */
+
+#ifndef __PORTALPROXY_H__
+#define __PORTALPROXY_H__
+
+#include "Portal.h"
+#include <QtCore/QMutex>
+
+class PortalProxy {
+public:
+ PortalProxy(Portal* p = 0);
+ virtual ~PortalProxy();
+
+ bool hasPortal();
+ Portal* getPortal();
+ void setPortal(Portal* portal);
+
+private:
+ QMutex portalLock;
+ Portal* portal;
+
+};
+
+#endif /* __PORTALPROXY_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/PortalProxy.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-28 16:05:52 UTC (rev
40740)
+++ rt^3/trunk/src/libNet/CMakeLists.txt 2010-09-28 16:54:13 UTC (rev
40741)
@@ -47,6 +47,7 @@
#set Source files
RT3_PROJECT_ADD_SOURCES (
Portal.cxx
+ PortalProxy.cxx
PortalManager.cxx
NetMsgFactory.cxx
netMsg/NetMsg.cxx
@@ -70,6 +71,7 @@
#Set INST Headers
RT3_PROJECT_ADD_INST_HEADERS(
Portal.h
+ PortalProxy.h
PortalManager.h
NetMsgTypes.h
INetMsgHandler.h
Added: rt^3/trunk/src/libNet/PortalProxy.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalProxy.cxx (rev 0)
+++ rt^3/trunk/src/libNet/PortalProxy.cxx 2010-09-28 16:54:13 UTC (rev
40741)
@@ -0,0 +1,57 @@
+/* P O R T A L P R O X Y . 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 PortalProxy.cxx
+ * PortalProxy.cxx
+ *
+ * Created on: Sep 28, 2010
+ * Author: dloman
+ */
+
+#include "PortalProxy.h"
+#include <QtCore/QMutexLocker>
+
+PortalProxy::PortalProxy(Portal* p) {
+ this->portal = p;
+}
+
+PortalProxy::~PortalProxy() {
+}
+bool PortalProxy::hasPortal() {
+ return (this->getPortal() != 0);
+}
+
+Portal* PortalProxy::getPortal() {
+ QMutexLocker(&this->portalLock);
+ return this->portal;
+}
+void PortalProxy::setPortal(Portal* p) {
+ QMutexLocker(&this->portalLock);
+ this->portal = p;
+
+}
+
+// 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/PortalProxy.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