Logo
~Sockets~
~Examples~
~Contact~

Portal Class Reference
[Database]

Database table Chunkinfo, specialization Portal. More...

#include <Portal.h>

Inheritance diagram for Portal:

Inheritance graph
[legend]
Collaboration diagram for Portal:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Portal (Database &, Chunk &)
 Portal (Database &, Chunk &, int x, int y)
 ~Portal ()
void SetToArea (int)
void SetToChunk (int)
void SetToX (int)
void SetToY (int)
int GetToArea ()
int GetToChunk ()
int GetToX ()
int GetToY ()
void Display (InSocket *)

Detailed Description

Database table Chunkinfo, specialization Portal.

Definition at line 30 of file Portal.h.


Constructor & Destructor Documentation

Portal::Portal ( Database &  ,
Chunk  
)

Definition at line 27 of file Portal.cpp.

00027                                         : Chunkinfo(db, chunk)
00028 {
00029 }

Portal::Portal ( Database &  ,
Chunk ,
int  x,
int  y 
)

Definition at line 32 of file Portal.cpp.

00032                                                     : Chunkinfo(db, chunk, x, y, TYPE_PORTAL)
00033 {
00034 }

Portal::~Portal (  ) 

Definition at line 37 of file Portal.cpp.

00038 {
00039 }


Member Function Documentation

void Portal::SetToArea ( int   ) 

Definition at line 42 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Chunk::AddPortal().

00043 {
00044         m_chunkinfo -> to_area = x;
00045 }

void Portal::SetToChunk ( int   ) 

Definition at line 48 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Chunk::AddPortal().

00049 {
00050         m_chunkinfo -> to_chunk = x;
00051 }

void Portal::SetToX ( int   ) 

Definition at line 54 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Chunk::AddPortal().

00055 {
00056         m_chunkinfo -> to_x = x;
00057 }

void Portal::SetToY ( int   ) 

Definition at line 60 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Chunk::AddPortal().

00061 {
00062         m_chunkinfo -> to_y = x;
00063 }

int Portal::GetToArea (  ) 

Definition at line 66 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Display().

00067 {
00068         return m_chunkinfo -> to_area;
00069 }

int Portal::GetToChunk (  ) 

Definition at line 72 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Display().

00073 {
00074         return m_chunkinfo -> to_chunk;
00075 }

int Portal::GetToX (  ) 

Definition at line 78 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Display().

00079 {
00080         return m_chunkinfo -> to_x;
00081 }

int Portal::GetToY (  ) 

Definition at line 84 of file Portal.cpp.

References Chunkinfo::m_chunkinfo.

Referenced by Display().

00085 {
00086         return m_chunkinfo -> to_y;
00087 }

void Portal::Display ( InSocket  )  [virtual]

Reimplemented from Chunkinfo.

Definition at line 90 of file Portal.cpp.

References Chunkinfo::Exists(), GetToArea(), GetToChunk(), GetToX(), GetToY(), and Player::IsWizard().

00091 {
00092         if (!Exists())
00093                 return;
00094         Player pl(from -> GetDatabase(),from -> GetAccountName());
00095         from -> Send("  You see a portal.\n");
00096         if (pl.IsWizard())
00097         {
00098                 from -> Sendf("  [&gToArea:&W%ld&n  &gToChunk:&W%ld&n  &gToX:&W%d&n  &gToY:&W%d&n]\n",
00099                         GetToArea(), GetToChunk(), GetToX(), GetToY());
00100         }
00101 }


The documentation for this class was generated from the following files:
Page, code, and content Copyright (C) 2006 by Anders Hedström
Generated on Mon Aug 29 20:21:47 2005 for C++ Sockets by  doxygen 1.4.4