mirror of
https://github.com/boostorg/graph.git
synced 2025-05-11 13:24:01 +00:00
added requirements for parameter T in property class
[SVN r9700]
This commit is contained in:
parent
64ef954373
commit
13fe19c49b
@ -355,30 +355,40 @@ struct property;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The <TT>PropertyTag</TT> is a tag class (empty class) that simply
|
||||
identifies or gives a unique name to the property. There are several
|
||||
predefined tags, and it is easy to add more.
|
||||
The <b><TT>PropertyTag</TT></b> template parameter is a tag class that
|
||||
simply identifies or gives a unique name to the property. There are
|
||||
several predefined tags, and it is easy to add more.
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
struct vertex_index_t { }
|
||||
struct edge_index_t { }
|
||||
struct graph_name_t { }
|
||||
struct vertex_name_t { }
|
||||
struct edge_name_t { }
|
||||
struct edge_weight_t { }
|
||||
struct vertex_distance_t { }
|
||||
struct vertex_color_t { }
|
||||
struct vertex_degree_t { }
|
||||
struct vertex_out_degree_t { }
|
||||
struct vertex_in_degree_t { }
|
||||
struct vertex_discover_time_t { }
|
||||
struct vertex_finish_time_t { }
|
||||
struct vertex_index_t { ... };
|
||||
struct edge_index_t { ... };
|
||||
struct graph_name_t { ... };
|
||||
struct vertex_name_t { ... };
|
||||
struct edge_name_t { ... };
|
||||
struct edge_weight_t { ... };
|
||||
struct vertex_distance_t { ... };
|
||||
struct vertex_color_t { ... };
|
||||
struct vertex_degree_t { ... };
|
||||
struct vertex_out_degree_t { ... };
|
||||
struct vertex_in_degree_t { ... };
|
||||
struct vertex_discover_time_t { ... };
|
||||
struct vertex_finish_time_t { ... };
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The <TT>T</TT> parameter of <TT>property</TT> specifies the type of the
|
||||
property values. The <TT>NextProperty</TT> parameter allows <TT>property</TT>
|
||||
The <b><TT>T</TT></b> template parameter of <TT>property</TT>
|
||||
specifies the type of the property values. The type <tt>T</tt> must be
|
||||
<a
|
||||
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
|
||||
Constructible</a>, <a
|
||||
href="../../utility/Assignable.html">Assignable</a>, and <a
|
||||
href="../../utility/CopyConstructible.html">Copy Constructible</a>.
|
||||
Like the containers of the C++ Standard Library, the property objects
|
||||
of type <tt>T</tt> are held by-value inside of the graph.
|
||||
|
||||
<p>
|
||||
The <b><TT>NextProperty</TT></b> parameter allows <TT>property</TT>
|
||||
types to be nested, so that an arbitrary number of properties can be
|
||||
attached to the same graph.
|
||||
|
||||
@ -461,9 +471,9 @@ obtained from the graph via the
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
property_map<Graph, capacity_tag>::type capacity
|
||||
property_map<Graph, capacity_t>::type capacity
|
||||
= get(capacity_t(), G);
|
||||
property_map<Graph, flow_tag>::type flow
|
||||
property_map<Graph, flow_t>::type flow
|
||||
= get(flow_t(), G);
|
||||
</PRE>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user