wifi::addr_mapping Struct Reference

IEEE 802.11 address to integer mapping designed to be stored into a database file. More...

#include <trace-tools/wifi/addr_mapping.hh>

Inheritance diagram for wifi::addr_mapping:

tool::datafile

List of all members.

Public Member Functions

 addr_mapping (const std::string &)
unsigned operator[] (const wifi::addr &)
 operator std::ostream & ()
template<class T>
std::ostream & operator<< (const T &)

Protected Member Functions

void load (std::istream &)


Detailed Description

IEEE 802.11 address to integer mapping designed to be stored into a database file.

Load the mapping from the file at creation when the file exists. Store it at deletion so it could be used later, or loaded in a database using a LOAD DATA INFILE SQL command.


Constructor & Destructor Documentation

wifi::addr_mapping::addr_mapping ( const std::string &  filename  )  [inline]

Construct the mapping given the database file's name.


Member Function Documentation

unsigned wifi::addr_mapping::operator[] ( const wifi::addr a  )  [inline]

Retrieve the index of a corresponding IEEE 802.11 address.

When the address exists in the mapping, just return its index. Else, insert the address into the mapping with a new index and return this index.

void wifi::addr_mapping::load ( std::istream &  in  )  [inline, protected]

Load a mapping from an std::istream.

tool::datafile::operator std::ostream & (  )  [inline, inherited]

Retrieve the underlying C++ stream.

template<class T>
std::ostream & tool::datafile::operator<< ( const T &  data  )  [inline, inherited]

Formatted output.


The documentation for this struct was generated from the following files:
Generated on Wed Sep 12 16:02:47 2007 for trace-tools by  doxygen 1.5.3