PubSubSubspaceId Class Reference

#include <PubSubSubspaceId.h>

List of all members.

Public Member Functions

 PubSubSubspaceId (int id, int _maxY)
 Creates a new PubSubSubspace.
 PubSubSubspaceId (int x, int y, int _maxY)
 ~PubSubSubspaceId ()
int getId () const
int getX () const
int getY () const
bool operator< (const PubSubSubspaceId x) const
bool operator== (const PubSubSubspaceId x) const

Protected Attributes

int spaceId
int maxY

Friends

std::ostream & operator<< (std::ostream &, const PubSubSubspaceId &)


Constructor & Destructor Documentation

PubSubSubspaceId::PubSubSubspaceId ( int  id,
int  _maxY 
) [inline]

Creates a new PubSubSubspace.

Parameters:
id The group ID of the new group
_maxY The number of subspaces per row
00043 : spaceId(id), maxY(_maxY) {};

PubSubSubspaceId::PubSubSubspaceId ( int  x,
int  y,
int  _maxY 
) [inline]

00044 : spaceId( x*_maxY + y), maxY(_maxY) {};

PubSubSubspaceId::~PubSubSubspaceId (  )  [inline]

00045 {};


Member Function Documentation

int PubSubSubspaceId::getId (  )  const [inline]

int PubSubSubspaceId::getX (  )  const [inline]

Referenced by PubSubLobby::failedNode(), and PubSubLobby::replaceResponsibleNode().

00048 { return (int) spaceId / maxY; }

int PubSubSubspaceId::getY (  )  const [inline]

Referenced by PubSubLobby::failedNode(), and PubSubLobby::replaceResponsibleNode().

00049 { return (int) spaceId % maxY; }

bool PubSubSubspaceId::operator< ( const PubSubSubspaceId  x  )  const [inline]

00051 { return spaceId < x.spaceId; }

bool PubSubSubspaceId::operator== ( const PubSubSubspaceId  x  )  const [inline]

00052 { return spaceId == x.spaceId; }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const PubSubSubspaceId subspaceId 
) [friend]

00028 {
00029     o << subspaceId.spaceId;
00030     return o;
00031 }


Member Data Documentation

int PubSubSubspaceId::spaceId [protected]

int PubSubSubspaceId::maxY [protected]

Referenced by getX(), and getY().


The documentation for this class was generated from the following file:

Generated on Fri Sep 19 13:05:08 2008 for ITM OverSim by  doxygen 1.5.5