Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::ItemMap< T1, T2 > Class Template Reference

Access data in a Range<T2> with an index of type T1. More...

#include <Collection.hh>

Public Types

Type aliases
using key_type = T1
 
using mapped_type = T2
 

Public Member Functions

CELER_FUNCTION ItemMap (Range< T2 > range)
 Contruct from an exising Range<T2>
 
CELER_FORCEINLINE_FUNCTION T2 operator[] (T1 id) const
 Access Range via OpaqueId of type T1.
 
CELER_FORCEINLINE_FUNCTION bool empty () const
 Whether the underlying Range<T2> is empty.
 
CELER_FORCEINLINE_FUNCTION size_type size () const
 Size of the underlying Range<T2>
 

Detailed Description

template<class T1, class T2>
class celeritas::ItemMap< T1, T2 >

Access data in a Range<T2> with an index of type T1.

Here, T1 and T2 are expected to be OpaqueId types. This is simply a type-safe "offset" with range checking.


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