eVoteItemKickServerControlled Class Reference

Inheritance diagram for eVoteItemKickServerControlled:

Inheritance graph
[legend]
Collaboration diagram for eVoteItemKickServerControlled:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 eVoteItemKickServerControlled (bool fromMenu, ePlayerNetID *player)
 ~eVoteItemKickServerControlled ()

Protected Member Functions

virtual bool DoCheckValid (int senderID)
virtual void DoExecute ()

Private Attributes

bool fromMenu_


Detailed Description

Definition at line 1338 of file eVoter.cpp.


Constructor & Destructor Documentation

eVoteItemKickServerControlled::eVoteItemKickServerControlled ( bool  fromMenu,
ePlayerNetID player 
) [inline]

Definition at line 1342 of file eVoter.cpp.

01343     : eVoteItemHarm( player ), eVoteItemKick( player ), fromMenu_( fromMenu )
01344     {}

eVoteItemKickServerControlled::~eVoteItemKickServerControlled (  )  [inline]

Definition at line 1346 of file eVoter.cpp.

01347     {}


Member Function Documentation

virtual bool eVoteItemKickServerControlled::DoCheckValid ( int  senderID  )  [inline, protected, virtual]

Reimplemented from eVoteItemKick.

Definition at line 1349 of file eVoter.cpp.

References eVoteItem::CheckValid(), eVoteItemHarm::DoCheckValid(), ePlayerNetID::GetVoter(), eVoter::HarmCount(), eVoteItem::ReBroadcast(), se_kickMinHarm, tNEW, and eVoteItem::Update().

01350     {
01351         // check whether enough harmful votes were collected already
01352         ePlayerNetID * p = GetPlayer();
01353         if ( fromMenu_ && p && p->GetVoter()->HarmCount() - 1 < se_kickMinHarm )
01354         {
01355             // try to transfor the vote to a suspension
01356             eVoteItem * item = tNEW ( eVoteItemSuspend )( p );
01357             
01358             // let item check its validity
01359             if ( !item->CheckValid( senderID ) )
01360             {
01361                 delete item;
01362             }
01363             else
01364             {
01365                 // no objection? Broadcast it to everyone.
01366                 item->Update();
01367                 item->ReBroadcast( senderID );
01368             }
01369 
01370             // and cancel this item here.
01371             return false;
01372         }
01373 
01374         // no transformation needed or transformation failed. Proceed as usual.
01375         return eVoteItemHarm::DoCheckValid( senderID );
01376     };

Here is the call graph for this function:

virtual void eVoteItemKickServerControlled::DoExecute (  )  [inline, protected, virtual]

Reimplemented from eVoteItemKick.

Definition at line 1378 of file eVoter.cpp.

References eVoteItemKick::DoExecute().

01379     {
01380         eVoteItemKick::DoExecute();
01381     }

Here is the call graph for this function:


Member Data Documentation

bool eVoteItemKickServerControlled::fromMenu_ [private]

Definition at line 1383 of file eVoter.cpp.


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