Revision: 40581
http://brlcad.svn.sourceforge.net/brlcad/?rev=40581&view=rev
Author: davidloman
Date: 2010-09-15 17:42:15 +0000 (Wed, 15 Sep 2010)
Log Message:
-----------
Stub in start of ControlledThread, a selfcontained, selfmonitoring thread class.
Added Paths:
-----------
rt^3/trunk/src/utility/ControlledThread.cxx
rt^3/trunk/src/utility/ControlledThread.h
Added: rt^3/trunk/src/utility/ControlledThread.cxx
===================================================================
--- rt^3/trunk/src/utility/ControlledThread.cxx (rev 0)
+++ rt^3/trunk/src/utility/ControlledThread.cxx 2010-09-15 17:42:15 UTC (rev
40581)
@@ -0,0 +1,51 @@
+/* C O N T R O L L E D T H R E A D . C X X
+ * BRLCAD
+ *
+ * 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 ControlledThread.cxx
+ *
+ */
+
+#include "ControlledThread.h"
+
+ControlledThread::ControlledThread()
+{
+ this->threadName = "DEFAULT_THREAD_NAME";
+ this->runCmd = false;
+ this->runStatus = false;
+}
+
+ControlledThread::~ControlledThread()
+{
+}
+
+bool ControlledThread::startup(){
+ bool preRetVal = this->preStartupHook();
+
+
+ bool postRetVal = this->preStartupHook();
+}
+
+// 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/utility/ControlledThread.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Added: rt^3/trunk/src/utility/ControlledThread.h
===================================================================
--- rt^3/trunk/src/utility/ControlledThread.h (rev 0)
+++ rt^3/trunk/src/utility/ControlledThread.h 2010-09-15 17:42:15 UTC (rev
40581)
@@ -0,0 +1,61 @@
+/* C O N T R O L L E D T H R E A D . H
+ * BRLCAD
+ *
+ * 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 ControlledThread.h
+ *
+ */
+
+#ifndef __CONTROLLEDTHREAD_H__
+#define __CONTROLLEDTHREAD_H__
+
+class ControlledThread
+{
+public:
+ ControlledThread(QString threadname = "");
+ virtual ~ControlledThread();
+
+ bool startup();
+ bool shutdown();
+
+protected:
+ virtual boolean preStartupHook() = 0;
+ virtual boolean postStartupHook() = 0;
+
+ virtual boolean preShutdownHook() = 0;
+ virtual boolean postShutdownHook() = 0;
+
+private:
+ /* fields */
+ QString threadName;
+ bool runCmd;
+ bool runStatus;
+
+};
+
+#endif /* __CONTROLLEDTHREAD_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/src/utility/ControlledThread.h
___________________________________________________________________
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