30 #ifndef GRT_VECTOR_HEADER 31 #define GRT_VECTOR_HEADER 37 #include "../Util/GRTTypedefs.h" 41 template <
class T>
class Vector :
public std::vector< T >{
53 Vector(
const unsigned int size = 0 ):std::vector< T >(size){}
60 Vector(
const unsigned int size,
const T &value ):std::vector< T >(size, value){}
71 std::copy( rhs.begin(), rhs.end(), this->begin() );
80 Vector(
const std::vector< T > &rhs ){
81 unsigned int N = rhs.size();
84 std::copy( rhs.begin(), rhs.end(), this->begin() );
101 unsigned int N = rhs.
getSize();
104 std::copy( rhs.begin(), rhs.end(), this->begin() );
118 unsigned int N = rhs.size();
121 std::copy( rhs.begin(), rhs.end(), this->begin() );
133 virtual bool resize(
const unsigned int size ){
134 std::vector< T >::resize( size );
145 virtual bool resize(
const unsigned int size,
const T& value ){
146 std::vector< T >::resize( size, value );
159 unsigned int N = rhs.
getSize();
162 std::copy( rhs.begin(), rhs.end(), this->begin() );
177 const unsigned int N = this->size();
179 if( N == 0 )
return false;
181 std::fill(this->begin(),this->end(),value);
201 inline UINT
getSize()
const{
return static_cast<UINT
>(this->size()); }
209 if( this->size() == 0 )
return NULL;
219 if( this->size() == 0 )
return NULL;
228 #endif //GRT_VECTOR_HEADER bool setAll(const T &value)
virtual bool resize(const unsigned int size)
Vector(const std::vector< T > &rhs)
Vector & operator=(const std::vector< T > &rhs)
bool fill(const T &value)
const T * getData() const
Vector & operator=(const Vector &rhs)
Vector(const unsigned int size, const T &value)
Vector(const Vector &rhs)
virtual bool resize(const unsigned int size, const T &value)
Vector(const unsigned int size=0)
virtual bool copy(const Vector< T > &rhs)