]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/containers/copy_functors.hpp
import stlplus 3.7
[chaz/yoink] / src / stlplus / containers / copy_functors.hpp
index 68f2b21b226a0d382c324552d853859bfe697f2b..ce530b831e6422eb77c96643192c885feecdbab7 100644 (file)
@@ -1,66 +1,66 @@
-#ifndef STLPLUS_COPY_FUNCTORS
-#define STLPLUS_COPY_FUNCTORS
-////////////////////////////////////////////////////////////////////////////////
-
-//   Author:    Andy Rushton
-//   Copyright: (c) Southampton University 1999-2004
-//              (c) Andy Rushton           2004-2009
-//   License:   BSD License, see ../docs/license.html
-
-//   The function constructor classes below are used by the smart_ptr and the
-//   simple_ptr classes. They provide three (well ok, two) copying mechanisms.
-//   These classes have been separated from the smart_ptr header by DJDM, as
-//   the simple_ptr classes now also use them.
-
-////////////////////////////////////////////////////////////////////////////////
-#include "containers_fixes.hpp"
-#include "exceptions.hpp"
-
-namespace stlplus
-{
-
-  ////////////////////////////////////////////////////////////////////////////////
-  // copy functors implementing the three possible copy semantics
-
-  // constructor_copy uses the copy constructor of the object - used for simple types
-
-  template <typename T>
-  class constructor_copy
-  {
-  public:
-    T* operator() (const T& from) throw()
-      {
-        return new T(from);
-      }
-  };
-
-  // clone_copy uses the clone method of the object - used for polymorphic types
-
-  template <typename T>
-  class clone_copy
-  {
-  public:
-    T* operator() (const T& from) throw()
-      {
-        return from.clone();
-      }
-  };
-
-  // no_copy throws an exception - used for types that cannot be copied
-
-  template <typename T>
-  class no_copy
-  {
-  public:
-    T* operator() (const T& from) throw(illegal_copy)
-      {
-        throw illegal_copy("no_copy functor called");
-        return 0;
-      }
-  };
-
-  ////////////////////////////////////////////////////////////////////////////////
-
-} // end namespace stlplus
-
-#endif
+#ifndef STLPLUS_COPY_FUNCTORS\r
+#define STLPLUS_COPY_FUNCTORS\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+//   Author:    Andy Rushton\r
+//   Copyright: (c) Southampton University 1999-2004\r
+//              (c) Andy Rushton           2004 onwards\r
+//   License:   BSD License, see ../docs/license.html\r
+\r
+//   The function constructor classes below are used by the smart_ptr and the\r
+//   simple_ptr classes. They provide three (well ok, two) copying mechanisms.\r
+//   These classes have been separated from the smart_ptr header by DJDM, as\r
+//   the simple_ptr classes now also use them.\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+#include "containers_fixes.hpp"\r
+#include "exceptions.hpp"\r
+\r
+namespace stlplus\r
+{\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+  // copy functors implementing the three possible copy semantics\r
+\r
+  // constructor_copy uses the copy constructor of the object - used for simple types\r
+\r
+  template <typename T>\r
+  class constructor_copy\r
+  {\r
+  public:\r
+    T* operator() (const T& from) throw()\r
+      {\r
+        return new T(from);\r
+      }\r
+  };\r
+\r
+  // clone_copy uses the clone method of the object - used for polymorphic types\r
+\r
+  template <typename T>\r
+  class clone_copy\r
+  {\r
+  public:\r
+    T* operator() (const T& from) throw()\r
+      {\r
+        return from.clone();\r
+      }\r
+  };\r
+\r
+  // no_copy throws an exception - used for types that cannot be copied\r
+\r
+  template <typename T>\r
+  class no_copy\r
+  {\r
+  public:\r
+    T* operator() (const T& from) throw(illegal_copy)\r
+      {\r
+        throw illegal_copy("no_copy functor called");\r
+        return 0;\r
+      }\r
+  };\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+\r
+} // end namespace stlplus\r
+\r
+#endif\r
This page took 0.023383 seconds and 4 git commands to generate.