zSelectorOwnerTeamTeammate Class Reference

#include <zSelector.h>

Inheritance diagram for zSelectorOwnerTeamTeammate:

Inheritance graph
[legend]
Collaboration diagram for zSelectorOwnerTeamTeammate:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 zSelectorOwnerTeamTeammate ()
 zSelectorOwnerTeamTeammate (zSelectorOwnerTeamTeammate const &other)
void operator= (zSelectorOwnerTeamTeammate const &other)
 overloaded assignment operator
virtual
zSelectorOwnerTeamTeammate
copy (void) const
virtual ~zSelectorOwnerTeamTeammate ()
gVectorExtra< ePlayerNetID * > select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer)

Static Public Member Functions

static zSelectorcreate ()


Detailed Description

Definition at line 239 of file zSelector.h.


Constructor & Destructor Documentation

zSelectorOwnerTeamTeammate::zSelectorOwnerTeamTeammate (  ) 

Definition at line 536 of file zSelector.cpp.

Referenced by copy(), and create().

00536                                                       :
00537         zSelector()
00538 { }

Here is the caller graph for this function:

zSelectorOwnerTeamTeammate::zSelectorOwnerTeamTeammate ( zSelectorOwnerTeamTeammate const &  other  ) 

Definition at line 540 of file zSelector.cpp.

00540                                                                                              :
00541         zSelector(other)
00542 { }

virtual zSelectorOwnerTeamTeammate::~zSelectorOwnerTeamTeammate (  )  [inline, virtual]

Definition at line 247 of file zSelector.h.

00247 {};


Member Function Documentation

zSelector * zSelectorOwnerTeamTeammate::create (  )  [static]

Reimplemented from zSelector.

Definition at line 531 of file zSelector.cpp.

References zSelectorOwnerTeamTeammate().

00532 {
00533     return new zSelectorOwnerTeamTeammate();
00534 }

Here is the call graph for this function:

void zSelectorOwnerTeamTeammate::operator= ( zSelectorOwnerTeamTeammate const &  other  ) 

overloaded assignment operator

Definition at line 544 of file zSelector.cpp.

References zSelector::operator=().

00545 {
00546     this->zSelector::operator=(other);
00547 }

Here is the call graph for this function:

zSelectorOwnerTeamTeammate * zSelectorOwnerTeamTeammate::copy ( void   )  const [virtual]

Reimplemented from zSelector.

Definition at line 549 of file zSelector.cpp.

References zSelectorOwnerTeamTeammate().

00550 {
00551     return new zSelectorOwnerTeamTeammate(*this);
00552 }

Here is the call graph for this function:

gVectorExtra< ePlayerNetID * > zSelectorOwnerTeamTeammate::select ( gVectorExtra< nNetObjectID > &  owners,
gVectorExtra< nNetObjectID > &  teamOwners,
gCycle triggerer 
) [virtual]

Reimplemented from zSelector.

Definition at line 554 of file zSelector.cpp.

References _alive, eTeam::GetAllMembers(), zSelector::getAllValid(), gVectorExtra< T >::insertAll(), zSelector::pickOne(), and sn_netObjects.

00555 {
00556     // Pick all the members of the teams
00557     gVectorExtra <ePlayerNetID *> allTeammates;
00558     gVectorExtra< nNetObjectID >::const_iterator iter;
00559     for(iter = teamOwners.begin();
00560             iter != teamOwners.end();
00561             ++iter)
00562     {
00563         // Is the object still there
00564         if(bool(sn_netObjects[(*iter)]))
00565         {
00566             eTeam * aTeam = static_cast< eTeam* >( static_cast< nNetObject* >( sn_netObjects[ (*iter) ] ) ) ;
00567             if(aTeam != 0)
00568                 allTeammates.insertAll(aTeam->GetAllMembers());
00569         }
00570     }
00571 
00572     // Keep only the valid ones
00573     gVectorExtra <ePlayerNetID *> teammates;
00574     getAllValid(teammates, allTeammates, _alive);
00575 
00576     // Select a random one
00577     gVectorExtra<ePlayerNetID *> singleTeammate;
00578     if(teammates.size() != 0)
00579         singleTeammate.push_back(pickOne(teammates));
00580     return singleTeammate;
00581 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:02:02 2008 for Armagetron Advanced by  doxygen 1.5.4