Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

BaseForm Class Reference

#include <BaseForm.h>

Inheritance diagram for BaseForm:

Inheritance graph
[legend]
Collaboration diagram for BaseForm:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BaseForm (SimpleWeb &, const std::string &)
 ~BaseForm ()
SimpleWebGetWeb () const
const std::string & GetName ()
void Select (const std::string &)
void List ()

Protected Member Functions

void Header (Database &db, Query &q, db::Account &acct, db::Player &pl, db::Location &loc, char *sql)

Private Attributes

SimpleWebm_web
std::string m_name

Constructor & Destructor Documentation

BaseForm::BaseForm SimpleWeb ,
const std::string & 
 

Definition at line 8 of file BaseForm.cpp.

References BaseForm().

Referenced by BaseForm().

00009 :WebForm(&www, name) 00010 ,m_web(www) 00011 ,m_name(name) 00012 { 00013 }

BaseForm::~BaseForm  ) 
 

Definition at line 16 of file BaseForm.cpp.

00017 { 00018 }


Member Function Documentation

const std::string& BaseForm::GetName  )  [inline]
 

Definition at line 16 of file BaseForm.h.

References m_name.

00016 { return m_name; }

SimpleWeb& BaseForm::GetWeb  )  const [inline]
 

Definition at line 15 of file BaseForm.h.

References m_web.

Referenced by MainForm::Display(), LobbyForm::Display(), BuildForm::Display(), Header(), MainForm::Process(), LobbyForm::Process(), and BuildForm::Process().

00015 { return m_web; }

void BaseForm::Header Database &  db,
Query &  q,
db::Account &  acct,
db::Player &  pl,
db::Location &  loc,
char *  sql
[protected]
 

Definition at line 21 of file BaseForm.cpp.

References SimpleWeb::GetBuild(), SimpleWeb::GetSuperuservy(), GetWeb(), and Header().

Referenced by Header().

00022 { 00023 printf("<div class=box style='background: #e0e0e0;'>"); 00024 printf("Account: <b>%s</b> Player: <b>%s</b>\n", 00025 acct.name.c_str(), pl.name.c_str()); 00026 00027 // command buttons 00028 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?%s=player'>Select another player</a>", GetWeb().GetCgiName().c_str(), GetFormName().c_str()); 00029 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s'>Main</a>", GetWeb().GetCgiName().c_str()); 00030 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?BuildForm=try_build'>Build</a>", GetWeb().GetCgiName().c_str()); 00031 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?%s=logout'>Logout</a>", GetWeb().GetCgiName().c_str(), GetFormName().c_str()); 00032 if (acct.superuser && !GetWeb().GetBuild()) 00033 { 00034 if (GetWeb().GetSuperuservy()) 00035 { 00036 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?%s=normalvy'>Normal mode</a>", GetWeb().GetCgiName().c_str(), GetFormName().c_str()); 00037 } 00038 else 00039 { 00040 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?%s=supervy'>Administration mode</a>", GetWeb().GetCgiName().c_str(), GetFormName().c_str()); 00041 } 00042 printf("&nbsp;&nbsp;&nbsp;<a class=button href='%s?%s=run'>Run</a>", GetWeb().GetCgiName().c_str(), GetFormName().c_str()); 00043 } 00044 printf("</div>"); 00045 }

void BaseForm::List  )  [inline]
 

Definition at line 19 of file BaseForm.h.

00019 {}

void BaseForm::Select const std::string &   )  [inline]
 

Definition at line 18 of file BaseForm.h.

References Select().

Referenced by Select().

00018 {}


Member Data Documentation

std::string BaseForm::m_name [private]
 

Definition at line 26 of file BaseForm.h.

Referenced by GetName().

SimpleWeb& BaseForm::m_web [private]
 

Definition at line 25 of file BaseForm.h.

Referenced by GetWeb().


The documentation for this class was generated from the following files:
Generated for simple by doxygen 1.3.7