[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
typedef T | value_type; |
typedef typename | Alloc::size_type size_type; |
typedef T* | iterator; |
typedef const T* | const_iterator; |
typedef T& | reference; |
typedef const T& | const_reference; |
explicit | SmallVector(unsigned short defAlloc ); |
explicit | SmallVector(unsigned short Objects, unsigned short defAlloc ); |
SmallVector(const SmallVector< T, Alloc>& a); | |
~SmallVector(); | |
void | push_back(const T& elem); |
reference | operator[](unsigned short index); |
const_reference | operator[](unsigned short index) const; |
iterator | begin(); |
const_iterator | begin() const; |
iterator | end(); |
const_iterator | end() const; |
protected: |
Back to the top of SmallVector
Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.
Back to the top of SmallVector
Back to the top of SmallVector
Back to the top of SmallVector
Note that one may supply a different base class to the SmallVector class.
This immediately raises two possiblilities:
a. Change size and space to integers and thereby allow virtually unlimited
vector length.
b. Redefine the incrAllocSpace function which calculates the amount of space
to be allocated when the allocated space overflows due to a push_back
operation.
The class is not truly STL compliant though feeding this container into some of the STL algoritms might actually work.
Back to the top of SmallVector
typedef T value_type;
STL compliant typedef.
typedef T value_type;
Back to the top of SmallVector
typedef typename Alloc::size_type size_type;
STL compliant typedef.
typedef typename Alloc::size_type size_type;
Back to the top of SmallVector
typedef T* iterator;
STL compliant typedef.
typedef T* iterator;
Back to the top of SmallVector
typedef const T* const_iterator;
STL compliant typedef.
typedef const T* const_iterator;
Back to the top of SmallVector
typedef T& reference;
STL compliant typedef.
typedef T& reference;
Back to the top of SmallVector
typedef const T& const_reference;
STL compliant typedef.
typedef const T& const_reference;
Back to the top of SmallVector
explicit SmallVector(unsigned short defAlloc );
Constructor receives initial space to allocate. Default is 3.
explicit SmallVector(unsigned short defAlloc=3);
Back to the top of SmallVector
explicit SmallVector(unsigned short Objects, unsigned short defAlloc );
Constructor receives initial number of objects in create in the
// vector and initial space to allocate.
// If space is too small to fit objects - SmallVector will allocate more!
// Please VERY be carefull the first object are NOT initiated they are
// meaningless objects
explicit SmallVector(unsigned short Objects, unsigned short defAlloc=3);
Back to the top of SmallVector
SmallVector(const SmallVector< T, Alloc>& a);
Copy constructor
SmallVector(const SmallVector< T, Alloc>& a);
Back to the top of SmallVector
~SmallVector();
Destructor. Deletes vector data.
~SmallVector();
Back to the top of SmallVector
void push_back(const T& elem);
Adds an item at the end of the array. Allocates more space if needed.
void push_back(const T& elem);
Back to the top of SmallVector
reference operator[](unsigned short index);
Returns reference to indexed element of the vector.
reference operator[](unsigned short index);
Back to the top of SmallVector
const_reference operator[](unsigned short index) const;
Returns a const reference to indexed element of the vector.
const_reference operator[](unsigned short index) const;
Back to the top of SmallVector
iterator begin();
Returns a pointer to the vector's head.
iterator begin();
Back to the top of SmallVector
const_iterator begin() const;
Returns a pointer to the vector's head.
const_iterator begin() const;
Back to the top of SmallVector
iterator end();
Returns a pointer to the vector's end. The end is past the last element
of the vector.
iterator end();
Back to the top of SmallVector
const_iterator end() const;
Returns a pointer to the vector's end. The end is past the last element
of the vector.
const_iterator end() const;
Back to the top of SmallVector
public: | ||
---|---|---|
typedef T | value_type; | |
typedef typename | Alloc::size_type size_type; | |
typedef T* | iterator; | |
typedef const T* | const_iterator; | |
typedef T& | reference; | |
typedef const T& | const_reference; | |
explicit | SmallVector(unsigned short defAlloc ); | |
explicit | SmallVector(unsigned short Objects, unsigned short defAlloc ); | |
void | push_back(const T& elem); | |
reference | operator[](unsigned short index); | |
const_reference | operator[](unsigned short index) const; | |
iterator | begin(); | |
const_iterator | begin() const; | |
iterator | end(); | |
const_iterator | end() const; | |
protected: |
Back to the top of SmallVector
Back to the top of SmallVector
Back to the top of SmallVector
Report problems to jkotula@unimax.com