Vector assignment specifications


Member Functions That You Must Provide

bool contains (const Item_Type &val) const
size_t count (const Item_Type &val) const
size_t index (const Item_Type &val) const
void remove (const Item_Type &val)
void reverse ()


Member Function Documentation

template<typename Item_Type>
bool KW::vector< Item_Type >::contains const Item_Type &  val  )  const
 

Determines whether the given value is contained in the vector.

Parameters:
val The value
Returns:
true if contained, false otherwise

template<typename Item_Type>
size_t KW::vector< Item_Type >::count const Item_Type &  val  )  const
 

Determines the number of occurrences of given value.

Parameters:
val The value
Returns:
the number of occurrences

template<typename Item_Type>
size_t KW::vector< Item_Type >::index const Item_Type &  val  )  const
 

Determines the first index at which give value occurs (if any).

Parameters:
val The value
Returns:
the first index, if found; otherwise returns size (clearly an invalid index)

template<typename Item_Type>
void KW::vector< Item_Type >::remove const Item_Type &  val  ) 
 

Removes all occurrences of given value (if any).

Parameters:
val The value
Note: this is difference semantics than Python's remove.

template<typename Item_Type>
void KW::vector< Item_Type >::reverse  ) 
 

Reverse the contents of the vector.


Generated on Wed Feb 14 10:29:15 2007 by doxygen 1.3.4