Skip to content

Instantly share code, notes, and snippets.

@bo0ts
Created December 21, 2012 13:52
Show Gist options
  • Save bo0ts/4352976 to your computer and use it in GitHub Desktop.
Save bo0ts/4352976 to your computer and use it in GitHub Desktop.
#include <boost/graph/graph_traits.hpp>
#include <boost/parameter.hpp>
namespace graphs
{
BOOST_PARAMETER_NAME(graph) // Note: no semicolon
BOOST_PARAMETER_NAME(visitor)
BOOST_PARAMETER_NAME(root_vertex)
BOOST_PARAMETER_NAME(index_map)
BOOST_PARAMETER_NAME(color_map)
BOOST_PARAMETER_FUNCTION(
(void), // 1. parenthesized return type
depth_first_search, // 2. name of the function template
tag, // 3. namespace of tag types
(required (graph, *) ) // 4. one required parameter, and
(optional // four optional parameters, with defaults
(root_vertex,
(typename boost::graph_traits<graph_type>::vertex_descriptor),
*vertices(graph).first)
)
)
{
// ... body of function goes here...
// use graph, visitor, index_map, and color_map
}
}
// namespace CGAL {
// BOOST_PARAMETER_NAME(graph)
// BOOST_PARAMETER_NAME(edge)
// BOOST_PARAMETER_NAME(root_vertex)
// BOOST_PARAMETER_FUNCTION(
// (typename boost::graph_traits<typename boost::parameter::value_type<Args, tag::graph>::type>::edge_descriptor),
// join_face, (tag),
// (required
// (graph,*))
// (optional
// (root_vertex,
// (typename boost::graph_traits<graph_type>::vertex_descriptor),
// *vertices(graph).first)))
// {
// //foobar;
// }
// } // CGAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment