#include <lut.hh>
Collaboration diagram for oln::level::hlut< T, T2 >:

Public Types | |
| typedef T2 | output_t |
Public Member Functions | |
| hlut & | set (const T &val, const T2 &newval) |
| const T2 | operator() (const T &val) const |
If the value has not been set, return id (see the example).
** hlut<int> l; ** ** l.set(16, 64); ** ** cout << l(16) << "," // print 64, ** << l(51) << endl; // print 51 **
Definition at line 54 of file lut.hh.
|
||||||||||
|
Get the value corresponding to the key. Return the key if the key has not been set. Definition at line 81 of file lut.hh.
00082 {
00083 static typename hmap_t::const_iterator i;
00084 i = hmap_.find(val);
00085 return i != hmap_.end() ? i->second : val;
00086 }
|
|
||||||||||||||||
|
Register a value.
Definition at line 70 of file lut.hh.
00071 {
00072 hmap_[val] = newval;
00073 return *this;
00074 }
|
1.3.6-20040222