Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58179 - in trunk: boost/graph libs/graph/src
From: jewillco_at_[hidden]
Date: 2009-12-05 22:51:09


Author: jewillco
Date: 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
New Revision: 58179
URL: http://svn.boost.org/trac/boost/changeset/58179

Log:
Factored out declspec code; added BOOST_GRAPH_SOURCE where necessary
Added:
   trunk/boost/graph/dll_import_export.hpp (contents, props changed)
Text files modified:
   trunk/boost/graph/graphml.hpp | 1 +
   trunk/boost/graph/graphviz.hpp | 15 +--------------
   trunk/libs/graph/src/graphml.cpp | 2 ++
   trunk/libs/graph/src/read_graphviz_new.cpp | 2 ++
   4 files changed, 6 insertions(+), 14 deletions(-)

Added: trunk/boost/graph/dll_import_export.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/graph/dll_import_export.hpp 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
@@ -0,0 +1,30 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Copyright 2003 Jeremy Siek
+// Authors: Lie-Quan Lee, Jeremy Siek, and Douglas Gregor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+#define BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_DECLSPEC
+# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK)
+# ifdef BOOST_GRAPH_SOURCE
+# define BOOST_GRAPH_DECL __declspec(dllexport)
+# else
+# define BOOST_GRAPH_DECL __declspec(dllimport)
+# endif // BOOST_GRAPH_SOURCE
+# endif // DYN_LINK
+#endif // BOOST_HAS_DECLSPEC
+
+#ifndef BOOST_GRAPH_DECL
+# define BOOST_GRAPH_DECL
+#endif
+
+#endif // BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP

Modified: trunk/boost/graph/graphml.hpp
==============================================================================
--- trunk/boost/graph/graphml.hpp (original)
+++ trunk/boost/graph/graphml.hpp 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
@@ -16,6 +16,7 @@
 #include <boost/lexical_cast.hpp>
 #include <boost/any.hpp>
 #include <boost/type_traits/is_convertible.hpp>
+#include <boost/graph/dll_import_export.hpp>
 #include <boost/graph/graphviz.hpp> // for exceptions
 #include <typeinfo>
 #include <boost/mpl/bool.hpp>

Modified: trunk/boost/graph/graphviz.hpp
==============================================================================
--- trunk/boost/graph/graphviz.hpp (original)
+++ trunk/boost/graph/graphviz.hpp 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
@@ -24,20 +24,7 @@
 #include <boost/graph/adjacency_list.hpp>
 #include <boost/property_map/dynamic_property_map.hpp>
 #include <boost/graph/overloading.hpp>
-
-#ifdef BOOST_HAS_DECLSPEC
-# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK)
-# ifdef BOOST_GRAPH_SOURCE
-# define BOOST_GRAPH_DECL __declspec(dllexport)
-# else
-# define BOOST_GRAPH_DECL __declspec(dllimport)
-# endif // BOOST_GRAPH_SOURCE
-# endif // DYN_LINK
-#endif // BOOST_HAS_DECLSPEC
-
-#ifndef BOOST_GRAPH_DECL
-# define BOOST_GRAPH_DECL
-#endif
+#include <boost/graph/dll_import_export.hpp>
 
 namespace boost {
 

Modified: trunk/libs/graph/src/graphml.cpp
==============================================================================
--- trunk/libs/graph/src/graphml.cpp (original)
+++ trunk/libs/graph/src/graphml.cpp 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
@@ -10,9 +10,11 @@
 // Andrew Lumsdaine
 // Tiago de Paula Peixoto
 
+#define BOOST_GRAPH_SOURCE
 #include <boost/foreach.hpp>
 #include <boost/optional.hpp>
 #include <boost/graph/graphml.hpp>
+#include <boost/graph/dll_import_export.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/property_tree/xml_parser.hpp>
 

Modified: trunk/libs/graph/src/read_graphviz_new.cpp
==============================================================================
--- trunk/libs/graph/src/read_graphviz_new.cpp (original)
+++ trunk/libs/graph/src/read_graphviz_new.cpp 2009-12-05 22:51:08 EST (Sat, 05 Dec 2009)
@@ -25,6 +25,7 @@
 // Ronald Garcia
 //
 
+#define BOOST_GRAPH_SOURCE
 #include <boost/ref.hpp>
 #include <boost/function/function2.hpp>
 #include <boost/property_map/dynamic_property_map.hpp>
@@ -44,6 +45,7 @@
 #include <boost/regex.hpp>
 #include <boost/function.hpp>
 #include <boost/bind.hpp>
+#include <boost/graph/dll_import_export.hpp>
 #include <boost/graph/graphviz.hpp>
 
 namespace boost {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk