olsr::gra::AdjInfo Class Reference

An arc of the graph. More...

#include <graph.hh>

List of all members.

Public Member Functions

 AdjInfo (const address_t &ep1, const address_t &ep2, AdjTag tag=topo)
const address_tendpoint1 () const
const address_tendpoint2 () const
AdjTag tag () const
bool operator== (const This &rhs) const
std::string to_string () const

Static Public Member Functions

static const Thismake_key (const address_t &ep1, const address_t &ep2, AdjTag tag=topo)
static This invert (const This &x)

Private Types

typedef AdjInfo This

Private Member Functions

 AdjInfo ()

Private Attributes

const address_t _ep1
 First endpoint.
const address_t _ep2
 Second endpoint.
const AdjTag _tag

Static Private Attributes

static This _dummy_for_find
 Static arc for key generation.


Detailed Description

An arc of the graph.

It is aimed to be augmented with additional attributes, to reflect link state.


Member Typedef Documentation

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


Constructor & Destructor Documentation

olsr::gra::AdjInfo::AdjInfo (  )  [explicit, private]

The private constructor.

It is defined solely for the initialization of _dummy_for_find.

olsr::gra::AdjInfo::AdjInfo ( const address_t ep1,
const address_t ep2,
AdjTag  tag = topo 
) [inline]

The general constructor.

  • ep1 first endpoint
  • ep2 second endpoint
  • tag tag of the arc


Member Function Documentation

const address_t& olsr::gra::AdjInfo::endpoint1 (  )  const [inline]

First endpoint accessor.

Returns:
Reference to first endpoint

References _ep1.

Referenced by olsr::gra::AdjGraph::insert_arc(), and olsr::gra::hash_AdjInfo::operator()().

const address_t& olsr::gra::AdjInfo::endpoint2 (  )  const [inline]

Second endpoint accessor.

Returns:
Reference to second endpoint

References _ep2.

Referenced by olsr::gra::AdjGraph::insert_arc(), and olsr::gra::hash_AdjInfo::operator()().

AdjTag olsr::gra::AdjInfo::tag (  )  const [inline]

References _tag.

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

Equality operator. Compares only endpoint addresses for the moment. Defined maily for hashing structures.

  • rhs right-hand-size operand
Returns:
true if equal, false otherwise

References _ep1, _ep2, and _tag.

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

References _ep1, _ep2, and _tag.

const AdjInfo & olsr::gra::AdjInfo::make_key ( const address_t ep1,
const address_t ep2,
AdjTag  tag = topo 
) [inline, static]

Key builder for find operations.

  • ep1 first endpoint
  • ep2 second endpoint
  • tag tag of the arc
Returns:
Reference to modified _dummy_for_find.

References _dummy_for_find, _ep1, _ep2, and _tag.

Referenced by olsr::alg::dijkstra(), olsr::set::TopologySet::erase(), and olsr::set::TwoHopNeighborSet::erase().

AdjInfo olsr::gra::AdjInfo::invert ( const This x  )  [inline, static]

Arc inverter.

  • x The arc to invert
Returns:
The inverted arc

References _ep1, _ep2, and _tag.

Referenced by olsr::gra::AdjGraph::insert_edge(), olsr::gra::AdjGraph::remove_edge(), and olsr::gra::AdjGraph::remove_edge_then_node().


Member Data Documentation

First endpoint.

Referenced by endpoint1(), invert(), make_key(), operator==(), and to_string().

Second endpoint.

Referenced by endpoint2(), invert(), make_key(), operator==(), and to_string().

Static arc 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