template<typename Atlas>
AtlasView class

An AtlasView is a Read-only Mapping of Mappings.

It is a View into a dict-of-dict data structure. The inner level of dict is read-write. But the outer level is read-only.

See Also

AdjacencyView - View into dict-of-dict-of-dict MultiAdjacencyView - View into dict-of-dict-of-dict-of-dict

Interface: Mapping

Derived classes

template<typename Atlas>
class AdjacencyView

Constructors, destructors, conversion operators

AtlasView(Atlas& d) explicit
Construct an AtlasView from an Atlas container.

Public functions

auto size() const -> size_t -> auto
Get the number of elements in the view.
auto begin() const -> auto
Get iterator to the beginning of the view.
auto end() const -> auto
Get iterator to the end of the view.
template<typename T>
auto operator[](const T& key) const -> const auto & -> auto
Access element at specified key (const version)
template<typename T>
auto at(const T& key) const -> const auto & -> auto
Access element at specified key (const version)
template<typename T>
auto operator[](const T& key) -> auto & -> auto
Access element at specified key (non-const version)

Function documentation

template<typename Atlas>
AtlasView<Atlas>::AtlasView(Atlas& d) explicit

Construct an AtlasView from an Atlas container.

Parameters
d The Atlas container to create a view of

template<typename Atlas>
auto AtlasView<Atlas>::size() const -> size_t

Get the number of elements in the view.

Returns The size of the Atlas container

template<typename Atlas>
auto AtlasView<Atlas>::begin() const

Get iterator to the beginning of the view.

Returns Iterator to the first element

template<typename Atlas>
auto AtlasView<Atlas>::end() const

Get iterator to the end of the view.

Returns Iterator past the last element

template<typename Atlas> template<typename T>
auto AtlasView<Atlas>::operator[](const T& key) const -> const auto &

Access element at specified key (const version)

Template parameters
T The key type
Parameters
key The key to access
Returns Const reference to the value at the key

template<typename Atlas> template<typename T>
auto AtlasView<Atlas>::at(const T& key) const -> const auto &

Access element at specified key (const version)

Template parameters
T The key type
Parameters
key The key to access
Returns Const reference to the value at the key

template<typename Atlas> template<typename T>
auto AtlasView<Atlas>::operator[](const T& key) -> auto &

Access element at specified key (non-const version)

Template parameters
T The key type
Parameters
key The key to access
Returns Reference to the value at the key