|
OpenWalnut 1.3.1
|
A helper class granting safe access to a certain part of the valueset. More...
#include <WValueSet.h>
Public Member Functions | |
| ~SubArray () | |
| Destructor. | |
| T const & | operator[] (std::size_t i) const |
| Safe access. | |
Private Member Functions | |
| SubArray (T const *const p, std::size_t size) | |
| Construct an object that allows safe access. | |
Private Attributes | |
| T const *const | m_ptr |
| the pointer to the first element | |
| std::size_t const | m_size |
| the size of the subarray | |
Friends | |
| class | WValueSet |
| make the valueset a friend | |
A helper class granting safe access to a certain part of the valueset.
Definition at line 63 of file WValueSet.h.
Destructor.
Definition at line 72 of file WValueSet.h.
| WValueSet< T >::SubArray::SubArray | ( | T const *const | p, |
| std::size_t | size | ||
| ) | [inline, private] |
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 100 of file WValueSet.h.
Safe access.
Only the const version is allowed.
| i | The relative position of the element in the subarray's range. |
Definition at line 85 of file WValueSet.h.
References WValueSet< T >::SubArray::m_ptr, and WValueSet< T >::SubArray::m_size.
friend class WValueSet [friend] |
make the valueset a friend
Definition at line 67 of file WValueSet.h.
T const* const WValueSet< T >::SubArray::m_ptr [private] |
the pointer to the first element
Definition at line 107 of file WValueSet.h.
Referenced by WValueSet< T >::SubArray::operator[]().
std::size_t const WValueSet< T >::SubArray::m_size [private] |
the size of the subarray
Definition at line 110 of file WValueSet.h.
Referenced by WValueSet< T >::SubArray::operator[]().
1.7.4