#include <flagmap.h>
Public Member Functions | |
FlagMap () | |
template<typename InputIterator> | |
FlagMap (InputIterator first, InputIterator last) | |
int | operator[] (int key) const |
int | state (int flags) const |
This is one weird class that needs some documenting since it competely not obvious.
This is a map between two different but equivalent flags sets.
The mapped type (value_type) is always an enum in power of two.
The key_type can be consequent or power of two. We use a heuristic to decide if it is consequent or not. if consequent = true then the key is expected in consequent numbers starting from 1 (1, 2, 3) else it is expected an enum with powers of two (1, 2, 4, 8)
You can map a key of the original system to a Wt flag using operator[].
It is also possible to map an ored combination of the original flags using state().
Wt::FlagMap::FlagMap | ( | ) | [inline] |
Wt::FlagMap::FlagMap | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline] |
int Wt::FlagMap::operator[] | ( | int | key | ) | const [inline] |
int Wt::FlagMap::state | ( | int | flags | ) | const [inline] |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.