User Manual, Developers Guide and API Documentation

wifimac::pathselection::VirtualPathSelection::AddressStorage Class Reference

AddresStorage provides a mapping from wns::service::dll::UnicastAddress to a (internal) id. More...

Collaboration diagram for wifimac::pathselection::VirtualPathSelection::AddressStorage:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AddressStorage ()
wns::service::dll::UnicastAddress get (const int id) const
 Convert id to adr.
int get (const wns::service::dll::UnicastAddress adr) const
 Convert adr to id.
int getMaxId () const
 Returns the maximum id.
bool knows (const int id) const
 Check if id is known.
bool knows (const wns::service::dll::UnicastAddress adr) const
 Check if adr is known.
int map (const wns::service::dll::UnicastAddress adr)
 Create new map from adr, returns its id.

Private Types

typedef
wns::container::Registry< int,
wns::service::dll::UnicastAddress
AdrLookup
typedef
wns::container::Registry
< wns::service::dll::UnicastAddress,
int
IdLookup

Private Attributes

IdLookup adr2id
 Map for adr to id.
AdrLookup id2adr
 Map for id to adr. Always consistent with adr2id.
int nextId
 Counter for the next, unused id.


Detailed Description

The mapping to an internal id saves memory space when creating the link cost and path cost matrices, as unicast addresses are mapped to a continuous set of numbers. Also, the matrices' size have to be initialized at startup, and it suffices to get the number of nodes instead the highest node address.

Definition at line 81 of file VirtualPathSelection.hpp.


Member Typedef Documentation

Definition at line 84 of file VirtualPathSelection.hpp.

Definition at line 83 of file VirtualPathSelection.hpp.


Constructor & Destructor Documentation

VirtualPathSelection::AddressStorage::AddressStorage (  ) 

Definition at line 760 of file VirtualPathSelection.cpp.


Member Function Documentation

wns::service::dll::UnicastAddress VirtualPathSelection::AddressStorage::get ( const int  id  )  const

Definition at line 790 of file VirtualPathSelection.cpp.

int VirtualPathSelection::AddressStorage::get ( const wns::service::dll::UnicastAddress  adr  )  const

Definition at line 784 of file VirtualPathSelection.cpp.

int VirtualPathSelection::AddressStorage::getMaxId (  )  const

Definition at line 808 of file VirtualPathSelection.cpp.

bool VirtualPathSelection::AddressStorage::knows ( const int  id  )  const

Definition at line 802 of file VirtualPathSelection.cpp.

bool VirtualPathSelection::AddressStorage::knows ( const wns::service::dll::UnicastAddress  adr  )  const

Definition at line 796 of file VirtualPathSelection.cpp.

int VirtualPathSelection::AddressStorage::map ( const wns::service::dll::UnicastAddress  adr  ) 

Definition at line 769 of file VirtualPathSelection.cpp.


Member Data Documentation

Definition at line 134 of file VirtualPathSelection.hpp.

Definition at line 138 of file VirtualPathSelection.hpp.

Definition at line 129 of file VirtualPathSelection.hpp.


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

Generated on Sat May 26 03:32:44 2012 for openWNS by  doxygen 1.5.5