Public Member Functions | Public Attributes | Friends

NTreeGroup Class Reference

#include <NTreeHelper.h>

List of all members.

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.

Referenced by NTree::handleMove().

{
    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

Definition at line 55 of file NTreeHelper.h.

Referenced by NTreeGroup().


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