Public Types | Public Member Functions

constructible_tree< Graph > Class Template Reference

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

List of all members.

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.
typedef Graph graph_type
 Type of the graph.
typedef boost::graph_traits
< Graph >::vertex_descriptor 
node_type
 Type of a node.

Public Member Functions

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

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
Graph& graph ( ) [inline]

Returns a mutable reference to the underlying graph.

Author:
RevKit
Since:
1.1
const Graph& graph ( ) const [inline]

Returns 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Generated on Wed May 25 2011 16:34:52 for RevKit by doxygen 1.7.3