#include <SubSpace.h>
Public Member Functions | |
| SubSpace () | |
| SubSpace (int id) | |
| SubSpace (int id, IPAddress resp_id) | |
| SubSpace (int id, IPAddress resp_id, IPAddress backup_ip) | |
| int | getId () const |
| void | setId (int id) |
| IPAddress | getRespIp () const |
| void | setRespIp (IPAddress resp_ip) |
| IPAddress | getBackupIp () const |
| void | setBackupIp (IPAddress backup_ip) |
| GameState | getGameState () const |
| void | setGameState (GameState gamestate) |
| IPAddress | getNeighbor (int direction) const |
| void | setNeighbor (int direction, IPAddress resp_ip) |
| int | getTimeSlot () |
| void | setTimeSlot (int timeSlot) |
Private Attributes | |
| int | id |
| int | timeSlot |
| IPAddress | resp_ip |
| IPAddress | backup_ip |
| GameState | gamestate |
| IPAddress | neighbors [8] |
Friends | |
| std::ostream & | operator<< (std::ostream &Stream, const SubSpace S) |
| SubSpace::SubSpace | ( | int | id | ) |
| SubSpace::SubSpace | ( | int | id, | |
| IPAddress | resp_id | |||
| ) |
| SubSpace::SubSpace | ( | int | id, | |
| IPAddress | resp_id, | |||
| IPAddress | backup_ip | |||
| ) |
| int SubSpace::getId | ( | ) | const |
| void SubSpace::setId | ( | int | id | ) |
| IPAddress SubSpace::getRespIp | ( | ) | const |
| IPAddress SubSpace::getBackupIp | ( | ) | const |
| void SubSpace::setBackupIp | ( | IPAddress | backup_ip | ) |
| void SubSpace::setGameState | ( | GameState | gamestate | ) |
| IPAddress SubSpace::getNeighbor | ( | int | direction | ) | const |
00094 { 00095 if( direction <= 8 ) { 00096 return this->neighbors[direction]; 00097 } 00098 return (IPAddress) "127.0.0.1"; 00099 }
| void SubSpace::setNeighbor | ( | int | direction, | |
| IPAddress | resp_ip | |||
| ) |
| int SubSpace::getTimeSlot | ( | ) |
| std::ostream& operator<< | ( | std::ostream & | Stream, | |
| const SubSpace | S | |||
| ) | [friend] |
00102 { 00103 return Stream << "SubSpaceId: " << s.getId() << " : " << s.getRespIp() << " : " << s.getBackupIp() << "\n NW" << s.getNeighbor(NW) << " N " << s.getNeighbor(N) << " NE " << s.getNeighbor(NE) << "\n W " << s.getNeighbor(W) << " E " << s.getNeighbor(E) << "\n SW:" << s.getNeighbor(SW) << " S " << s.getNeighbor(S) << " SE " << s.getNeighbor(SE) << "\n======================================\n"; 00104 }
int SubSpace::id [private] |
int SubSpace::timeSlot [private] |
IPAddress SubSpace::resp_ip [private] |
IPAddress SubSpace::backup_ip [private] |
GameState SubSpace::gamestate [private] |
IPAddress SubSpace::neighbors[8] [private] |
1.5.3