Advanced Strategic Command
Public Member Functions | Protected Member Functions | List of all members
Password Class Reference

#include <password.h>

Public Member Functions

void setUnencoded (const string &s)
 
void setEncoded (const string &s)
 
void setInt (int pwd)
 
bool empty () const
 
void reset ()
 
string toString () const
 
bool operator== (const Password &p) const
 
bool operator!= (const Password &p) const
 
void read (tnstream &stream)
 
void write (tnstream &stream) const
 

Protected Member Functions

int encodepassword (const char *pw) const
 
string encodedpassword2string (int pwd) const
 

Detailed Description

Definition at line 27 of file password.h.

Member Function Documentation

bool Password::empty ( ) const
string Password::encodedpassword2string ( int  pwd) const
protected

Definition at line 73 of file password.cpp.

References strrr().

Referenced by read(), setEncoded(), setInt(), and setUnencoded().

int Password::encodepassword ( const char *  pw) const
protected

Definition at line 60 of file password.cpp.

References crc32buf().

Referenced by setUnencoded().

bool Password::operator!= ( const Password p) const

Definition at line 54 of file password.cpp.

bool Password::operator== ( const Password p) const

Definition at line 49 of file password.cpp.

void Password::read ( tnstream stream)

Definition at line 100 of file password.cpp.

References encodedpassword2string(), and tnstream::readInt().

Referenced by GameMap::read().

void Password::reset ( void  )

Definition at line 120 of file password.cpp.

Referenced by changePassword(), and Player::resetPassword().

void Password::setEncoded ( const string &  s)
void Password::setInt ( int  pwd)

Definition at line 44 of file password.cpp.

References encodedpassword2string().

void Password::setUnencoded ( const string &  s)

Definition at line 27 of file password.cpp.

References encodedpassword2string(), and encodepassword().

Referenced by StartMultiplayerGame::Apply().

string Password::toString ( ) const

Definition at line 94 of file password.cpp.

void Password::write ( tnstream stream) const

Definition at line 106 of file password.cpp.

References atoi(), and tnstream::writeInt().

Referenced by GameMap::write().


The documentation for this class was generated from the following files: