tConfItemPassword Class Reference

Inheritance diagram for tConfItemPassword:

Inheritance graph
[legend]
Collaboration diagram for tConfItemPassword:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tConfItemPassword ()
 ~tConfItemPassword ()
virtual void WriteVal (std::ostream &s)
virtual void ReadVal (std::istream &s)


Detailed Description

Definition at line 298 of file ePlayer.cpp.


Constructor & Destructor Documentation

tConfItemPassword::tConfItemPassword (  )  [inline]

Definition at line 300 of file ePlayer.cpp.

00300 :tConfItemBase("PASSWORD"){}

tConfItemPassword::~tConfItemPassword (  )  [inline]

Definition at line 301 of file ePlayer.cpp.

00301 {};


Member Function Documentation

virtual void tConfItemPassword::WriteVal ( std::ostream &  s  )  [inline, virtual]

Implements tConfItemBase.

Definition at line 304 of file ePlayer.cpp.

References GrowingArrayBase::Len(), PasswordStorage::methodCongested, PasswordStorage::password, PasswordStorage::save, PasswordStorage::username, and nKrawall::WriteScrambledPassword().

00304                                         {
00305         int i;
00306         bool first = 1;
00307         for (i = S_passwords.Len()-1; i>=0; i--)
00308         {
00309             PasswordStorage &storage = S_passwords[i];
00310             if (storage.save )
00311             {
00312                 if (!first)
00313                     s << "\nPASSWORD\t";
00314                 first = false;
00315 
00316                 s << "1 ";
00317                 nKrawall::WriteScrambledPassword(storage.password, s);
00318                 s << '\t' << storage.methodCongested;
00319                 s << '\t' << storage.username;
00320             }
00321         }
00322         if (first)
00323             s << "0 ";
00324     }

Here is the call graph for this function:

virtual void tConfItemPassword::ReadVal ( std::istream &  s  )  [inline, virtual]

Implements tConfItemBase.

Definition at line 327 of file ePlayer.cpp.

References GrowingArrayBase::Len(), PasswordStorage::methodCongested, PasswordStorage::password, tString::ReadLine(), nKrawall::ReadScrambledPassword(), PasswordStorage::save, and PasswordStorage::username.

00327                                        {
00328         //    static char in[20];
00329         int test;
00330         s >> test;
00331         if (test != 0)
00332         {
00333             PasswordStorage &storage = S_passwords[S_passwords.Len()];
00334             nKrawall::ReadScrambledPassword(s, storage.password);
00335             s >> storage.methodCongested;
00336             storage.username.ReadLine(s);
00337 
00338             storage.save = true;
00339 
00340             // check for duplicates
00341             for( int i = S_passwords.Len() - 2; i >= 0; --i )
00342             {
00343                 PasswordStorage &other = S_passwords[i];
00344                 if ( other == storage )
00345                 {
00346                     storage.save = false;
00347                     break;
00348                 }
00349             }
00350         }
00351     }

Here is the call graph for this function:


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