eVoteItem Class Reference

Inheritance diagram for eVoteItem:

Inheritance graph
[legend]
Collaboration diagram for eVoteItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 eVoteItem (void)
virtual ~eVoteItem (void)
bool FillFromMessage (nMessage &m)
void ReBroadcast (int exceptTo=-1)
nMessageCreateMessage (void) const
nMessageCreateMessageLegacy (void) const
void SendMessage (void) const
void Vote (bool accept)
void RemoveVoter (eVoter *voter)
void RemoveVoterCompletely (eVoter *voter)
void GetStats (int &pro, int &con, int &total) const
void BroadcastMessage (const tOutput &message) const
virtual tAccessLevel DoGetAccessLevel () const
virtual int DoGetExtraBias () const
virtual void Evaluate ()
eVoterGetSuggestor () const
tString GetDescription () const
tString GetDetails () const
unsigned short GetID ()
void UpdateMenuItem ()
bool CheckValid (int senderID)
virtual void Update ()

Static Public Member Functions

static bool AcceptNewVote (eVoter *voter, int senderID)
static bool AcceptNewVote (nMessage const &m)
static void GetControlMessage (nMessage &m)
static const tList< eVoteItem > & GetItems ()

Protected Member Functions

virtual bool DoFillFromMessage (nMessage &m)
virtual bool DoCheckValid (int senderID)
virtual void DoFillToMessage (nMessage &m) const
virtual tString DoGetDetails () const

Static Protected Attributes

static tList< eVoteItemitems_

Private Member Functions

virtual nDescriptorDoGetDescriptorLegacy () const
virtual void DoFillToMessageLegacy (nMessage &m) const
virtual nDescriptorDoGetDescriptor () const =0
virtual tString DoGetDescription () const =0
virtual void DoExecute ()=0
 tCONTROLLED_PTR (eVoter) suggestor_
eVoteItemoperator= (const eVoteItem &)
 eVoteItem (const eVoteItem &)

Private Attributes

nTimeAbsolute creationTime_
unsigned int user_
tArray< tCONTROLLED_PTR(eVoter) > voters_ [2]
unsigned short id_
eMenuItemVotemenuItem_

Friends

class eMenuItemVote


Detailed Description

Definition at line 188 of file eVoter.cpp.


Constructor & Destructor Documentation

eVoteItem::eVoteItem ( void   )  [inline]

Definition at line 193 of file eVoter.cpp.

00193                      : creationTime_( tSysTimeFloat() ), user_( 0 ), id_( ++se_votingItemID ), menuItem_( 0 )
00194     {
00195         items_.Add( this );
00196     };

eVoteItem::~eVoteItem ( void   )  [virtual]

Definition at line 1952 of file eVoter.cpp.

References tOutput::Clear(), uMenuItem::helpText, eMenuItemVote::item_, items_, menuItem_, tList< T, MALLOC, REFERENCE >::Remove(), and uMenuItemSelection< T >::title.

01953 {
01954     items_.Remove( this );
01955 
01956     if ( menuItem_ )
01957     {
01958         menuItem_->item_ = 0;
01959         menuItem_->title.Clear();
01960         menuItem_->helpText.Clear();
01961         menuItem_ = 0;
01962     }
01963 }

Here is the call graph for this function:

eVoteItem::eVoteItem ( const eVoteItem  )  [private]


Member Function Documentation

bool eVoteItem::FillFromMessage ( nMessage m  )  [inline]

Definition at line 200 of file eVoter.cpp.

References nSERVER, se_votingPrivacy, nMessage::SenderID(), nCurrentSenderID::SetID(), and sn_GetNetState().

Referenced by se_HandleKickVote(), and se_HandleNewServerVote().

00201     {
00202         // cloak the ID of the sener for privacy
00203         nCurrentSenderID cloak;
00204         if ( se_votingPrivacy > 1 )
00205             cloak.SetID(0);
00206 
00207         if ( !DoFillFromMessage( m ) )
00208             return false;
00209 
00210         if ( sn_GetNetState() == nSERVER )
00211         {
00212             if ( !CheckValid( m.SenderID() ) )
00213                 return false;
00214 
00215             ReBroadcast( m.SenderID() );
00216         }
00217         return true;
00218     }

Here is the call graph for this function:

Here is the caller graph for this function:

void eVoteItem::ReBroadcast ( int  exceptTo = -1  )  [inline]

Definition at line 221 of file eVoter.cpp.

References con, eVoter::GetVoter(), MAXCLIENTS, nSERVER, se_votingPrivacy, tOutput::SetTemplateParameter(), sn_Connections, sn_ConsoleOut(), sn_GetNetState(), and nVersionFeature::Supported().

Referenced by eVoteItemKickServerControlled::DoCheckValid(), and eVoter::HandleChat().

00222     {
00223         // rebroadcast message to all non-voters that may be able to vote
00224         if ( sn_GetNetState() == nSERVER )
00225         {
00226             // prepare message
00227             tOutput voteMessage;
00228             voteMessage.SetTemplateParameter( 1, suggestor_->Name( user_ ) );
00229             voteMessage.SetTemplateParameter( 2, GetDescription() );
00230             voteMessage << "$vote_submitted";
00231 
00232             // print it
00233             if ( se_votingPrivacy <= -1 )
00234                 sn_ConsoleOut( voteMessage );   // broadcast it
00235             else if ( se_votingPrivacy <= 1 )
00236                 con << voteMessage;                             // print it for the server admin
00237 
00238             static nVersionFeature serverControlledVotes( 10 );
00239 
00240             // create messages for old and new clients
00241             tJUST_CONTROLLED_PTR< nMessage > retNew = this->CreateMessage();
00242             tJUST_CONTROLLED_PTR< nMessage > retLegacy = this->CreateMessageLegacy();
00243             for ( int i = MAXCLIENTS; i > 0; --i )
00244             {
00245                 if ( sn_Connections[ i ].socket && i != exceptTo && 0 != eVoter::GetVoter( i ) )
00246                 {
00247                     if ( serverControlledVotes.Supported( i ) )
00248                     {
00249                         retNew->Send( i );
00250                     }
00251                     else if ( retLegacy )
00252                     {
00253                         retLegacy->Send( i );
00254                     }
00255                 }
00256             }
00257             //                  item->SendMessage();
00258         }
00259 
00260         con << tOutput( "$vote_new", GetDescription() );
00261 
00262         this->Evaluate();
00263     };

Here is the call graph for this function:

Here is the caller graph for this function:

nMessage* eVoteItem::CreateMessage ( void   )  const [inline]

Definition at line 265 of file eVoter.cpp.

References tNEW.

Referenced by se_Cleanup().

00266     {
00267         nMessage* m = tNEW( nMessage )( this->DoGetDescriptor() );
00268         this->DoFillToMessage( *m );
00269         return m;
00270     }

Here is the caller graph for this function:

nMessage* eVoteItem::CreateMessageLegacy ( void   )  const [inline]

Definition at line 272 of file eVoter.cpp.

References tNEW.

00273     {
00274         nDescriptor * descriptor = this->DoGetDescriptorLegacy();
00275         if ( descriptor )
00276         {
00277             nMessage* m = tNEW( nMessage )( *descriptor );
00278             this->DoFillToMessageLegacy( *m );
00279             return m;
00280         }
00281         else
00282         {
00283             return 0;
00284         }
00285     }

void eVoteItem::SendMessage ( void   )  const [inline]

Definition at line 287 of file eVoter.cpp.

References nMessage::BroadCast().

Referenced by se_SendKick().

00288     {
00289         this->CreateMessage()->BroadCast();
00290     }

Here is the call graph for this function:

Here is the caller graph for this function:

void eVoteItem::Vote ( bool  accept  ) 

Definition at line 691 of file eVoter.cpp.

References id_, tNEW, and vote_handler.

00692 {
00693     tJUST_CONTROLLED_PTR< nMessage > m = tNEW( nMessage )( vote_handler );
00694     *m << id_;
00695     *m << accept;
00696     m->BroadCast();
00697 
00698     delete this;
00699 }

static bool eVoteItem::AcceptNewVote ( eVoter voter,
int  senderID 
) [inline, static]

Definition at line 295 of file eVoter.cpp.

References eVoter::GetVoter(), eVoter::IsSpamming(), MAXCLIENTS, nCLIENT, se_allowVoting, se_maxVotes, se_maxVotesPerVoter, se_minVoters, se_votingPrivacy, se_votingSpamIssue, nCurrentSenderID::SetID(), sn_Connections, sn_ConsoleOut(), sn_GetNetState(), eVoter::Spam(), and eVoter::voters_.

Referenced by eVoter::HandleChat(), se_HandleKickVote(), and se_HandleNewServerVote().

00296     {
00297         // cloak the ID of the sener for privacy
00298         nCurrentSenderID cloak;
00299         if ( se_votingPrivacy > 0 )
00300             cloak.SetID(0);
00301 
00302         int i;
00303 
00304         // let old messages time out
00305         for ( i = items_.Len()-1; i>=0; --i )
00306         {
00307             items_[i]->Evaluate();
00308         }
00309 
00310         // always accept in client mode
00311         if ( sn_GetNetState() == nCLIENT )
00312             return true;
00313 
00314         // check if voting is allowed
00315         if ( !voter )
00316         {
00317             return false;
00318         }
00319 
00320         // reject voting
00321         if ( !se_allowVoting )
00322         {
00323             tOutput message("$vote_disabled");
00324             sn_ConsoleOut( message, senderID );
00325             return false;
00326         }
00327 
00328         // spawn spectator voters
00329         for ( i = MAXCLIENTS; i > 0; --i )
00330         {
00331             if ( sn_Connections[ i ].socket )
00332                 eVoter::GetVoter( i );
00333         }
00334 
00335         // enough voters online?
00336         if ( eVoter::voters_.Len() < se_minVoters )
00337         {
00338             tOutput message("$vote_toofew");
00339             sn_ConsoleOut( message, senderID );
00340             return false;
00341         }
00342 
00343         // check for spam
00344         if ( voter->IsSpamming( senderID ) )
00345         {
00346             return false;
00347         }
00348 
00349         // count number of votes by the voter
00350         int voteCount = 0;
00351         for ( i = items_.Len()-1; i>=0; --i )
00352         {
00353             eVoteItem * other = items_[i];
00354             if ( other->suggestor_ == voter )
00355                 voteCount ++;
00356         }
00357         if ( voteCount >= se_maxVotesPerVoter )
00358         {
00359             tOutput message("$vote_overflow");
00360             sn_ConsoleOut( message, senderID );
00361             return false;
00362         }
00363 
00364         if ( items_.Len() < se_maxVotes )
00365         {
00366             voter->Spam( senderID, se_votingSpamIssue, tOutput("$spam_vote_kick_issue") );
00367             return true;
00368         }
00369         else
00370         {
00371             tOutput message("$vote_overflow");
00372             sn_ConsoleOut( message, senderID );
00373             return false;
00374         }
00375     }

Here is the call graph for this function:

Here is the caller graph for this function:

static bool eVoteItem::AcceptNewVote ( nMessage const &  m  )  [inline, static]

Definition at line 377 of file eVoter.cpp.

References se_GetVoter(), and nMessage::SenderID().

00378     {
00379         return AcceptNewVote( se_GetVoter( m ), m.SenderID() );
00380     }

Here is the call graph for this function:

void eVoteItem::RemoveVoter ( eVoter voter  )  [inline]

Definition at line 382 of file eVoter.cpp.

Referenced by GetControlMessage().

00383     {
00384         // remove voter from the lists
00385         for ( int res = 1; res >= 0; --res )
00386             this->voters_[ res ].Remove( voter );
00387     }

Here is the caller graph for this function:

void eVoteItem::RemoveVoterCompletely ( eVoter voter  )  [inline]

Definition at line 389 of file eVoter.cpp.

00390     {
00391         RemoveVoter( voter );
00392         if ( suggestor_ == voter )
00393         {
00394             suggestor_ = 0;
00395             user_ = 0;
00396         }
00397     }

static void eVoteItem::GetControlMessage ( nMessage m  )  [inline, static]

Definition at line 400 of file eVoter.cpp.

References con, Evaluate(), GetDescription(), id_, tArray< T, MALLOC >::Insert(), nSERVER, nMessage::Read(), RemoveVoter(), se_GetVoter(), se_votingPrivacy, nMessage::SenderID(), tOutput::SetTemplateParameter(), sn_ConsoleOut(), sn_GetNetState(), tCONTROLLED_PTR, and voters_.

00401     {
00402         if ( sn_GetNetState() == nSERVER )
00403         {
00404             unsigned short id;
00405             m.Read( id );
00406 
00407             bool result;
00408             m >> result;
00409             result = result ? 1 : 0;
00410 
00411             for ( int i = items_.Len()-1; i>=0; --i )
00412             {
00413                 eVoteItem* vote = items_[i];
00414                 if ( vote->id_ == id )
00415                 {
00416                     // found the vote; find the voter
00417                     tCONTROLLED_PTR( eVoter ) voter = se_GetVoter( m );
00418                     if ( voter )
00419                     {
00420                         // prepare message
00421                         tOutput voteMessage;
00422                         voteMessage.SetTemplateParameter( 1, voter->Name( m.SenderID() ) );
00423                         voteMessage.SetTemplateParameter( 2, vote->GetDescription() );
00424                         if ( result )
00425                             voteMessage << "$vote_vote_for";
00426                         else
00427                             voteMessage << "$vote_vote_against";
00428 
00429                         // print it
00430                         if ( se_votingPrivacy <= -2 )
00431                             sn_ConsoleOut( voteMessage );       // broadcast it
00432                         else if ( se_votingPrivacy <= 0 )
00433                             con << voteMessage;                         // print it for the server admin
00434 
00435                         // remove him from the lists
00436                         vote->RemoveVoter( voter );
00437 
00438                         // insert hum
00439                         vote->voters_[ result ].Insert( voter );
00440                     }
00441 
00442                     // are enough votes cast?
00443                     vote->Evaluate();
00444                     return;
00445                 }
00446             }
00447         }
00448     }

Here is the call graph for this function:

void eVoteItem::GetStats ( int &  pro,
int &  con,
int &  total 
) const [inline]

Definition at line 451 of file eVoter.cpp.

References con, GrowingArrayBase::Len(), and eVoter::voters_.

00452     {
00453         pro = voters_[1].Len();
00454         con = voters_[0].Len();
00455         total = eVoter::voters_.Len();
00456     }

Here is the call graph for this function:

void eVoteItem::BroadcastMessage ( const tOutput message  )  const [inline]

Definition at line 459 of file eVoter.cpp.

References tOutput::Append(), nSERVER, tOutput::SetTemplateParameter(), sn_ConsoleOut(), and sn_GetNetState().

00460     {
00461         if ( sn_GetNetState() == nSERVER )
00462         {
00463             tOutput m;
00464             m.SetTemplateParameter( 1, this->GetDescription() );
00465             m.Append( message );
00466 
00467             sn_ConsoleOut( m );
00468         }
00469     }

Here is the call graph for this function:

virtual tAccessLevel eVoteItem::DoGetAccessLevel (  )  const [inline, virtual]

Definition at line 472 of file eVoter.cpp.

References tAccessLevel_Default.

00473     {
00474         return tAccessLevel_Default;
00475     }

virtual int eVoteItem::DoGetExtraBias (  )  const [inline, virtual]

Reimplemented in eVoteItemKick, and eVoteItemSuspend.

Definition at line 478 of file eVoter.cpp.

00479     {
00480         return 0;
00481     }

virtual void eVoteItem::Evaluate (  )  [inline, virtual]

Reimplemented in eVoteItemServerControlled.

Definition at line 484 of file eVoter.cpp.

References con, GrowingArrayBase::Len(), MAXCLIENTS, nCLIENT, nSERVER, se_PlayerNetIDs, se_votingBias, se_votingDecay, se_votingSpamReject, se_votingStartDecay, se_votingTimeout, se_votingTimeoutPerVoter, tOutput::SetTemplateParameter(), sn_GetNetState(), tSysTimeFloat(), and eVoter::voters_.

Referenced by eVoteItemServerControlled::Evaluate(), and GetControlMessage().

00485     {
00486         int pro, con, total;
00487 
00488         GetStats( pro, con, total );
00489 
00490         int bias = se_votingBias + DoGetExtraBias();
00491 
00492         // apply bias
00493         con     += bias;
00494         total   += bias;
00495 
00496         // reduce number of total voters
00497         if ( se_votingDecay > 0 )
00498         {
00499             int reduce = int( ( tSysTimeFloat() - this->creationTime_ - se_votingStartDecay ) / se_votingDecay );
00500             if ( reduce > 0 )
00501             {
00502                 total -= reduce;
00503             }
00504         }
00505 
00506         if ( sn_GetNetState() == nSERVER )
00507         {
00508             // see if the vote has been rejected
00509             if ( con >= pro && con * 2 >= total )
00510             {
00511                 if ( this->suggestor_ )
00512                     this->suggestor_->Spam( user_, se_votingSpamReject, tOutput("$spam_vote_rejected") );
00513 
00514                 tOutput voteMessage;
00515                 voteMessage.SetTemplateParameter( 1, GetDescription() );
00516                 voteMessage.SetTemplateParameter( 2, pro-1 );
00517                 voteMessage.SetTemplateParameter( 3, con-se_votingBias );
00518                 voteMessage.SetTemplateParameter( 4, total-se_votingBias);
00519                 voteMessage << "$vote_rejected";
00520                 this->BroadcastMessage( voteMessage );
00521                 delete this;
00522                 return;
00523             }
00524 
00525             // see if the vote has been accepted
00526             if ( pro >= con && pro * 2 > total )
00527             {
00528                 this->DoExecute();
00529                 tOutput voteMessage;
00530                 voteMessage.SetTemplateParameter( 1, GetDescription() );
00531                 voteMessage.SetTemplateParameter( 2, pro-1 );
00532                 voteMessage.SetTemplateParameter( 3, con-se_votingBias );
00533                 voteMessage.SetTemplateParameter( 4, total-se_votingBias);
00534                 voteMessage << "$vote_accepted";
00535                 this->BroadcastMessage( voteMessage );
00536                 delete this;
00537                 return;
00538             }
00539         }
00540 
00541         // see if the voting has timed out
00542         int relevantNumVoters = sn_GetNetState() == nCLIENT ? se_PlayerNetIDs.Len() + MAXCLIENTS : eVoter::voters_.Len(); // the number of voters (overestimate the value on the client)
00543         if ( this->creationTime_ < tSysTimeFloat() - se_votingTimeout - se_votingTimeoutPerVoter * relevantNumVoters )
00544         {
00545             this->BroadcastMessage( tOutput( "$vote_timeout" ) );
00546 
00547             delete this;
00548             return;
00549         }
00550     }

Here is the call graph for this function:

Here is the caller graph for this function:

static const tList< eVoteItem >& eVoteItem::GetItems (  )  [inline, static]

Definition at line 553 of file eVoter.cpp.

Referenced by eVoter::RemoveFromGame(), se_CancelAllVotes(), se_Cleanup(), eVoter::VotingMenu(), and eVoter::VotingPossible().

00553 { return items_; }                                      // returns the list of all items

Here is the caller graph for this function:

eVoter* eVoteItem::GetSuggestor (  )  const [inline]

Definition at line 554 of file eVoter.cpp.

00554 { return suggestor_; }                                          // returns the voter that suggested the item

tString eVoteItem::GetDescription (  )  const [inline]

Definition at line 555 of file eVoter.cpp.

Referenced by GetControlMessage(), and UpdateMenuItem().

00555 { return this->DoGetDescription(); }            // returns the description of the voting item

Here is the caller graph for this function:

tString eVoteItem::GetDetails (  )  const [inline]

Definition at line 556 of file eVoter.cpp.

Referenced by UpdateMenuItem().

00556 { return this->DoGetDetails(); }               // returns the detailed description of the voting item

Here is the caller graph for this function:

unsigned short eVoteItem::GetID (  )  [inline]

Definition at line 558 of file eVoter.cpp.

Referenced by eVoteItemServerControlled::s_HandleChanged(), and eVoteItemServerControlled::SendChanged().

00558 { return id_; }

Here is the caller graph for this function:

void eVoteItem::UpdateMenuItem ( void   ) 

Definition at line 1965 of file eVoter.cpp.

References tOutput::Clear(), GetDescription(), GetDetails(), uMenuItem::helpText, menuItem_, and uMenuItemSelection< T >::title.

Referenced by eMenuItemVote::eMenuItemVote(), and eVoteItemServerControlled::HandleChanged().

01966 {
01967     if ( menuItem_ )
01968     {
01969         menuItem_->title.Clear();
01970         menuItem_->title = GetDescription();
01971 
01972         menuItem_->helpText.Clear();
01973         menuItem_->helpText << tString( tOutput( "$vote_details_help", GetDetails() ) );
01974     }
01975 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool eVoteItem::CheckValid ( int  senderID  )  [inline]

Definition at line 562 of file eVoter.cpp.

References tCurrentAccessLevel::GetAccessLevel(), tCurrentAccessLevel::GetName(), eVoter::GetVoter(), nSERVER, se_GetAccessLevel(), sn_ConsoleOut(), and sn_GetNetState().

Referenced by eVoteItemKickServerControlled::DoCheckValid(), and eVoter::HandleChat().

00563     {
00564         if ( sn_GetNetState() != nSERVER )
00565         {
00566             return true;
00567         }
00568 
00569         // fill suggestor
00570         if ( !suggestor_ )
00571         {
00572             suggestor_ = eVoter::GetVoter( senderID );
00573             if ( !suggestor_ )
00574                 return false;
00575 
00576             // add suggestor to supporters
00577             this->voters_[1].Insert( suggestor_ );
00578 
00579             user_ = senderID;
00580         }
00581 
00582         // check access level
00583         tAccessLevel accessLevel = se_GetAccessLevel( senderID );
00584         if ( accessLevel < tCurrentAccessLevel::GetAccessLevel() )
00585         {
00586             accessLevel = tCurrentAccessLevel::GetAccessLevel();
00587         }
00588 
00589         tAccessLevel required = DoGetAccessLevel();
00590         if ( accessLevel > required )
00591         {
00592             sn_ConsoleOut(tOutput("$player_vote_accesslevel",
00593                                   tCurrentAccessLevel::GetName( accessLevel ),
00594                                   tCurrentAccessLevel::GetName( required ) ),
00595                           senderID );
00596             
00597             return false;
00598         }
00599 
00600         return DoCheckValid( senderID );
00601     }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void eVoteItem::Update (  )  [inline, virtual]

Reimplemented in eVoteItemHarmServerControlled.

Definition at line 603 of file eVoter.cpp.

Referenced by eVoteItemKickServerControlled::DoCheckValid(), eVoteItemHarmServerControlled::DoFillFromMessage(), eVoteItemServerControlled::Evaluate(), eVoteItemServerControlled::HandleChanged(), and eVoter::HandleChat().

00604     {}

Here is the caller graph for this function:

virtual bool eVoteItem::DoFillFromMessage ( nMessage m  )  [inline, protected, virtual]

Reimplemented in eVoteItemServerControlled, eVoteItemHarm, and eVoteItemHarmServerControlled.

Definition at line 606 of file eVoter.cpp.

References nSERVER, nMessage::Read(), nMessage::SenderID(), and sn_GetNetState().

Referenced by eVoteItemHarm::DoFillFromMessage(), and eVoteItemServerControlled::DoFillFromMessage().

00607     {
00608         // get user
00609         user_ = m.SenderID();
00610 
00611         // get originator of vote
00612         if(sn_GetNetState()!=nSERVER)
00613         {
00614             m.Read( id_ );
00615         }
00616 
00617         return true;
00618     };

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in eVoteItemHarm, eVoteItemKick, and eVoteItemKickServerControlled.

Definition at line 620 of file eVoter.cpp.

Referenced by eVoteItemHarm::DoCheckValid().

00620 { return true; }

Here is the caller graph for this function:

virtual void eVoteItem::DoFillToMessage ( nMessage m  )  const [inline, protected, virtual]

Reimplemented in eVoteItemServerControlled, eVoteItemHarm, and eVoteItemHarmServerControlled.

Definition at line 622 of file eVoter.cpp.

References nSERVER, sn_GetNetState(), and nMessage::Write().

Referenced by eVoteItemHarm::DoFillToMessage(), and eVoteItemServerControlled::DoFillToMessage().

00623     {
00624         if(sn_GetNetState()==nSERVER)
00625         {
00626             // write our message ID
00627             m.Write( id_ );
00628         }
00629     };

Here is the call graph for this function:

Here is the caller graph for this function:

virtual tString eVoteItem::DoGetDetails (  )  const [inline, protected, virtual]

Reimplemented in eVoteItemServerControlled, eVoteItemHarm, and eVoteItemHarmServerControlled.

Definition at line 632 of file eVoter.cpp.

References se_votingPrivacy.

Referenced by eVoteItemHarm::DoGetDetails().

00633     {
00634         tString ret;
00635         if ( se_votingPrivacy <= -1 && bool( suggestor_ ) )
00636             ret << tOutput( "$vote_submitter_text", suggestor_->Name( user_ ) ) << " ";
00637 
00638         return ret;
00639     }

Here is the caller graph for this function:

virtual nDescriptor* eVoteItem::DoGetDescriptorLegacy (  )  const [inline, private, virtual]

Reimplemented in eVoteItemHarm.

Definition at line 642 of file eVoter.cpp.

00643     {
00644         return 0;
00645     }

virtual void eVoteItem::DoFillToMessageLegacy ( nMessage m  )  const [inline, private, virtual]

Reimplemented in eVoteItemHarm.

Definition at line 647 of file eVoter.cpp.

00648     {
00649         return DoFillToMessage( m );
00650     };

virtual nDescriptor& eVoteItem::DoGetDescriptor (  )  const [private, pure virtual]

Implemented in eVoteItemServerControlled, eVoteItemHarm, and eVoteItemHarmServerControlled.

virtual tString eVoteItem::DoGetDescription (  )  const [private, pure virtual]

Implemented in eVoteItemServerControlled, eVoteItemHarm, and eVoteItemHarmServerControlled.

virtual void eVoteItem::DoExecute (  )  [private, pure virtual]

Implemented in eVoteItemServerControlled, eVoteItemKick, eVoteItemSuspend, and eVoteItemKickServerControlled.

eVoteItem::tCONTROLLED_PTR ( eVoter   )  [private]

eVoteItem& eVoteItem::operator= ( const eVoteItem  )  [private]


Friends And Related Function Documentation

friend class eMenuItemVote [friend]

Definition at line 190 of file eVoter.cpp.


Member Data Documentation

tList< eVoteItem > eVoteItem::items_ [static, protected]

Definition at line 640 of file eVoter.cpp.

Referenced by eVoteItemServerControlled::s_HandleChanged(), and ~eVoteItem().

nTimeAbsolute eVoteItem::creationTime_ [private]

Definition at line 656 of file eVoter.cpp.

unsigned int eVoteItem::user_ [private]

Definition at line 658 of file eVoter.cpp.

tArray< tCONTROLLED_PTR( eVoter ) > eVoteItem::voters_[2] [private]

Definition at line 659 of file eVoter.cpp.

Referenced by eVoter::eVoter(), and GetControlMessage().

unsigned short eVoteItem::id_ [private]

Definition at line 660 of file eVoter.cpp.

Referenced by GetControlMessage(), and Vote().

eMenuItemVote* eVoteItem::menuItem_ [private]

Definition at line 661 of file eVoter.cpp.

Referenced by eMenuItemVote::eMenuItemVote(), UpdateMenuItem(), and ~eVoteItem().


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