OpenWalnut
1.5.0dev
|
A helper class granting safe access to a certain part of the valueset. More...
#include <WValueSet.h>
Public Member Functions | |
~SubArray () | |
Destructor. More... | |
T const & | operator[] (std::size_t i) const |
Safe access. More... | |
Private Member Functions | |
SubArray (T const *const p, std::size_t size) | |
Construct an object that allows safe access. More... | |
Private Attributes | |
T const *const | m_ptr |
the pointer to the first element More... | |
std::size_t const | m_size |
the size of the subarray More... | |
Friends | |
class | WValueSet |
make the valueset a friend More... | |
A helper class granting safe access to a certain part of the valueset.
Definition at line 64 of file WValueSet.h.
|
inline |
Destructor.
Definition at line 73 of file WValueSet.h.
|
inlineprivate |
Construct an object that allows safe access.
(no access to elements not in the subarray's range). Only a valueset may construct a SubArray.
p | A pointer to the first element. |
size | The size of the subarray. |
Definition at line 101 of file WValueSet.h.
|
inline |
Safe access.
Only the const version is allowed.
i | The relative position of the element in the subarray's range. |
Definition at line 86 of file WValueSet.h.
References WValueSet< T >::SubArray::m_ptr, and WValueSet< T >::SubArray::m_size.
|
friend |
make the valueset a friend
Definition at line 68 of file WValueSet.h.
|
private |
the pointer to the first element
Definition at line 108 of file WValueSet.h.
Referenced by WValueSet< T >::SubArray::operator[]().
|
private |
the size of the subarray
Definition at line 111 of file WValueSet.h.
Referenced by WValueSet< T >::SubArray::operator[]().