OpendTect-6_4
6.4
|
Simple vector-based container simplifying index-based work. More...
Public Types | |
typedef I | size_type |
typedef T | object_type |
Public Member Functions | |
VectorAccess () | |
VectorAccess (I n) | |
VectorAccess (I n, const T &t) | |
VectorAccess (const VectorAccess &v2) | |
std::vector< T > & | vec () |
const std::vector< T > & | vec () const |
T & | operator[] (I idx) |
const T & | operator[] (I idx) const |
T & | first () |
const T & | first () const |
T & | last () |
const T & | last () const |
I | size () const |
bool | setCapacity (I sz, bool withmargin) |
I | getCapacity () const |
bool | setSize (I sz, T val) |
bool | validIdx (I idx) const |
I | indexOf (const T &, bool forward, I start=-1) const |
I | count (const T &) const |
bool | isPresent (const T &) const |
VectorAccess & | operator= (const VectorAccess &v2) |
bool | push_back (const T &t) |
T | pop_back () |
void | insert (I pos, const T &val) |
void | erase () |
void | erase (const T &t) |
void | remove (I idx) |
void | remove (I i1, I i2) |
void | swap (I i, I j) |
void | fillWith (const T &val) |
void | replace (const T &val, const T &newval) |
void | moveAfter (const T &t, const T &aft) |
void | moveToStart (const T &t) |
Protected Attributes | |
std::vector< T > | v_ |
Simple vector-based container simplifying index-based work.
This class is an implementation detail of the 'sets.h' and 'sortedlist.h' classes. Thus, this class is not meant to be used anywhere else in OpendTect! Use TypeSet, ObjectSet or SortedList instead. If you need to have the std::vector to pass to an external C++ object, use the TypeSet::vec() or SortedList::vec().
NOTE: because this class is based directly upon the STL vector, we have a problem for the bool type. In STL, they have made the vector<bool> implemented in terms of the bit_vector. That really sucks because we cannot return a reference to T! This is why there is a 'BoolTypeSet'.
typedef T VectorAccess< T, I >::object_type |
typedef I VectorAccess< T, I >::size_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Allocates mem for sz, does not change size.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019