From 39f3b38d361cf748cc660d71bc0646498cca551c Mon Sep 17 00:00:00 2001
From: Marcel Loose <loose@astron.nl>
Date: Mon, 23 Jun 2008 15:55:25 +0000
Subject: [PATCH] Bug 61: Added namespace wrapper for Boost.Tribool

---
 LCS/Common/include/Common/Makefile.am      |  1 +
 LCS/Common/include/Common/lofar_datetime.h |  7 +++-
 LCS/Common/include/Common/lofar_smartptr.h |  3 +-
 LCS/Common/include/Common/lofar_thread.h   |  7 +++-
 LCS/Common/include/Common/lofar_tribool.h  | 41 ++++++++++++++++++++++
 5 files changed, 56 insertions(+), 3 deletions(-)
 create mode 100644 LCS/Common/include/Common/lofar_tribool.h

diff --git a/LCS/Common/include/Common/Makefile.am b/LCS/Common/include/Common/Makefile.am
index 3ebc8fa8dda..c8bd7a84eef 100644
--- a/LCS/Common/include/Common/Makefile.am
+++ b/LCS/Common/include/Common/Makefile.am
@@ -44,6 +44,7 @@ pkginclude_HEADERS = Package__Version.h  \
 	lofar_stack.h \
 	lofar_string.h \
 	lofar_thread.h \
+	lofar_tribool.h \
 	lofar_typeinfo.h \
 	LofarTypedefs.h \
 	LofarTypes.h \
diff --git a/LCS/Common/include/Common/lofar_datetime.h b/LCS/Common/include/Common/lofar_datetime.h
index 1735af079b8..fa235f57024 100644
--- a/LCS/Common/include/Common/lofar_datetime.h
+++ b/LCS/Common/include/Common/lofar_datetime.h
@@ -1,4 +1,4 @@
-//# lofar_datetime.h:
+//# lofar_datetime.h: namespace wrapper for Boost.Date_Time Posix classes
 //#
 //#  Copyright (C) 2002
 //#  ASTRON (Netherlands Foundation for Research in Astronomy)
@@ -24,6 +24,11 @@
 #define LOFAR_COMMON_DATETIME_H
 
 // \file
+// namespace wrapper for Boost.Date_Time Posix classes
+
+#if !defined(HAVE_BOOST)
+#error Boost.Date_Time is required.
+#endif
 
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <time.h>
diff --git a/LCS/Common/include/Common/lofar_smartptr.h b/LCS/Common/include/Common/lofar_smartptr.h
index 9214afaf577..e2cbf29c029 100644
--- a/LCS/Common/include/Common/lofar_smartptr.h
+++ b/LCS/Common/include/Common/lofar_smartptr.h
@@ -1,4 +1,4 @@
-//#  lofar_smartptr.h: basic header for the Smartptr package
+//#  lofar_smartptr.h: namespace wrapper for Boost Smart Pointers
 //#
 //#  Copyright (C) 2002
 //#  ASTRON (Netherlands Foundation for Research in Astronomy)
@@ -24,6 +24,7 @@
 #define LOFAR_COMMON_SMARTPTR_H
 
 // \file
+// namespace wrapper for Boost Smart Pointers
 
 #if !defined(HAVE_BOOST)
 #error Boost Smart Pointer classes are required.
diff --git a/LCS/Common/include/Common/lofar_thread.h b/LCS/Common/include/Common/lofar_thread.h
index 9cfb663bc62..df69b341b61 100644
--- a/LCS/Common/include/Common/lofar_thread.h
+++ b/LCS/Common/include/Common/lofar_thread.h
@@ -1,4 +1,4 @@
-//#  lofar_thread.h: basic header for the Thread package
+//#  lofar_thread.h: namespace wrapper for Boost.Thread
 //#
 //#  Copyright (C) 2002
 //#  ASTRON (Netherlands Foundation for Research in Astronomy)
@@ -24,6 +24,11 @@
 #define LOFAR_COMMON_THREAD_H
 
 // \file
+// namespace wrapper for Boost.Thread
+
+#if !defined(HAVE_BOOST)
+#error Boost.Thread classes are required.
+#endif
 
 #ifndef USE_THREADS
 #error Threading support unavailable: it should be explicitly enabled \
diff --git a/LCS/Common/include/Common/lofar_tribool.h b/LCS/Common/include/Common/lofar_tribool.h
new file mode 100644
index 00000000000..c96b41cffe1
--- /dev/null
+++ b/LCS/Common/include/Common/lofar_tribool.h
@@ -0,0 +1,41 @@
+//#  lofar_tribool.h: namespace wrapper for Boost.Tribool
+//#
+//#  Copyright (C) 2002
+//#  ASTRON (Netherlands Foundation for Research in Astronomy)
+//#  P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
+//#
+//#  This program is free software; you can redistribute it and/or modify
+//#  it under the terms of the GNU General Public License as published by
+//#  the Free Software Foundation; either version 2 of the License, or
+//#  (at your option) any later version.
+//#
+//#  This program 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 General Public License for more details.
+//#
+//#  You should have received a copy of the GNU General Public License
+//#  along with this program; if not, write to the Free Software
+//#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//#
+//#  $Id$
+
+#ifndef LOFAR_COMMON_TRIBOOL_H
+#define LOFAR_COMMON_TRIBOOL_H
+
+// \file
+// namespace wrapper for Boost.Tribool
+
+#if !defined(HAVE_BOOST)
+#error Boost.Tribool is required.
+#endif
+
+#include <boost/logic/tribool.hpp>
+
+namespace LOFAR
+{
+  using boost::logic::tribool;
+  using boost::logic::indeterminate;
+}
+
+#endif
-- 
GitLab