author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 3 | e1b950c65cb4 |
permissions | -rw-r--r-- |
williamr@4 | 1 |
//======================================================================= |
williamr@4 | 2 |
// Copyright 2002 Indiana University. |
williamr@4 | 3 |
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek |
williamr@2 | 4 |
// |
williamr@4 | 5 |
// Distributed under the Boost Software License, Version 1.0. (See |
williamr@4 | 6 |
// accompanying file LICENSE_1_0.txt or copy at |
williamr@4 | 7 |
// http://www.boost.org/LICENSE_1_0.txt) |
williamr@4 | 8 |
//======================================================================= |
williamr@2 | 9 |
|
williamr@4 | 10 |
#ifndef BOOST_GRAPH_EXCEPTION_HPP |
williamr@4 | 11 |
#define BOOST_GRAPH_EXCEPTION_HPP |
williamr@2 | 12 |
|
williamr@4 | 13 |
#include <stdexcept> |
williamr@4 | 14 |
#include <string> |
williamr@2 | 15 |
|
williamr@4 | 16 |
namespace boost { |
williamr@2 | 17 |
|
williamr@4 | 18 |
struct bad_graph : public std::invalid_argument { |
williamr@4 | 19 |
bad_graph(const std::string& what_arg) |
williamr@4 | 20 |
: std::invalid_argument(what_arg) { } |
williamr@4 | 21 |
}; |
williamr@2 | 22 |
|
williamr@4 | 23 |
struct not_a_dag : public bad_graph { |
williamr@4 | 24 |
not_a_dag() |
williamr@4 | 25 |
: bad_graph("The graph must be a DAG.") { } |
williamr@4 | 26 |
}; |
williamr@2 | 27 |
|
williamr@4 | 28 |
struct negative_edge : public bad_graph { |
williamr@4 | 29 |
negative_edge() |
williamr@4 | 30 |
: bad_graph("The graph may not contain an edge with negative weight."){ } |
williamr@4 | 31 |
}; |
williamr@2 | 32 |
|
williamr@4 | 33 |
struct negative_cycle : public bad_graph { |
williamr@4 | 34 |
negative_cycle() |
williamr@4 | 35 |
: bad_graph("The graph may not contain negative cycles.") { } |
williamr@4 | 36 |
}; |
williamr@4 | 37 |
struct not_connected : public bad_graph { |
williamr@4 | 38 |
not_connected() |
williamr@4 | 39 |
: bad_graph("The graph must be connected.") { } |
williamr@4 | 40 |
}; |
williamr@2 | 41 |
|
williamr@4 | 42 |
} // namespace boost |
williamr@2 | 43 |
|
williamr@4 | 44 |
#endif // BOOST_GRAPH_EXCEPTION_HPP |