OverSim
NTreeGroup Class Reference

#include <NTreeHelper.h>

Public Member Functions

bool isInScope (const Vector2D &p) const
 NTreeGroup (const NTreeScope &_scope)
 NTreeGroup (const Vector2D &_origin, double _size)

Public Attributes

NodeHandle leader
std::set< NodeHandlemembers
NTreeScope scope
bool dividePending

Friends

bool operator== (const NTreeGroup &a, const NTreeGroup &b)
bool operator< (const NTreeGroup &a, const NTreeGroup &b)
std::ostream & operator<< (std::ostream &Stream, const NTreeGroup &group)

Detailed Description

Definition at line 49 of file NTreeHelper.h.

Constructor & Destructor Documentation

NTreeGroup::NTreeGroup ( const NTreeScope _scope)

Definition at line 67 of file NTreeHelper.cc.

:
scope(_scope)
{
dividePending = false;
}
NTreeGroup::NTreeGroup ( const Vector2D _origin,
double  _size 
)

Definition at line 73 of file NTreeHelper.cc.

:
scope(_origin,_size)
{
dividePending = false;
}

Member Function Documentation

bool NTreeGroup::isInScope ( const Vector2D p) const

Definition at line 79 of file NTreeHelper.cc.

{
return scope.contains(point);
}

Friends And Related Function Documentation

bool operator< ( const NTreeGroup a,
const NTreeGroup b 
)
friend

Definition at line 84 of file NTreeHelper.cc.

{
return a.scope < b.scope;
}
std::ostream& operator<< ( std::ostream &  Stream,
const NTreeGroup group 
)
friend

Definition at line 94 of file NTreeHelper.cc.

{
Stream << group.scope << " Leader: " << group.leader;
for( std::set<NodeHandle>::iterator it = group.members.begin(); it != group.members.end(); ++it ){
Stream << "\n" << it->getIp();
}
return Stream;
}
bool operator== ( const NTreeGroup a,
const NTreeGroup b 
)
friend

Definition at line 89 of file NTreeHelper.cc.

{
return a.scope == b.scope;
}

Member Data Documentation

bool NTreeGroup::dividePending

Definition at line 55 of file NTreeHelper.h.

Referenced by NTreeGroup().

NodeHandle NTreeGroup::leader

Definition at line 52 of file NTreeHelper.h.

Referenced by NTree::collapseTree(), NTree::handleAppMessage(), NTree::handleDivideCall(), NTree::handleJoinResponse(), and operator<<().

std::set<NodeHandle> NTreeGroup::members

Definition at line 53 of file NTreeHelper.h.

Referenced by NTree::collapseTree(), NTree::handleAppMessage(), NTree::handleDivideCall(), operator<<(), and NTree::sendToGroup().

NTreeScope NTreeGroup::scope

Definition at line 54 of file NTreeHelper.h.

Referenced by isInScope(), operator<(), operator<<(), operator==(), and NTree::sendToGroup().


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