Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::graph::maybe_named_graph< Graph, Vertex, VertexProperty, ExtractName > Struct Template Reference

A graph mixin that can provide a mapping from names to vertices, and use that mapping to simplify creation and manipulation of graphs. More...

#include <named_graph.hpp>

Inheritance diagram for boost::graph::maybe_named_graph< Graph, Vertex, VertexProperty, ExtractName >:
Collaboration diagram for boost::graph::maybe_named_graph< Graph, Vertex, VertexProperty, ExtractName >:

Public Types

typedef internal_vertex_name
< VertexProperty >::type 
extract_name_type
 The type of the function object that extracts names from vertex properties. More...
 
typedef lookup_one_property
< VertexProperty,
vertex_bundle_t >::type 
bundled_vertex_property_type
 The type of the "bundled" property, from which the name can be extracted. More...
 
typedef
internal_vertex_constructor
< VertexProperty >::type 
vertex_constructor_type
 The type of the function object that generates vertex properties from names, for the implicit addition of vertices. More...
 
typedef remove_cv< typename
remove_reference< typename
extract_name_type::result_type >
::type >::type 
vertex_name_type
 The type used to name vertices in the graph. More...
 
typedef Vertex vertex_descriptor
 The type of vertex descriptors in the graph. More...
 
typedef
multi_index::multi_index_container
< Vertex,
multi_index::indexed_by
< multi_index::hashed_unique
< multi_index::tag
< vertex_name_t >
, extract_name_from_vertex > > > 
named_vertices_type
 The type that maps names to vertices. More...
 
typedef
named_vertices_type::template
index< vertex_name_t >::type 
vertices_by_name_type
 The set of vertices, indexed by name. More...
 

Public Member Functions

void added_vertex (Vertex vertex)
 Notify the named_graph that we have added the given vertex. More...
 
template<typename VertexIterStability >
void removing_vertex (Vertex vertex, VertexIterStability)
 Notify the named_graph that we are removing the given vertex. More...
 
void clearing_graph ()
 Notify the named_graph that we are clearing the graph. More...
 
Graph & derived ()
 Retrieve the derived instance. More...
 
const Graph & derived () const
 
extract_name_type::result_type extract_name (const bundled_vertex_property_type &property)
 Extract the name from a vertex property instance. More...
 
optional< vertex_descriptorvertex_by_property (const bundled_vertex_property_type &property)
 Search for a vertex that has the given property (based on its name) More...
 

Public Attributes

named_vertices_type named_vertices
 Mapping from names to vertices. More...
 
vertex_constructor_type vertex_constructor
 Constructs a vertex from the name of that vertex. More...
 

Detailed Description

template<typename Graph, typename Vertex, typename VertexProperty, typename ExtractName = typename internal_vertex_name<VertexProperty>::type>
struct boost::graph::maybe_named_graph< Graph, Vertex, VertexProperty, ExtractName >

A graph mixin that can provide a mapping from names to vertices, and use that mapping to simplify creation and manipulation of graphs.

Member Typedef Documentation

template<typename Graph, typename Vertex, typename VertexProperty>
typedef lookup_one_property<VertexProperty, vertex_bundle_t>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::bundled_vertex_property_type
inherited

The type of the "bundled" property, from which the name can be extracted.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef internal_vertex_name<VertexProperty>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::extract_name_type
inherited

The type of the function object that extracts names from vertex properties.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef multi_index::multi_index_container< Vertex, multi_index::indexed_by< multi_index::hashed_unique<multi_index::tag<vertex_name_t>, extract_name_from_vertex> > > boost::graph::named_graph< Graph, Vertex, VertexProperty >::named_vertices_type
inherited

The type that maps names to vertices.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef internal_vertex_constructor<VertexProperty>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_constructor_type
inherited

The type of the function object that generates vertex properties from names, for the implicit addition of vertices.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef Vertex boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_descriptor
inherited

The type of vertex descriptors in the graph.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef remove_cv< typename remove_reference< typename extract_name_type::result_type>::type>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_name_type
inherited

The type used to name vertices in the graph.

template<typename Graph, typename Vertex, typename VertexProperty>
typedef named_vertices_type::template index<vertex_name_t>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertices_by_name_type
inherited

The set of vertices, indexed by name.

Member Function Documentation

template<typename Graph , typename Vertex, typename VertexProperty >
void boost::graph::named_graph< Graph, Vertex, VertexProperty >::added_vertex ( Vertex  vertex)
inlineinherited

Notify the named_graph that we have added the given vertex.

The name of the vertex will be added to the mapping.

template<typename Graph , typename Vertex , typename VertexProperty >
void boost::graph::named_graph< Graph, Vertex, VertexProperty >::clearing_graph ( )
inlineinherited

Notify the named_graph that we are clearing the graph.

This will clear out all of the name->vertex mappings

template<typename Graph, typename Vertex, typename VertexProperty>
Graph& boost::graph::named_graph< Graph, Vertex, VertexProperty >::derived ( )
inlineinherited

Retrieve the derived instance.

template<typename Graph, typename Vertex, typename VertexProperty>
const Graph& boost::graph::named_graph< Graph, Vertex, VertexProperty >::derived ( ) const
inlineinherited
template<typename Graph , typename Vertex , typename VertexProperty >
named_graph< Graph, Vertex, VertexProperty >::extract_name_type::result_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::extract_name ( const bundled_vertex_property_type property)
inherited

Extract the name from a vertex property instance.

template<typename Graph , typename Vertex, typename VertexProperty >
template<typename VertexIterStability >
void boost::graph::named_graph< Graph, Vertex, VertexProperty >::removing_vertex ( Vertex  vertex,
VertexIterStability   
)
inlineinherited

Notify the named_graph that we are removing the given vertex.

The name of the vertex will be removed from the mapping.

References BOOST_STATIC_ASSERT_MSG, boost::program_options::value(), and boost::vertex_name.

template<typename Graph , typename Vertex , typename VertexProperty >
optional< typename named_graph< Graph, Vertex, VertexProperty >::vertex_descriptor > boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_by_property ( const bundled_vertex_property_type property)
inherited

Search for a vertex that has the given property (based on its name)

References boost::graph::find_vertex().

Member Data Documentation

template<typename Graph, typename Vertex, typename VertexProperty>
named_vertices_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::named_vertices
inherited

Mapping from names to vertices.

template<typename Graph, typename Vertex, typename VertexProperty>
vertex_constructor_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_constructor
inherited

Constructs a vertex from the name of that vertex.


The documentation for this struct was generated from the following file: