Wt::FlagMap Class Reference

maps the flags of the underlying system to ours More...

#include <flagmap.h>

List of all members.

Public Member Functions

 FlagMap ()
template<typename InputIterator>
 FlagMap (InputIterator first, InputIterator last)
int operator[] (int key) const
int state (int flags) const


Detailed Description

maps the flags of the underlying system to ours

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().


Constructor & Destructor Documentation

Wt::FlagMap::FlagMap (  )  [inline]

template<typename InputIterator>
Wt::FlagMap::FlagMap ( InputIterator  first,
InputIterator  last 
) [inline]


Member Function Documentation

int Wt::FlagMap::operator[] ( int  key  )  const [inline]

int Wt::FlagMap::state ( int  flags  )  const [inline]


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

Generated Fri Jul 28 19:22:38 2006.
Copyright © 1998-2003 by the respective authors.

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.