Visualization Library 2.1.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Types | Public Member Functions | Friends | List of all members
vl::Flags< T_FlagEnum > Class Template Reference

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

#include <Flags.hpp>

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
 
Flagsset (T_FlagEnum flag)
 
Flagsunset (T_FlagEnum flag)
 
Flagsoperator= (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

◆ flag_storage

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

Definition at line 47 of file Flags.hpp.

◆ flag_type

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

Definition at line 46 of file Flags.hpp.

Constructor & Destructor Documentation

◆ Flags()

template<typename T_FlagEnum>
vl::Flags< T_FlagEnum >::Flags ( )
inline

Definition at line 50 of file Flags.hpp.

Member Function Documentation

◆ flags()

template<typename T_FlagEnum>
flag_storage vl::Flags< T_FlagEnum >::flags ( ) const
inline

Definition at line 52 of file Flags.hpp.

Referenced by vl::operator &(), and vl::operator|().

◆ operator &() [1/2]

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.

◆ operator &() [2/2]

template<typename T_FlagEnum>
Flags vl::Flags< T_FlagEnum >::operator& ( T_FlagEnum  flag) const
inline

Definition at line 113 of file Flags.hpp.

◆ operator bool()

template<typename T_FlagEnum>
vl::Flags< T_FlagEnum >::operator bool ( ) const
inline

Definition at line 134 of file Flags.hpp.

◆ operator-() [1/2]

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.

◆ operator-() [2/2]

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

◆ operator=()

template<typename T_FlagEnum>
Flags& vl::Flags< T_FlagEnum >::operator= ( T_FlagEnum  flag)
inline

Definition at line 100 of file Flags.hpp.

◆ operator^() [1/2]

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.

◆ operator^() [2/2]

template<typename T_FlagEnum>
Flags vl::Flags< T_FlagEnum >::operator^ ( T_FlagEnum  flag) const
inline

Definition at line 120 of file Flags.hpp.

◆ operator|() [1/2]

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.

◆ operator|() [2/2]

template<typename T_FlagEnum>
Flags vl::Flags< T_FlagEnum >::operator| ( T_FlagEnum  flag) const
inline

Definition at line 106 of file Flags.hpp.

◆ reset()

template<typename T_FlagEnum>
void vl::Flags< T_FlagEnum >::reset ( )
inline

Definition at line 54 of file Flags.hpp.

◆ set()

template<typename T_FlagEnum>
Flags& vl::Flags< T_FlagEnum >::set ( T_FlagEnum  flag)
inline

Definition at line 88 of file Flags.hpp.

◆ unset()

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

Friends And Related Function Documentation

◆ operator &

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

Definition at line 152 of file Flags.hpp.

◆ operator|

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

Definition at line 144 of file Flags.hpp.


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