|
|
Category: adaptors |
Component type: type |
The flagged_filter_view
template represents
objects that reference one data container, and that have methods for
accessing its elements. The properties of any flagged_filter_view
instance depend on the properties of the container and flags
template parameters.
The flagged_filter_view
presents only those elements
for which the corresponding flag in the flags container is true.
The properties of the order of elements are the same as those provided by the underlying containers, as is the validity of more than one active iterators at any one time.
flagged_filter_views
are mutable if and only if the
const_tag
template parameter is mutable_view_tag
.
Note that changing elements of the container may result in
invalidated iterators. Thus, use mutable views only if you really
know what you are doing.
A flagged_filter_view
owns its referenced
container/flags, if its base_a/base_b template parameter is
aggregated_ownership,
it merely references its container/flags, if
the base_a/base_b template parameter is referenced_ownership.
Parameter |
Description |
Default |
container |
The view's container type: the type of container referenced by this view |
|
flags |
A parallel container used to filter the first container's elements |
|
|
The view's const tag: either |
|
|
The view's directional iterator category |
|
|
The view's ownership type: the tag class that determines if the view references or owns the container |
|
|
The view's flag ownership type: the tag class that determines if the view references or owns the flags. |
|
Defined in the header flagged_filter_view.hpp.
bool
.
Member |
Where defined |
Description |
|
The type T of the elements accessed through the container. |
|
|
The type of the referenced container. |
|
|
Pointer to T. |
|
|
Reference to T. |
|
|
Const reference to T. |
|
|
An unsigned integral type. |
|
|
A signed integral type. |
|
|
Iterator used to iterate through the view. |
|
|
Const iterator used to iterate through the view. |
|
|
Iterator used to iterate backwards through a container. |
|
|
Const iterator used to iterate backwards through a container. |
|
|
Returns an iterator pointing to the begin of the view. |
|
|
Returns an iterator pointing to the end of the view. |
|
|
Returns a const_iterator pointing to the begin of the view. |
|
|
Returns a const_iterator pointing to the end of the view. |
|
|
Valid for reversible
container's only. Returns a |
|
|
Valid for reversible
container's only. Returns a |
|
|
Valid for reversible
container's only. Returns a |
|
|
Valid for reversible
container's only. Returns a |
|
|
Returns the size of the view. [1] |
|
|
Returns the largest possible size of the view. |
|
|
true if the view's size is 0. |
|
|
The behaviour of default constructed views is undefined, except for subsequent assignment. This is only provided to satisfy the Default Constructible requirement. |
|
|
Creates a view of given container. The size of the flags container must be equal or greater than the size of the data container. |
|
|
Swaps the two views. Iterators are invalidated by this operation. For referencing views, the containers themselves are not swapped. |
|
|
Tests two views for equality. This is a global function, not a member function. Views may be equal even if their referenced containers are not. |
|
|
Lexicographical comparison. This is a global function, not a member function. |
[1] A flagged_filter_view
satisfies
all the requirements of container, except for size()
and
iterator increment/decrement not guaranteeing constant complexity.
VTL Home
Copyright
© 2000 Konrad-Zuse-Zentrum für Informationstechnik Berlin &
Gary Powell All Rights Reserved.