vector< T > Class Template Reference
[Mathematics Classes.]

A dynamically-sized array. More...

#include <FMArray.h>

Inheritance diagram for vector< T >:

List of all members.

Public Member Functions

 vector ()
 Default constructor.
 vector (size_t size)
 Constructor: Builds a dynamically-sized array of the wanted size.
 vector (size_t size, const T &defaultValue)
 Constructor: Builds a dynamically-sized array of the wanted size.
 vector (const std::vector &copy)
 Copy constructor.
 vector (const T *values, size_t count)
 Constructor: Builds a dynamically-sized array from a constant-sized array.
template<typename _T>
iterator find (const _T &value)
 Retrieves an iterator for a given element.
template<typename _T>
const_iterator find (const _T &value) const
 See above.
void erase (iterator it)
 Removes the value at the given position within the list.
void erase (iterator first, iterator last)
 Removes the value at the given position within the list.
bool erase (const T &value)
 Removes a value contained within the list, once.
void erase (size_t index)
 Removes an indexed value contained within the list.
bool release (const T &value)
 Releases a value contained within a list.
bool contains (const T &value) const
 Retrieves whether the list contains a given value.

Detailed Description

template<class T>
class vector< T >

A dynamically-sized array.

Built on top of the standard C++ vector class, this class improves on the interface by adding useful extra functionality, such as constructor that takes in a constant-sized array, comparison which a constant-sized array, erase and find functions that take in a value, etc.


Constructor & Destructor Documentation

template<class T>
vector< T >::vector size_t  size  )  [inline]
 

Constructor: Builds a dynamically-sized array of the wanted size.

Parameters:
size The wanted size of the array.

template<class T>
vector< T >::vector size_t  size,
const T &  defaultValue
[inline]
 

Constructor: Builds a dynamically-sized array of the wanted size.

Parameters:
size The wanted size of the array
defaultValue The default value to use for all the entries of the array.

template<class T>
vector< T >::vector const std::vector< T > &  copy  )  [inline]
 

Copy constructor.

Parameters:
copy The dynamically-sized array to copy the values from.

template<class T>
vector< T >::vector const T *  values,
size_t  count
[inline]
 

Constructor: Builds a dynamically-sized array from a constant-sized array.

Parameters:
values A constant-sized array of floating-point values.
count The size of the constant-sized array.


Member Function Documentation

template<class T>
bool vector< T >::contains const T &  value  )  const [inline]
 

Retrieves whether the list contains a given value.

Returns:
Whether the list contains a given value.

template<class T>
void vector< T >::erase size_t  index  )  [inline]
 

Removes an indexed value contained within the list.

Parameters:
index The index of the value to erase.

template<class T>
bool vector< T >::erase const T &  value  )  [inline]
 

Removes a value contained within the list, once.

Parameters:
value The value, contained within the list, to erase from it.
Returns:
Whether the value was found and erased from the list.

template<class T>
void vector< T >::erase iterator  first,
iterator  last
[inline]
 

Removes the value at the given position within the list.

Parameters:
it The list position for the value to remove.

template<class T>
void vector< T >::erase iterator  it  )  [inline]
 

Removes the value at the given position within the list.

Parameters:
it The list position for the value to remove.

template<class T>
template<typename _T>
iterator vector< T >::find const _T &  value  )  [inline]
 

Retrieves an iterator for a given element.

Parameters:
value The value, contained within the list, to search for.
Returns:
An iterator to this element. The end() iterator is returned if the value is not found.

template<class T>
bool vector< T >::release const T &  value  )  [inline]
 

Releases a value contained within a list.

Use this function only if your vector contains pointers and you are certain that there is no duplicate pointers within the list.

Parameters:
value The value, contained within the list, to release.
Returns:
Whether the value was found and released.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:44 2006 for FCollada by  doxygen 1.4.6-NO