View Template Library


map_values<Container, Const_tag, Base>

Category: adaptors

Component type: type

Description

The map_values is a tranform_view presenting the values of a Pair Associative Container.

Template parameters


Parameter

Description

Default

container

The view's container type: in general, this will be a Pair Associative Container.


const_tag

The view's const tag: either const_view_tag or mutable_view_tag

const_view_tag

base

The view's ownership type: the base class that determines if the view references or owns the container. In general, only the default referenced_ownership will be useful.

referenced_ownership

Definition

Defined in the header map_view.hpp.

Model of

Single Container View

Type requirements

Container satisfies

View satisfies

Container

Container [1]

Forward Container

Forward Container [1]

Pair Associative Container


Members

 

Member

Where defined

Description

value_type

Container

The type container::value_type::second of the elements accessed through the container.

domain_t

view

The type of the referenced container.

pointer

Container

Pointer to value_type.

reference

Container

Reference to value_type.

const_reference

Container

Const reference to value_type.

size_type

Container

container::size_type.

difference_type

Container

container::difference_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 container.

const_reverse_iterator

Reversible Container

Const iterator used to iterate backwards through a container.

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

Valid for bidirectional container's only. Returns a reverse_iterator pointing to the beginning of the reversed container.

reverse_iterator rend()

Reversible Container

Valid for bidirectional container's only. Returns a reverse_iterator pointing to the end of the reversed container.

const_reverse_iterator rbegin() const

Reversible Container

Valid for bidirectional container's only. Returns a const_reverse_iterator pointing to the beginning of the reversed container.

const_reverse_iterator rend() const

Reversible Container

Valid for bidirectional container's only. Returns a const_reverse_iterator pointing to the end of the reversed container.

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.

map_values()

view

Creates an empty view.

map_values(container_t&)

view

Creates a view of given container.

void swap(map_values&)

Container

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

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

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 map_values&, const map_values&)

Forward Container

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

Notes

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



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