graph_selectors.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. // Selectors for the Directed template parameter of adjacency_list
  15. // and adjacency_matrix.
  16. struct directedS { enum { is_directed = true, is_bidir = false };
  17. typedef mpl::true_ is_directed_t;
  18. typedef mpl::false_ is_bidir_t;
  19. };
  20. struct undirectedS {
  21. enum { is_directed = false, is_bidir = false };
  22. typedef mpl::false_ is_directed_t;
  23. typedef mpl::false_ is_bidir_t;
  24. };
  25. struct bidirectionalS {
  26. enum { is_directed = true, is_bidir = true };
  27. typedef mpl::true_ is_directed_t;
  28. typedef mpl::true_ is_bidir_t;
  29. };
  30. } // namespace boost
  31. #endif // BOOST_GRAPH_SELECTORS_HPP