Public Member Functions | Protected Attributes | Friends

MarkedNodeHandle Class Reference

#include <KademliaNodeHandle.h>

Inheritance diagram for MarkedNodeHandle:
NodeHandle TransportAddress

List of all members.

Public Member Functions

 MarkedNodeHandle ()
 Constructs an unspecified MarkedNodeHandle.
 MarkedNodeHandle (const NodeHandle &handle, bool isAlive=false)
bool getIsAlive ()
void setIsAlive (bool isAlive)

Protected Attributes

bool isAlive

Friends

std::ostream & operator<< (std::ostream &os, const MarkedNodeHandle &n)

Detailed Description

Definition at line 108 of file KademliaNodeHandle.h.


Constructor & Destructor Documentation

MarkedNodeHandle::MarkedNodeHandle (  )  [inline]

Constructs an unspecified MarkedNodeHandle.

Definition at line 114 of file KademliaNodeHandle.h.

    : NodeHandle()
    {
        isAlive = false;
    }

MarkedNodeHandle::MarkedNodeHandle ( const NodeHandle handle,
bool  isAlive = false 
) [inline]

Definition at line 120 of file KademliaNodeHandle.h.

    : NodeHandle(handle)
    {
        this->isAlive = isAlive;
    }


Member Function Documentation

bool MarkedNodeHandle::getIsAlive (  )  [inline]

Definition at line 126 of file KademliaNodeHandle.h.

Referenced by Kademlia::recursiveRoutingHook().

{ return isAlive; };

void MarkedNodeHandle::setIsAlive ( bool  isAlive  )  [inline]

Definition at line 127 of file KademliaNodeHandle.h.

Referenced by Kademlia::recursiveRoutingHook().

{ this->isAlive = isAlive; };


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MarkedNodeHandle n 
) [friend]

Definition at line 27 of file KademliaNodeHandle.cc.

{
    if (n.ip.isUnspecified()) {
        os << "<addr unspec> ";
    } else {
        os << n.ip << ":" << n.port << " ";
    }

    if (n.key.isUnspecified()) {
        os << "<key unspec>";
    } else {
        os << n.key;
    }

    if (n.isAlive) {
        os << " ALIVE";
    } else {
        os << " NOT ALIVE";
    }

    return os;
};


Member Data Documentation

bool MarkedNodeHandle::isAlive [protected]

Definition at line 132 of file KademliaNodeHandle.h.

Referenced by getIsAlive(), MarkedNodeHandle(), and operator<<().


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