Fabcoin Core
0.16.2
P2P Digital Currency
|
A modifiable reference to an existing object or vector in memory. More...
#include <vector_ref.h>
Public Types | |
using | value_type = _T |
using | element_type = _T |
using | mutable_value_type = typename std::conditional< std::is_const< _T >::value, typename std::remove_const< _T >::type, _T >::type |
Public Member Functions | |
vector_ref () | |
vector_ref (_T *_data, size_t _count) | |
Creates a new vector_ref to point to _count elements starting at _data. More... | |
vector_ref (typename std::conditional< std::is_const< _T >::value, std::string const *, std::string * >::type _data) | |
Creates a new vector_ref pointing to the data part of a string (given as pointer). More... | |
vector_ref (typename std::conditional< std::is_const< _T >::value, std::vector< typename std::remove_const< _T >::type > const *, std::vector< _T > * >::type _data) | |
Creates a new vector_ref pointing to the data part of a vector (given as pointer). More... | |
vector_ref (typename std::conditional< std::is_const< _T >::value, std::string const &, std::string & >::type _data) | |
Creates a new vector_ref pointing to the data part of a string (given as reference). More... | |
operator bool () const | |
bool | contentsEqual (std::vector< mutable_value_type > const &_c) const |
std::vector< mutable_value_type > | toVector () const |
std::vector< unsigned char > | toBytes () const |
std::string | toString () const |
template<class _T2 > | |
operator vector_ref< _T2 > () const | |
operator vector_ref< _T const > () const | |
_T * | data () const |
size_t | count () const |
size_t | size () const |
bool | empty () const |
vector_ref< _T > | next () const |
vector_ref< _T > | cropped (size_t _begin, size_t _count) const |
vector_ref< _T > | cropped (size_t _begin) const |
void | retarget (_T *_d, size_t _s) |
void | retarget (std::vector< _T > const &_t) |
template<class T > | |
bool | overlapsWith (vector_ref< T > _t) const |
void | copyTo (vector_ref< typename std::remove_const< _T >::type > _t) const |
Copies the contents of this vector_ref to the contents of _t, up to the max size of _t. More... | |
void | populate (vector_ref< typename std::remove_const< _T >::type > _t) const |
Copies the contents of this vector_ref to the contents of _t, and zeros further trailing elements in _t. More... | |
void | cleanse () |
Securely overwrite the memory. More... | |
_T * | begin () |
_T * | end () |
_T const * | begin () const |
_T const * | end () const |
_T & | operator[] (size_t _i) |
_T const & | operator[] (size_t _i) const |
bool | operator== (vector_ref< _T > const &_cmp) const |
bool | operator!= (vector_ref< _T > const &_cmp) const |
void | reset () |
Private Attributes | |
_T * | m_data |
size_t | m_count |
A modifiable reference to an existing object or vector in memory.
Definition at line 20 of file vector_ref.h.
using dev::vector_ref< _T >::element_type = _T |
Definition at line 24 of file vector_ref.h.
using dev::vector_ref< _T >::mutable_value_type = typename std::conditional<std::is_const<_T>::value, typename std::remove_const<_T>::type, _T>::type |
Definition at line 25 of file vector_ref.h.
using dev::vector_ref< _T >::value_type = _T |
Definition at line 23 of file vector_ref.h.
|
inline |
|
inline |
Creates a new vector_ref to point to _count elements starting at _data.
Definition at line 31 of file vector_ref.h.
|
inline |
Creates a new vector_ref pointing to the data part of a string (given as pointer).
Definition at line 33 of file vector_ref.h.
|
inline |
Creates a new vector_ref pointing to the data part of a vector (given as pointer).
Definition at line 35 of file vector_ref.h.
|
inline |
Creates a new vector_ref pointing to the data part of a string (given as reference).
Definition at line 37 of file vector_ref.h.
|
inline |
|
inline |
Definition at line 95 of file vector_ref.h.
|
inline |
Securely overwrite the memory.
Definition at line 74 of file vector_ref.h.
|
inline |
|
inline |
Copies the contents of this vector_ref to the contents of _t, up to the max size of _t.
Definition at line 69 of file vector_ref.h.
|
inline |
Definition at line 53 of file vector_ref.h.
|
inline |
Definition at line 62 of file vector_ref.h.
|
inline |
Definition at line 64 of file vector_ref.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 96 of file vector_ref.h.
|
inline |
Definition at line 58 of file vector_ref.h.
|
inlineexplicit |
Definition at line 41 of file vector_ref.h.
|
inline |
Definition at line 49 of file vector_ref.h.
|
inlineexplicit |
Definition at line 48 of file vector_ref.h.
|
inline |
Definition at line 102 of file vector_ref.h.
|
inline |
|
inline |
Definition at line 98 of file vector_ref.h.
|
inline |
Definition at line 99 of file vector_ref.h.
|
inline |
|
inline |
Copies the contents of this vector_ref to the contents of _t, and zeros further trailing elements in _t.
Definition at line 71 of file vector_ref.h.
|
inline |
|
inline |
|
inline |
Definition at line 66 of file vector_ref.h.
|
inline |
Definition at line 55 of file vector_ref.h.
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 112 of file vector_ref.h.
|
private |
Definition at line 111 of file vector_ref.h.