#include <barray.h>
Inheritance diagram for PLib::BasicArray< T >:

Public Types | |
| typedef const T * | const_iterator |
Public Member Functions | |
| int | n () const |
| BasicArray () | |
| BasicArray (const int ni) | |
| BasicArray (const BasicArray< T > &f2) | |
| BasicArray (T *ap, const int size) | |
| BasicArray (BasicList< T > &list) | |
| virtual | ~BasicArray () |
| BasicArray< T > & | operator= (const BasicArray< T > &f2) |
| int | size () const |
| void | resize (const int nsize) |
| void | resize (const BasicArray< T > &A) |
| void | trim (const int nsize) |
| void | clear () |
| void | untrim () |
| T & | push_back (const T i, int end_buffer=10, double end_mult=-1) |
| virtual void | reset (const T val=0.0) |
| T | operator= (const T val) |
| T & | operator[] (const int i) |
| T | operator[] (const int i) const |
| T * | memory () const |
| void | width (const int w) |
| ostream & | print (ostream &os) const |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
Public Attributes | |
|
FRIEND_ARRAY_ALLOCATOR typedef T * | iterator |
Protected Attributes | |
| int | rsize |
| int | wdth |
| int | destruct |
| int | sze |
| T * | x |
Friends | |
| int | operator!= (const BasicArray< T > &, const BasicArray< T > &) |
| int | operator== (const BasicArray< T > &, const BasicArray< T > &) |
| istream & | operator>> (istream &is, BasicArray< T > &arry) |
| ostream & | operator<< (ostream &os, const BasicArray< T > &arry) |
This is a basis array class, the only particularity is that the resize is not destructive.
|
|||||||||
|
default constructor
|
|
||||||||||
|
constructor with size specified
|
|
||||||||||
|
copy constructor
|
|
||||||||||||||||
|
copy constructor from a pointer The BasicArray is constructed from a pointer and a specified size. The desctructor of the class will { not} delete this pointer when it is finished with it. It is up to the function which created it to delete it.
|
|
||||||||||
|
constructor from a linked list
|
|
|||||||||
|
destructor
|
|
|||||||||
|
clear Clears the memory and reset the size to 0. You must resize the basic array before using it again.
|
|
|||||||||
|
< returns the data pointer
|
|
|||||||||
|
< the perceived size of the array
|
|
||||||||||
|
Reimplemented in PLib::Vector< T >, PLib::Vector< HPoint_nD< float, N > >, PLib::Vector< float >, PLib::Vector< int >, PLib::Vector< HPoint_nD< T, N > >, and PLib::Vector< Point3Df >. |
|
||||||||||
|
assignment operator
Reimplemented in PLib::Vector< T >, PLib::Vector< HPoint_nD< float, N > >, PLib::Vector< float >, PLib::Vector< int >, PLib::Vector< HPoint_nD< T, N > >, and PLib::Vector< Point3Df >. |
|
||||||||||
|
< no range checks are performed
Reimplemented in PLib::CVector< T >. |
|
||||||||||
|
|
|
||||||||||
|
sends a BasicArray to an ostream Sends a BasicArray to an ostream
|
|
||||||||||||||||||||
|
adds a new element at the end of the vector
|
|
||||||||||
|
reset all values of the vetor to val
|
|
||||||||||
|
|
|
|||||||||
|
< returns the size of the array
|
|
||||||||||
|
shortens the array without destroying the components
|
|
||||||||||
|
|
|
||||||||||||||||
|
compares two arrays to see if they're different This checks if one of the components of the two arrays are different. A check is made after each comparison to see if they are the same, this speeds up the calculation if the arrays have early different components, otherwise the use of the == operator would yield a faster result.
|
|
||||||||||||||||
|
sends a BasicArray to the ostream
|
|
||||||||||||||||
|
checks if two arrays are identical
|
|
||||||||||||||||
|
stores an input string into a vector
|
|
|||||
|
specifies if the data should be destroyed on exit
|
|
|||||
|
the actual size of the array
|
|
|||||
|
the known size of the array
|
|
|||||
|
the number of output columns
|
|
|||||
|
the data pointer
|
1.3.4