[/
 / Copyright (c) 2007 Andrew Sutton
 /
 / Distributed under the Boost Software License, Version 1.0. (See accompanying
 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 /]

[section Property Writer]

    template <class PropertyMap, class OutputIterator, class EventTag>
    class property_writer;

This is an [EventVisitor] that can be used to output the property of a vertex
or edge at some event-point within an algorithm.

The [property_writer] class can be used with graph algorithms by wrapping it with
the algorithm specific adaptor, such as [bfs_visitor] and [dfs_visitor].
Also, this event visitor can be combined with other event visitors using `std::pair` to
form an [EventVisitorList].

[h4 Model Of]
[EventVisitor]

[h4 Where Defined]
`boost/graph/visitors.hpp`

[h4 Template Parameters]
[table
    [[Parameter] [Description] [Default]]
    [
        [`PropertyMap`]
        [
            A [ReadablePropertyMap] where the `key_type` is of type `vertex_descriptor`
            of `edge_descriptor` (depending on the event tag) and the `value_type` type is
            of the property is convertible to the `value_type` of the `OutputIterator`.
        ]
    ]
    [
        [`OutputIterator`]
        [
            The iterator type used to write the property values must be a model of
            [SgiOutputIterator].
        ]
    ]
    [
        [`EventTag`]
        [
            A tag used to specify when the property writer should be applied during the graph
            algorithm.
        ]
    ]
]

[h4 Associated Types]
[table
    [[Type] [Description]]
    [
        [`property_writer::event_filter`]
        [
            This type will be the same as the template parameter `EventTag`.
        ]
    ]
]

[h4 Member Functions]
[table
    [[Function] [Description]]
    [
        [`property_writer(PropertyMap pa, OutputIterator out)`]
        [Construct a property writer object with a property map `pa` and an output iterator `out`.]
    ]
    [
        [
``
template <class X, class Graph>
void operator()(X x, const Graph& g)
``
        ]
        [
            This writes the property value for `x` to the output iterator. Specifically,
            `*out++ = get(pa, x)`.
        ]
    ]
]

[h4 Non-Member Functions]
[table
    [[Function] [Description]]
    [
        [
``
template <class PropertyMap, class OutputIterator, class EventTag>
time_stamper<PropertyMap, OutputIterator, EventTag>
stamp_times(Property pa, OutputIterator out, EventTag)
``
        ]
        [
            A convenience function for creating [property_writer] instances.
        ]
    ]
]

[endsect]
