List of all members | Public Types | Public Member Functions
constructible_tree< Graph > Class Template Reference

This class represents a tree based on a Boost.Graph. More...

Inheritance diagram for constructible_tree< Graph >:

Public Types

typedef boost::graph_as_tree
< Graph,
boost::iterator_property_map
< typename std::vector
< typename boost::graph_traits
< Graph >::vertex_descriptor >
::iterator, typename
boost::property_map< Graph,
boost::vertex_index_t >::type >
, typename boost::graph_traits
< Graph >::vertex_descriptor > 
super
 Type of super class. More...
 
typedef Graph graph_type
 Type of the graph. More...
 
typedef boost::graph_traits
< Graph >::vertex_descriptor 
node_type
 Type of a node. More...
 

Public Member Functions

 constructible_tree ()
 Standard constructor. More...
 
const Graph & graph () const
 Returns the underlying graph. More...
 
Graph & graph ()
 Returns a mutable reference to the underlying graph. More...
 
node_type root () const
 Returns the root of the graph. More...
 
void set_root (node_type root)
 Sets the root of the graph. More...
 
node_type parent (node_type n) const
 Returns the parent of a node. More...
 
void children (node_type n, std::vector< node_type > &children) const
 Returns the children of a node. More...
 

Detailed Description

template<typename Graph>
class revkit::constructible_tree< Graph >

This class represents a tree based on a Boost.Graph.

This class uses the boost::graph_as_tree, but offers convinient methods for access the root, children, and parents.

Author
RevKit
Since
1.1

Member Typedef Documentation

typedef Graph graph_type

Type of the graph.

Author
RevKit
Since
1.1
typedef boost::graph_traits<Graph>::vertex_descriptor node_type

Type of a node.

Author
RevKit
Since
1.1
typedef boost::graph_as_tree<Graph, boost::iterator_property_map<typename std::vector<typename boost::graph_traits<Graph>::vertex_descriptor>::iterator, typename boost::property_map<Graph, boost::vertex_index_t>::type>, typename boost::graph_traits<Graph>::vertex_descriptor> super

Type of super class.

Author
RevKit
Since
1.1

Constructor & Destructor Documentation

constructible_tree ( )
inline

Standard constructor.

Initializes default values

Author
RevKit
Since
1.1

Member Function Documentation

void children ( node_type  n,
std::vector< node_type > &  children 
) const
inline

Returns the children of a node.

Parameters
nNode
childrenEmpty list containing the children of node n after the call
Author
RevKit
Since
1.1
const Graph& graph ( ) const
inline

Returns the underlying graph.

Author
RevKit
Since
1.1
Graph& graph ( )
inline

Returns a mutable reference to the underlying graph.

Author
RevKit
Since
1.1
node_type parent ( node_type  n) const
inline

Returns the parent of a node.

Parameters
nNode
Returns
Parent of node n
Author
RevKit
Since
1.1
node_type root ( ) const
inline

Returns the root of the graph.

Returns
Node
Author
RevKit
Since
1.1
void set_root ( node_type  root)
inline

Sets the root of the graph.

Parameters
rootNode
Author
RevKit
Since
1.1

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

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1