mirror of
https://github.com/boostorg/graph.git
synced 2025-05-12 05:41:44 +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>
|
</PRE>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
The <TT>PropertyTag</TT> is a tag class (empty class) that simply
|
The <b><TT>PropertyTag</TT></b> template parameter is a tag class that
|
||||||
identifies or gives a unique name to the property. There are several
|
simply identifies or gives a unique name to the property. There are
|
||||||
predefined tags, and it is easy to add more.
|
several predefined tags, and it is easy to add more.
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
<PRE>
|
<PRE>
|
||||||
struct vertex_index_t { }
|
struct vertex_index_t { ... };
|
||||||
struct edge_index_t { }
|
struct edge_index_t { ... };
|
||||||
struct graph_name_t { }
|
struct graph_name_t { ... };
|
||||||
struct vertex_name_t { }
|
struct vertex_name_t { ... };
|
||||||
struct edge_name_t { }
|
struct edge_name_t { ... };
|
||||||
struct edge_weight_t { }
|
struct edge_weight_t { ... };
|
||||||
struct vertex_distance_t { }
|
struct vertex_distance_t { ... };
|
||||||
struct vertex_color_t { }
|
struct vertex_color_t { ... };
|
||||||
struct vertex_degree_t { }
|
struct vertex_degree_t { ... };
|
||||||
struct vertex_out_degree_t { }
|
struct vertex_out_degree_t { ... };
|
||||||
struct vertex_in_degree_t { }
|
struct vertex_in_degree_t { ... };
|
||||||
struct vertex_discover_time_t { }
|
struct vertex_discover_time_t { ... };
|
||||||
struct vertex_finish_time_t { }
|
struct vertex_finish_time_t { ... };
|
||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
The <TT>T</TT> parameter of <TT>property</TT> specifies the type of the
|
The <b><TT>T</TT></b> template parameter of <TT>property</TT>
|
||||||
property values. The <TT>NextProperty</TT> parameter allows <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
|
types to be nested, so that an arbitrary number of properties can be
|
||||||
attached to the same graph.
|
attached to the same graph.
|
||||||
|
|
||||||
@ -461,9 +471,9 @@ obtained from the graph via the
|
|||||||
|
|
||||||
<P>
|
<P>
|
||||||
<PRE>
|
<PRE>
|
||||||
property_map<Graph, capacity_tag>::type capacity
|
property_map<Graph, capacity_t>::type capacity
|
||||||
= get(capacity_t(), G);
|
= get(capacity_t(), G);
|
||||||
property_map<Graph, flow_tag>::type flow
|
property_map<Graph, flow_t>::type flow
|
||||||
= get(flow_t(), G);
|
= get(flow_t(), G);
|
||||||
</PRE>
|
</PRE>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user