olsr::gra::AdjNode Class Reference

A Node of the graph. More...

#include <graph.hh>

List of all members.

Public Member Functions

 AdjNode (const address_t &ep, unsigned w=1)
const address_tendpoint () const
unsigned weight () const
void set_weight (unsigned w)
bool operator== (const This &rhs) const
std::string to_string () const

Static Public Member Functions

static const Thismake_key (const address_t &ep)

Private Types

typedef AdjNode This

Private Member Functions

 AdjNode ()

Private Attributes

const address_t _endpoint
 Endpoint.
unsigned _weight
 Weight.

Static Private Attributes

static This _dummy_for_find
 Static node for key generation.


Detailed Description

A Node of the graph.

It is aimed to be augmented with information about nodes.


Member Typedef Documentation

typedef AdjNode olsr::gra::AdjNode::This [private]


Constructor & Destructor Documentation

olsr::gra::AdjNode::AdjNode (  )  [inline, explicit, private]

The private constructor.

It is defined solely for the initialization of _dummy_for_find.

olsr::gra::AdjNode::AdjNode ( const address_t ep,
unsigned  w = 1 
) [inline]

The general constructor.

  • ep endpoint
  • w weight


Member Function Documentation

const address_t& olsr::gra::AdjNode::endpoint (  )  const [inline]

Endpoint accessor.

Returns:
reference to endpoint

References _endpoint.

Referenced by olsr::alg::dijkstra(), olsr::gra::hash_AdjNode::operator()(), and olsr::alg::sort_less::operator()().

unsigned olsr::gra::AdjNode::weight (  )  const [inline]

Weight accessor.

Returns:
weight

References _weight.

Referenced by olsr::alg::dijkstra(), and olsr::alg::sort_less::operator()().

void olsr::gra::AdjNode::set_weight ( unsigned  w  )  [inline]

Weight modifier.

  • w new weight

References _weight.

bool olsr::gra::AdjNode::operator== ( const This rhs  )  const [inline]

Equality operator. Compares only endpoint addresses for the moment. Defined mainly for hash structures.

  • rhs right-hand-side operand
Returns:
true if equal, false if not

References _endpoint.

std::string olsr::gra::AdjNode::to_string (  )  const [inline]

References _endpoint, and _weight.

const AdjNode & olsr::gra::AdjNode::make_key ( const address_t ep  )  [inline, static]


Member Data Documentation

Endpoint.

Referenced by endpoint(), make_key(), operator==(), and to_string().

unsigned olsr::gra::AdjNode::_weight [private]

Weight.

Referenced by set_weight(), to_string(), and weight().

Static node for key generation.

Referenced by make_key().


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

Generated on Thu Feb 12 20:45:38 2009 for Qolyester daemon by  doxygen 1.5.6