ReadFramework
rdf::Flags< EnumType, Underlying > Class Template Reference

Flags turns enums into typesave flags It is strongly related (copied) from Useage: enum mDrawFlags { draw_none = 0x00, draw_ellipse = 0x01, draw_stats = 0x02, draw_center = 0x04, }; typedef Flags<mDrawFlags> DrawFlags; More...

#include <Utils.h>

Public Member Functions

 Flags ()
 
 Flags (EnumType f)
 
 Flags (const Flags &o)
 
Flagsoperator|= (const Flags &f)
 
Flagsoperator&= (const Flags &f)
 
Flags operator~ () const
 
 operator RestrictedBool () const
 
Underlying value () const
 

Protected Attributes

Underlying mFlags
 

Friends

Flags operator| (const Flags &f1, const Flags &f2)
 
Flags operator& (const Flags &f1, const Flags &f2)
 

Detailed Description

template<typename EnumType, typename Underlying = int>
class rdf::Flags< EnumType, Underlying >

Flags turns enums into typesave flags It is strongly related (copied) from Useage: enum mDrawFlags { draw_none = 0x00, draw_ellipse = 0x01, draw_stats = 0x02, draw_center = 0x04, }; typedef Flags<mDrawFlags> DrawFlags;

http://stackoverflow.com/questions/1448396/how-to-use-enums-as-flags-in-c/33971769#33971769 thanks A.

Constructor & Destructor Documentation

template<typename EnumType , typename Underlying = int>
rdf::Flags< EnumType, Underlying >::Flags ( )
inline
template<typename EnumType , typename Underlying = int>
rdf::Flags< EnumType, Underlying >::Flags ( EnumType  f)
inline
template<typename EnumType , typename Underlying = int>
rdf::Flags< EnumType, Underlying >::Flags ( const Flags< EnumType, Underlying > &  o)
inline

Member Function Documentation

template<typename EnumType , typename Underlying = int>
rdf::Flags< EnumType, Underlying >::operator RestrictedBool ( ) const
inline
template<typename EnumType , typename Underlying = int>
Flags& rdf::Flags< EnumType, Underlying >::operator&= ( const Flags< EnumType, Underlying > &  f)
inline
template<typename EnumType , typename Underlying = int>
Flags& rdf::Flags< EnumType, Underlying >::operator|= ( const Flags< EnumType, Underlying > &  f)
inline
template<typename EnumType , typename Underlying = int>
Flags rdf::Flags< EnumType, Underlying >::operator~ ( ) const
inline
template<typename EnumType , typename Underlying = int>
Underlying rdf::Flags< EnumType, Underlying >::value ( ) const
inline

Friends And Related Function Documentation

template<typename EnumType , typename Underlying = int>
Flags operator& ( const Flags< EnumType, Underlying > &  f1,
const Flags< EnumType, Underlying > &  f2 
)
friend
template<typename EnumType , typename Underlying = int>
Flags operator| ( const Flags< EnumType, Underlying > &  f1,
const Flags< EnumType, Underlying > &  f2 
)
friend

Member Data Documentation

template<typename EnumType , typename Underlying = int>
Underlying rdf::Flags< EnumType, Underlying >::mFlags
protected

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