# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Types | Public Member Functions | Friends

# vl::Flags< T_FlagEnum > Class Template Reference

Simple class to manage flags in a type safe manner. More...

`#include <Flags.hpp>`

List of all members.

## Public Types

typedef T_FlagEnum | flag_type
typedef unsigned int | flag_storage

## Public Member Functions

| Flags ()
flag_storage | flags () const
void | reset ()
Flags | operator| (const Flags &flag) const
Flags | operator& (const Flags &flag) const
Flags | operator^ (const Flags &flag) const
Flags | operator- (const Flags &flag) const
Flags & | set (T_FlagEnum flag)
Flags & | unset (T_FlagEnum flag)
Flags & | operator= (T_FlagEnum flag)
Flags | operator| (T_FlagEnum flag) const
Flags | operator& (T_FlagEnum flag) const
Flags | operator^ (T_FlagEnum flag) const
Flags | operator- (T_FlagEnum flag) const
| operator bool () const

## Friends

template<typename T >
Flags< T > | operator| (T flag1, T flag2)
template<typename T >
Flags< T > | operator& (T flag1, T flag2)

## Detailed Description

### template<typename T_FlagEnum>
class vl::Flags< T_FlagEnum >

Simple class to manage flags in a type safe manner.

Definition at line 39 of file Flags.hpp.

## Member Typedef Documentation

template<typename T_FlagEnum>

typedef T_FlagEnum vl::Flags< T_FlagEnum >::flag_type

Definition at line 46 of file Flags.hpp.

template<typename T_FlagEnum>

typedef unsigned int vl::Flags< T_FlagEnum >::flag_storage

Definition at line 47 of file Flags.hpp.

## Constructor & Destructor Documentation

template<typename T_FlagEnum>

vl::Flags< T_FlagEnum >::Flags | ( | ) | `[inline]`

Definition at line 50 of file Flags.hpp.

## Member Function Documentation

template<typename T_FlagEnum>

flag_storage vl::Flags< T_FlagEnum >::flags | ( | ) | const`[inline]`

Definition at line 52 of file Flags.hpp.

template<typename T_FlagEnum>

void vl::Flags< T_FlagEnum >::reset | ( | ) | `[inline]`

Definition at line 54 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator| | ( | const Flags< T_FlagEnum > & | flag ) | const`[inline]`

Definition at line 58 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator& | ( | const Flags< T_FlagEnum > & | flag ) | const`[inline]`

Definition at line 65 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator^ | ( | const Flags< T_FlagEnum > & | flag ) | const`[inline]`

Definition at line 72 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator- | ( | const Flags< T_FlagEnum > & | flag ) | const`[inline]`

Definition at line 79 of file Flags.hpp.

template<typename T_FlagEnum>

Flags& vl::Flags< T_FlagEnum >::set | ( | T_FlagEnum | flag ) | `[inline]`

Definition at line 88 of file Flags.hpp.

template<typename T_FlagEnum>

Flags& vl::Flags< T_FlagEnum >::unset | ( | T_FlagEnum | flag ) | `[inline]`

Definition at line 94 of file Flags.hpp.

Referenced by vl::Flags< T_FlagEnum >::operator-().

template<typename T_FlagEnum>

Flags& vl::Flags< T_FlagEnum >::operator= | ( | T_FlagEnum | flag ) | `[inline]`

Definition at line 100 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator| | ( | T_FlagEnum | flag ) | const`[inline]`

Definition at line 106 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator& | ( | T_FlagEnum | flag ) | const`[inline]`

Definition at line 113 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator^ | ( | T_FlagEnum | flag ) | const`[inline]`

Definition at line 120 of file Flags.hpp.

template<typename T_FlagEnum>

Flags vl::Flags< T_FlagEnum >::operator- | ( | T_FlagEnum | flag ) | const`[inline]`

Definition at line 127 of file Flags.hpp.

References vl::Flags< T_FlagEnum >::unset().

template<typename T_FlagEnum>

vl::Flags< T_FlagEnum >::operator bool | ( | ) | const`[inline]`

Definition at line 134 of file Flags.hpp.

## Friends And Related Function Documentation

template<typename T_FlagEnum>
template<typename T >

Flags<T> operator| | ( | T | flag1,
|  | T | flag2
| ) |  | `[friend]`

Definition at line 144 of file Flags.hpp.

template<typename T_FlagEnum>
template<typename T >

Flags<T> operator& | ( | T | flag1,
|  | T | flag2
| ) |  | `[friend]`

Definition at line 152 of file Flags.hpp.

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/Flags.hpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:04.
Permission is granted to use this page to write and publish articles regarding Visualization Library.