mirror of
https://github.com/boostorg/graph.git
synced 2026-02-26 16:52:12 +00:00
Applied changes r58876, r59133, r59134, r59628, r60078, r60079, r60126, r60127, r60196, r60197, r60198, r60365, r60366, r60384, r60385, r60472, r60485, r60610, r60611, r60651, r60769, r60770, r60899, r60900, r60916, r60919, r60920, r60958, r60998, r60999, r61000 from trunk, except for changes to <boost/detail/algorithm.hpp> which are waiting for Boost.Range algorithms to be merged; added find_if to <boost/detail/algorithm.hpp>
[SVN r61001]
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define BOOST_GRAPH_SOURCE
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/graph/graphml.hpp>
|
||||
#include <boost/graph/dll_import_export.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
@@ -62,7 +63,7 @@ public:
|
||||
else if (for_ == "port") kind = port_key;
|
||||
else if (for_ == "endpoint") kind = endpoint_key;
|
||||
else if (for_ == "all") kind = all_key;
|
||||
else throw parse_error("Attribute for is not valid: " + for_);
|
||||
else {BOOST_THROW_EXCEPTION(parse_error("Attribute for is not valid: " + for_));}
|
||||
m_keys[id] = kind;
|
||||
m_key_name[id] = name;
|
||||
m_key_type[id] = type;
|
||||
@@ -97,7 +98,11 @@ public:
|
||||
std::string local_directed = edge.second.get(path("<xmlattr>/directed"), "");
|
||||
bool is_directed = (local_directed == "" ? default_directed : local_directed == "true");
|
||||
if (is_directed != m_g.is_directed()) {
|
||||
if (is_directed) throw directed_graph_error(); else throw undirected_graph_error();
|
||||
if (is_directed) {
|
||||
BOOST_THROW_EXCEPTION(directed_graph_error());
|
||||
} else {
|
||||
BOOST_THROW_EXCEPTION(undirected_graph_error());
|
||||
}
|
||||
}
|
||||
size_t old_edges_size = m_edge.size();
|
||||
handle_edge(source, target);
|
||||
@@ -164,8 +169,9 @@ private:
|
||||
any edge;
|
||||
bool added;
|
||||
tie(edge, added) = m_g.do_add_edge(source, target);
|
||||
if (!added)
|
||||
throw bad_parallel_edge(u, v);
|
||||
if (!added) {
|
||||
BOOST_THROW_EXCEPTION(bad_parallel_edge(u, v));
|
||||
}
|
||||
|
||||
size_t e = m_edge.size();
|
||||
m_edge.push_back(edge);
|
||||
|
||||
Reference in New Issue
Block a user