gVectorExtra< T > Class Template Reference

#include <gVectorExtra.h>

List of all members.

Public Member Functions

 gVectorExtra ()
 gVectorExtra (std::vector< T > const oldOne)
virtual ~gVectorExtra ()
void remove (T el)
void removeAll (std::vector< T > els)
void insertAll (std::vector< T > els)


Detailed Description

template<typename T>
class gVectorExtra< T >

Definition at line 34 of file gVectorExtra.h.


Constructor & Destructor Documentation

template<typename T>
gVectorExtra< T >::gVectorExtra (  )  [inline]

Definition at line 88 of file gVectorExtra.h.

00088 : std::vector<T>() {}

template<typename T>
gVectorExtra< T >::gVectorExtra ( std::vector< T > const   oldOne  )  [inline]

Definition at line 91 of file gVectorExtra.h.

00091                                                        {
00092     typename std::vector<T>::const_iterator iter;
00093     for(iter = oldOne.begin();
00094             iter != oldOne.end();
00095             iter++) {
00096         push_back((*iter));
00097     }
00098 }

template<typename T>
virtual gVectorExtra< T >::~gVectorExtra (  )  [inline, virtual]

Definition at line 39 of file gVectorExtra.h.

00039 {};


Member Function Documentation

template<typename T>
void gVectorExtra< T >::remove ( el  )  [inline]

Definition at line 47 of file gVectorExtra.h.

Referenced by zSelectorAnotherTeammateDead::select(), zSelectorAnother::select(), zSelectorAllButSelf::select(), and zSelectorTeammate::select().

00047                                        {
00048     typename gVectorExtra<T>::iterator it;
00049     for(it = this->begin();
00050             it != this->end();
00051             it++) {
00052         if ( *it == singleElement ) {
00053             this->erase(it);
00054             if (it == this->end())
00055                 break;
00056         }
00057     }
00058 }

Here is the caller graph for this function:

template<typename T>
void gVectorExtra< T >::removeAll ( std::vector< T >  els  )  [inline]

Definition at line 62 of file gVectorExtra.h.

Referenced by zSelectorAnotherNotTeammateDead::select().

00062                                                         {
00063     typename gVectorExtra<T>::iterator it;
00064     typename std::vector<T>::iterator elsIt;
00065     for(elsIt = multipleElements.begin();
00066             elsIt != multipleElements.end();
00067             elsIt++) {
00068         for(it = this->begin();
00069                 it != this->end();
00070                 it++) {
00071             if (*elsIt == *it) {
00072                 this->erase(it);
00073                 if (it == this->end())
00074                     break;
00075             }
00076         }
00077     }
00078 }

Here is the caller graph for this function:

template<typename T>
void gVectorExtra< T >::insertAll ( std::vector< T >  els  )  [inline]

Definition at line 82 of file gVectorExtra.h.

Referenced by zSelectorOwnerTeamTeammate::select(), and zSelectorOwnerTeam::select().

00082                                                         {
00083     this->insert(this->end(), multipleElements.begin(), multipleElements.end());
00084 }

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:45:53 2008 for Armagetron Advanced by  doxygen 1.5.4