BIND 10 trac2351, updated. 29023a38b4198a2c4031d30f38e2e98f9106be59 fix Makefile.am and merge trac2214
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Oct 15 09:49:18 UTC 2012
The branch, trac2351 has been updated
via 29023a38b4198a2c4031d30f38e2e98f9106be59 (commit)
from 2059929f02704c5410ea1cba9f392e15b08c5284 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 29023a38b4198a2c4031d30f38e2e98f9106be59
Author: Francis Dupont <fdupont at isc.org>
Date: Mon Oct 15 11:48:58 2012 +0200
fix Makefile.am and merge trac2214
-----------------------------------------------------------------------
Summary of changes:
src/lib/exceptions/Makefile.am | 4 +-
src/lib/exceptions/exceptions.h | 10 ++---
src/lib/util/Makefile.am | 1 +
.../{interprocess_sync_null.cc => nonassignable.h} | 38 +++++++++----------
.../{interprocess_sync_null.cc => noncopyable.h} | 39 ++++++++++----------
5 files changed, 45 insertions(+), 47 deletions(-)
copy src/lib/util/{interprocess_sync_null.cc => nonassignable.h} (65%)
copy src/lib/util/{interprocess_sync_null.cc => noncopyable.h} (64%)
-----------------------------------------------------------------------
diff --git a/src/lib/exceptions/Makefile.am b/src/lib/exceptions/Makefile.am
index aa7d6cd..637b10b 100644
--- a/src/lib/exceptions/Makefile.am
+++ b/src/lib/exceptions/Makefile.am
@@ -4,9 +4,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CXXFLAGS=$(B10_CXXFLAGS)
lib_LTLIBRARIES = libb10-exceptions.la
-libb10_exceptions_la_SOURCES = exceptions.h exceptions.cc
+libb10_exceptions_la_SOURCES = dll.h exceptions.h exceptions.cc
CLEANFILES = *.gcno *.gcda
libb10_exceptions_includedir = $(includedir)/$(PACKAGE_NAME)/exceptions
-libb10_exceptions_include_HEADERS = exceptions.h
+libb10_exceptions_include_HEADERS = dll.h exceptions.h
diff --git a/src/lib/exceptions/exceptions.h b/src/lib/exceptions/exceptions.h
index 2144582..e009e41 100644
--- a/src/lib/exceptions/exceptions.h
+++ b/src/lib/exceptions/exceptions.h
@@ -19,6 +19,7 @@
#include <string>
#include <sstream>
+#include <util/nonassignable.h>
#include <exceptions/dll.h>
namespace isc {
@@ -30,7 +31,8 @@ namespace isc {
/// exception such as the file name and line number where the exception is
/// triggered.
///
-class B10_LIBEXCEPTIONS_API Exception : public std::exception {
+class B10_LIBEXCEPTIONS_API Exception :
+ isc::util::nonassignable, public std::exception {
public:
///
/// \name Constructors and Destructor
@@ -57,13 +59,7 @@ public:
/// The destructor
virtual ~Exception() throw() {}
//@}
-private:
- ///
- /// The assignment operator is intentionally disabled.
- ///
- void operator=(const Exception& src);
-public:
///
/// \name Methods Reimplemented against the Standard Exception Class
///
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am
index 13f8f7b..a3262e2 100644
--- a/src/lib/util/Makefile.am
+++ b/src/lib/util/Makefile.am
@@ -18,6 +18,7 @@ libb10_util_la_SOURCES += interprocess_sync_file.h interprocess_sync_file.cc
libb10_util_la_SOURCES += interprocess_sync_null.h interprocess_sync_null.cc
libb10_util_la_SOURCES += memory_segment.h
libb10_util_la_SOURCES += memory_segment_local.h memory_segment_local.cc
+libb10_util_la_SOURCES += nonassignable.h noncopyable.h
libb10_util_la_SOURCES += range_utilities.h
libb10_util_la_SOURCES += hash/sha1.h hash/sha1.cc
libb10_util_la_SOURCES += encode/base16_from_binary.h
diff --git a/src/lib/util/nonassignable.h b/src/lib/util/nonassignable.h
new file mode 100644
index 0000000..7dc707d
--- /dev/null
+++ b/src/lib/util/nonassignable.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+/// From boost/noncopyable.hpp
+
+#ifndef __NONASSIGNABLE_
+#define __NONASSIGNABLE_
+
+#include <util/dll.h>
+
+namespace isc {
+namespace util {
+namespace nonassignable_ {
+
+class B10_LIBUTIL_API nonassignable {
+protected:
+ nonassignable() {}
+ ~nonassignable() {}
+private:
+ // emphasize the following member is private
+ const nonassignable& operator=(const nonassignable&);
+};
+
+} // namespace nonassignable_
+
+typedef nonassignable_::nonassignable nonassignable;
+
+} // namespace util
+} // namespace isc
+
+#endif // __NONASSIGNABLE_
diff --git a/src/lib/util/noncopyable.h b/src/lib/util/noncopyable.h
new file mode 100644
index 0000000..cbdfcd8
--- /dev/null
+++ b/src/lib/util/noncopyable.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+/// From boost/noncopyable.hpp
+
+#ifndef __NONCOPYABLE_
+#define __NONCOPYABLE_
+
+#include <util/dll.h>
+
+namespace isc {
+namespace util {
+namespace noncopyable_ {
+
+class B10_LIBUTIL_API noncopyable {
+protected:
+ noncopyable() {}
+ ~noncopyable() {}
+private:
+ // emphasize the following members are private
+ noncopyable(const noncopyable&);
+ const noncopyable& operator=(const noncopyable&);
+};
+
+} // namespace noncopyable_
+
+typedef noncopyable_::noncopyable noncopyable;
+
+} // namespace util
+} // namespace isc
+
+#endif // __NONCOPYABLE_
More information about the bind10-changes
mailing list