/usr/include/boost/msm/mpl_graph
Edit: /usr/include/boost/msm/mpl_graph/mpl_graph.hpp (3783B)
// Copyright 2008-2010 Gordon Woodhull
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// mpl_graph - defines a metadata implementation of the BGL immutable graph concepts
// Copyright (c) 2008 Gordon Woodhull
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSEmpl::_1_0.txt or copy at
// http://www.boost.org/LICENSEmpl::_1_0.txt)
#ifndef BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
#define BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost {
namespace msm {
namespace mpl_graph {
// Boost Graph concepts, MPL style
// The metafunctions of the public interface rely
// metafunctions in the graph implementation to transform the input
// into the maps which are required to deliver results. Since the
// maps are produced lazily and are memoized, all of the graph
// concepts can be supported with no cost until they are actually
// used.
// Each of these dispatch to the correct producer metafunctions based
// on the representation inner type tag
// IncidenceGraph
template
struct source :
mpl::first::type,Edge>::type>
{};
template
struct target :
mpl::second::type,Edge>::type>
{};
template
struct out_edges :
mpl::fold::type,
mpl::vector<>,
mpl::push_back > >
{};
template
struct out_degree :
mpl::size::type>
{};
// BidirectionalGraph
template
struct in_edges :
mpl::fold::type,
mpl::vector<>,
mpl::push_back > >
{};
template
struct in_degree :
mpl::size::type>
{};
template
struct degree :
mpl::plus::type,typename in_degree::type>
{};
// AdjacencyGraph
template
struct adjacent_vertices :
mpl::transform::type,
mpl::second,
mpl::back_inserter > >
{};
// VertexListGraph
template
struct vertices :
detail::produce_vertex_set
{};
template
struct num_vertices :
mpl::size::type>
{};
// EdgeListGraph
template
struct edges :
detail::produce_edge_set
{};
template
struct num_edges :
mpl::size::type>
{};
// source and target are defined in IncidenceGraph
} // mpl_graph
} // msm
} // boost
#endif // BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED