template<class T>
class Vector< T >
Definition at line 41 of file Vector.h.
Default Constructor Constructor, sets the size of the vector
- Parameters
-
size | the size of the vector |
Definition at line 53 of file Vector.h.
template<class T>
Vector< T >::Vector |
( |
const unsigned int |
size, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Constructor, sets the size of the vector and sets all elements to value
- Parameters
-
size | the size of the vector |
Definition at line 60 of file Vector.h.
Copy Constructor, copies the values from the rhs Vector to this Vector instance
- Parameters
-
rhs | the Vector from which the values will be copied |
Definition at line 67 of file Vector.h.
Copy Constructor, copies the values from the rhs std::vector to this Vector instance
- Parameters
-
rhs | the base class instance from which the values will be copied |
Definition at line 80 of file Vector.h.
Destructor, cleans up any memory
Definition at line 91 of file Vector.h.
Copies the data from the rhs vector to this vector.
- Parameters
-
rhs | the vector you want to copy into this vector |
- Returns
- returns true or false, indicating if the copy was successful
Definition at line 156 of file Vector.h.
Gets a pointer to the first element in the vector
- Returns
- returns a pointer to the raw data
Definition at line 200 of file Vector.h.
template<class T>
const T* Vector< T >::getData |
( |
| ) |
const |
|
inline |
Gets a pointer to the first element in the vector
- Returns
- returns a pointer to the raw data
Definition at line 210 of file Vector.h.
template<class T>
unsigned int Vector< T >::getSize |
( |
| ) |
const |
|
inline |
Defines how the data from the rhs Vector should be copied to this Vector
- Parameters
-
rhs | another instance of a Vector |
- Returns
- returns a reference to this instance of the Vector
Definition at line 99 of file Vector.h.
template<class T>
Vector& Vector< T >::operator= |
( |
const std::vector< T > & |
rhs | ) |
|
|
inline |
Defines how the data from the rhs std::vector instance should be copied to this Vector
- Parameters
-
rhs | another instance of a Vector |
- Returns
- returns a reference to this instance of the Vector
Definition at line 116 of file Vector.h.
template<class T>
virtual bool Vector< T >::resize |
( |
const unsigned int |
size | ) |
|
|
inlinevirtual |
Defines how the vector should be resized
- Parameters
-
size | the new size of the vector |
- Returns
- returns true if the vector was resized correctly, false otherwise
Definition at line 133 of file Vector.h.
template<class T>
virtual bool Vector< T >::resize |
( |
const unsigned int |
size, |
|
|
const T & |
value |
|
) |
| |
|
inlinevirtual |
Defines how the vector should be resized, this will also set all the values in the vector to [value]
- Parameters
-
size | the new size of the vector |
value | the value that will be copied to all elements in the vector |
- Returns
- returns true if the vector was resized correctly, false otherwise
Definition at line 145 of file Vector.h.
template<class T>
bool Vector< T >::setAll |
( |
const T & |
value | ) |
|
|
inline |
Sets all the values in the Vector to the input value
- Parameters
-
value | the value you want to set all the Vector values to |
- Returns
- returns true or false, indicating if the set was successful
Definition at line 175 of file Vector.h.
The documentation for this class was generated from the following file: