gServerFavorite Class Reference

server favorite: holds connection info and configuration items More...

Collaboration diagram for gServerFavorite:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 gServerFavorite (int ID, char const *prefix)
 constructor
void Connect ()
 connects to the server
int GetIndex ()
 returns the index in the favorite holder

Public Attributes

tString name_
 the human readable name
tString address_
 connection address
int port_
 port to connect to

Private Attributes

int index_
 index in favorite holder
tConfItemLine confName_
 configuration item holding the name
tConfItemLine confAddress_
 configuration item holding the address
tConfItem< int > confPort
 configuration item holding the port

Friends

class gServerFavoritesHolder


Detailed Description

server favorite: holds connection info and configuration items

Definition at line 74 of file gServerFavorites.cpp.


Constructor & Destructor Documentation

gServerFavorite::gServerFavorite ( int  ID,
char const *  prefix 
) [inline]

constructor

Definition at line 80 of file gServerFavorites.cpp.

00081             : name_( "" )
00082             , port_( sn_defaultPort )
00083             , index_( ID )
00084             , confName_( sg_ConfName( ID, prefix, "_NAME") ,name_ )
00085             , confAddress_( sg_ConfName( ID, prefix, "_ADDRESS"), address_ )
00086             , confPort( sg_ConfName( ID, prefix, "_PORT"), port_ )
00087     {
00088     };


Member Function Documentation

void gServerFavorite::Connect (  )  [inline]

connects to the server

Definition at line 91 of file gServerFavorites.cpp.

References address_, ConnectToServer(), port_, and gLogo::SetDisplayed().

Referenced by sg_ConnectFavorite().

00092     {
00093         gServerInfoFavorite fav( address_, port_ );
00094 
00095         gLogo::SetDisplayed(false);
00096 
00097         ConnectToServer( &fav );
00098     }

Here is the call graph for this function:

Here is the caller graph for this function:

int gServerFavorite::GetIndex (  )  [inline]

returns the index in the favorite holder

Definition at line 101 of file gServerFavorites.cpp.

References index_.

Referenced by gCustomConnectEntries::Generate(), and gServerFavoriteMenuEntries::gServerFavoriteMenuEntries().

00102     {
00103         return index_;
00104     }

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class gServerFavoritesHolder [friend]

Definition at line 77 of file gServerFavorites.cpp.


Member Data Documentation

tString gServerFavorite::name_

the human readable name

Definition at line 106 of file gServerFavorites.cpp.

Referenced by gServerFavoritesHolder::AddFavorite(), gServerFavoriteMenuEntries::gServerFavoriteMenuEntries(), gServerFavoritesHolder::IsFavorite(), and sg_GenerateConnectionItems().

tString gServerFavorite::address_

connection address

Definition at line 107 of file gServerFavorites.cpp.

Referenced by gServerFavoritesHolder::AddFavorite(), Connect(), gCustomConnectEntries::Generate(), gServerFavoritesHolder::IsFavorite(), sg_AlternativeMaster(), and sg_GenerateConnectionItems().

int gServerFavorite::port_

port to connect to

Definition at line 108 of file gServerFavorites.cpp.

Referenced by gServerFavoritesHolder::AddFavorite(), Connect(), gCustomConnectEntries::Generate(), gServerFavoritesHolder::IsFavorite(), and sg_AlternativeMaster().

int gServerFavorite::index_ [private]

index in favorite holder

Definition at line 111 of file gServerFavorites.cpp.

Referenced by GetIndex().

tConfItemLine gServerFavorite::confName_ [private]

configuration item holding the name

Definition at line 113 of file gServerFavorites.cpp.

tConfItemLine gServerFavorite::confAddress_ [private]

configuration item holding the address

Definition at line 114 of file gServerFavorites.cpp.

tConfItem<int> gServerFavorite::confPort [private]

configuration item holding the port

Definition at line 115 of file gServerFavorites.cpp.


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