3 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
10 <Title>Boost Graph Library: Property
</Title>
11 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
13 <IMG SRC=
"../../../boost.png"
14 ALT=
"C++ Boost" width=
"277" height=
"86">
18 <H1><A NAME=
"sec:property"></A>
19 <TT>property
<PropertyTag, T, NextProperty
></TT>
22 This class can be used with the
<a
23 href=
"./adjacency_list.html"><tt>adjacency_list
</tt></a> and the
<a
24 href=
"./adjacency_matrix.html"><tt>adjacency_matrix
</tt></a> classes
25 to specify what kind of properties should be attached to the vertices
26 and edges of the graph, and to the graph object itself.
33 template
<class Tag, class T, class NextProperty = no_property
>
34 struct property : public NextProperty {
35 typedef NextProperty next_type;
39 property(const T
& v);
40 property(const T
& v, const NextProperty
& b);
41 // copy constructor and assignment operator will be generated by compiler
47 <h3>Template Parameters
</h3>
53 <th>Parameter
</th><th>Description
</th><th>Default
</th>
57 <td><tt>PropertyTag
</tt></td>
59 <td>A type to identify (give a unique name to) the property. There are
60 several predefined tags, and it is easy to add more. For convenience,
61 BGL also provides predefined objects of the tag types (enum values)
62 for use as arguments to functions that expect property tag objects
63 (such as
<tt>adjacency_list
</tt>'s
<a
64 href=
"./adjacency_list.html#property-map-accessors"> property map
65 accessor
</a> functions).
</td>
72 <td> This type specifies the type of the property values.
</td>
77 <td><tt>NextProperty
</tt></td>
78 <td>This parameter allows
<tt>property
</tt> types to be
79 nested, so that an arbitrary number of properties can be attached to
81 <td><tt>no_property
</tt></td>
85 <h3>Where Defined
</h3>
87 <a href=
"../../../boost/pending/property.hpp"><tt>boost/pending/property.hpp
</tt></a>
91 <H3>Associated Types
</H3>
96 The
<tt>NextProperty
</tt> type parameter.
101 The
<tt>Tag
</tt> type parameter.
106 The
<tt>T
</tt> type parameter.
110 <H3>Member Functions
</H3>
116 Construct a property object with member
<tt>m_value
</tt> a default
117 constructed instance of type
<tt>T
</tt> and with the super object
118 default constructed. Note that
<tt>T
</tt> must be Default
119 Constructible for this property, and all the inherited property types.
127 Construct a property object with member
<tt>m_value
</tt> a copy
133 property(const T& v, const NextProperty& b)
136 Construct a property object with member
<tt>m_value
</tt> a copy
137 of
<tt>v
</tt> and whose super class
<tt>NextProperty
</tt> is
138 constructed from
<tt>b
</tt>.
143 <h3>Property Tags
</h3>
145 The following property tags are defined in
146 <tt>boost/graph/properties.hpp
</tt>.
150 enum edge_name_t { edge_name };
151 enum edge_weight_t { edge_weight };
152 enum edge_index_t { edge_index };
153 enum edge_capacity_t { edge_capacity };
154 enum edge_residual_capacity_t { edge_residual_capacity };
155 enum edge_reverse_t { edge_reverse };
156 enum vertex_name_t { vertex_name };
157 enum vertex_distance_t { vertex_distance };
158 enum vertex_index_t { vertex_index };
159 enum vertex_color_t { vertex_color };
160 enum vertex_degree_t { vertex_degree };
161 enum vertex_out_degree_t { vertex_out_degree };
162 enum vertex_in_degree_t { vertex_in_degree };
163 enum vertex_discover_time_t { vertex_discover_time };
164 enum vertex_finish_time_t { vertex_finish_time };
165 enum graph_name_t { graph_name };
167 BOOST_INSTALL_PROPERTY(vertex, index);
168 BOOST_INSTALL_PROPERTY(edge, index);