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