View Template Library


reversible_transform_view<>

Category: adaptors

Component type: type

Description

The reversible_transform_view template is derived from the transform_view template. The only difference is that reversible_transform_view requires its container to be reversible and then provides the interface of a reversible or random access container.

Template parameters

Parameter

Description

Default

container

The view's container type: the type of container referenced by this view

transformation

The view's transformation type: the type of the transformation used to transform the container's elements 


base

The view's ownership type:  the base class that determines if the view references or owns the container

view_ref

T

The view's value type: the type of elements referenced by this view.

transformation::result_type

const_tag

The view's constness tag: either const_view_tag or mutable_view_tag

const_view_tag

Definition

Defined in the header transform_view.hpp.

Model of

View

Type requirements

container has to be reversible. T has to be assignable. transformation has to be a functor with value type T and argument type container::value_type.
The requirements the view satisfies depend on the requirements its template parameters satisfy:
 

Container satisfies

View satisfies

Container

Container

Forward Container

Forward Container

Reversible Container

Reversible Container

Random Access Container

Random Access Container

Members

Member

Where defined

Description

value_type

Container

The type T of the elements accessed through the container.

domain_t

view

The type of the referenced container.

predicate_t

view

The type of the filtering predicate.

transform_t

view

The type of the transformation.

pointer

Container

Pointer to T.

reference

Container

Reference to T.

const_reference

Container

Const reference to T.

size_type

Container

An unsigned integral type.

difference_type

Container

A signed integral type.

iterator

Container

Iterator used to iterate through the view.

const_iterator

Container

Const iterator used to iterate through the view.

reverse_iterator

Reversible Container

Iterator used to iterate backwards through a view.

const_reverse_iterator

Reversible Container

Const iterator used to iterate backwards through a view.

iterator begin()

Container

Returns an iterator pointing to the begin of the view.

iterator end()

Container

Returns an iterator pointing to the end of the view.

const_iterator begin() const

Container

Returns a const_iterator pointing to the begin of the view.

const_iterator end() const

Container

Returns a const_iterator pointing to the end of the view.

reverse_iterator rbegin()

Reversible Container

Returns a reverse_iterator pointing to the beginning of the reversed view.

reverse_iterator rend()

Reversible Container

Returns a reverse_iterator pointing to the end of the reversed view.

const_reverse_iterator rbegin() const

Reversible Container

Returns a const_reverse_iterator pointing to the beginning of the reversed view.

const_reverse_iterator rend() const

Reversible Container

Returns a const_reverse_iterator pointing to the end of the reversed view.

size_type size() const

Container

Returns the size of the view.

size_type max_size() const

Container

Returns the largest possible size of the view.

bool empty() const

Container

true if the view's size is 0.

reversible_transform_view()

view

Creates an empty view.

reversible_transform_view(container_t&, const transform_t&)

view

Creates a view of given container.

void swap(view&)

Container

Swaps the two views. Iterators are invalidated by this operation. For referencing views, the containers themselves are not swapped.

bool operator==(const reversible_transform_view&, const reversible_transform_view&)

Forward Container

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.

bool operator<(const reversible_transform_view&, const reversible_transform_view&)

Forward Container

Lexicographical comparison. This is a global function, not a member function.

Notes

[1] A reversible_transform_view satisfies all the requirements of container, except for its iterators ->() operator.



VTL Home
Copyright © 1999 Konrad-Zuse-Zentrum für Informationstechnik Berlin All Rights Reserved.