graph_selectors.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #ifndef BOOST_GRAPH_SELECTORS_HPP
  10. #define BOOST_GRAPH_SELECTORS_HPP
  11. #include <boost/mpl/bool.hpp>
  12. namespace boost
  13. {
  14. //===========================================================================
  15. // Selectors for the Directed template parameter of adjacency_list
  16. // and adjacency_matrix.
  17. struct directedS
  18. {
  19. enum
  20. {
  21. is_directed = true,
  22. is_bidir = false
  23. };
  24. typedef mpl::true_ is_directed_t;
  25. typedef mpl::false_ is_bidir_t;
  26. };
  27. struct undirectedS
  28. {
  29. enum
  30. {
  31. is_directed = false,
  32. is_bidir = false
  33. };
  34. typedef mpl::false_ is_directed_t;
  35. typedef mpl::false_ is_bidir_t;
  36. };
  37. struct bidirectionalS
  38. {
  39. enum
  40. {
  41. is_directed = true,
  42. is_bidir = true
  43. };
  44. typedef mpl::true_ is_directed_t;
  45. typedef mpl::true_ is_bidir_t;
  46. };
  47. } // namespace boost
  48. #endif // BOOST_GRAPH_SELECTORS_HPP