XNetwork 1.7.5; VERSION ${PROJECT_VERSION}
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
AtlasView< Atlas > Class Template Reference

Read-only mapping of mappings (view into a dict-of-dict data structure) More...

#include <coreviews.hpp>

Inheritance diagram for AtlasView< Atlas >:
Inheritance graph
[legend]

Public Types

using size_type = typename std::remove_reference_t< Atlas >::size_type
 

Public Member Functions

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

Public Attributes

Atlas_atlas
 

Detailed Description

template<typename Atlas>
class AtlasView< Atlas >

Read-only mapping of mappings (view into a dict-of-dict data structure)

The inner level of dict is read-write, but the outer level is read-only.

Template Parameters
AtlasThe underlying mapping type

Member Typedef Documentation

◆ size_type

template<typename Atlas >
using AtlasView< Atlas >::size_type = typename std::remove_reference_t<Atlas>::size_type

Constructor & Destructor Documentation

◆ AtlasView()

template<typename Atlas >
AtlasView< Atlas >::AtlasView ( Atlas d)
inlineexplicit

Construct an AtlasView from an Atlas container.

Parameters
dThe Atlas container to create a view of

Member Function Documentation

◆ at()

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

Access element at specified key (const version)

Template Parameters
TThe key type
Parameters
keyThe key to access
Returns
Const reference to the value at the key

◆ begin()

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

Get iterator to the beginning of the view.

Returns
Iterator to the first element

◆ end()

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

Get iterator to the end of the view.

Returns
Iterator past the last element

◆ operator[]() [1/2]

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

Access element at specified key (non-const version)

Template Parameters
TThe key type
Parameters
keyThe key to access
Returns
Reference to the value at the key

◆ operator[]() [2/2]

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

Access element at specified key (const version)

Template Parameters
TThe key type
Parameters
keyThe key to access
Returns
Const reference to the value at the key

◆ size()

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

Get the number of elements in the view.

Returns
The size of the Atlas container

Member Data Documentation

◆ _atlas

template<typename Atlas >
Atlas& AtlasView< Atlas >::_atlas

The documentation for this class was generated from the following file: