Project
Loading...
Searching...
No Matches
bitfield< T, S > Class Template Reference

#include <bitfield.h>

Public Member Functions

 bitfield (T v)
 
 bitfield (S v=0)
 
 bitfield (const bitfield &)=default
 
bitfieldoperator= (const bitfield &)=default
 
bitfield operator| (const bitfield v) const
 
bitfield operator| (const T v) const
 
bitfieldoperator|= (const bitfield v)
 
bitfield operator& (const bitfield v) const
 
bitfield operator& (const T v) const
 
bitfieldoperator&= (const bitfield v)
 
bitfield operator~ () const
 
bool operator== (const bitfield v)
 
bool operator== (const T v)
 
bool operator!= (const bitfield v)
 
bool operator!= (const T v)
 
bitfieldsetBits (const bitfield v, bool w)
 
void clear ()
 
void set (S v)
 
void set (T v)
 
template<typename... Args>
void set (T v, Args... args)
 
S get () const
 
 operator bool () const
 
 operator S () const
 
bool isSet (const bitfield &v) const
 
bool isSet (const S v) const
 
template<typename... Args>
bool isSetAll (Args... args)
 
template<typename... Args>
bool isSetAny (Args... args)
 
template<typename... Args>
bool isOnlySet (Args... args)
 

Static Public Member Functions

template<typename... Args>
static bitfield lor (const Args &... args)
 

Detailed Description

template<class T, class S>
class bitfield< T, S >

Definition at line 23 of file bitfield.h.

Constructor & Destructor Documentation

◆ bitfield() [1/3]

template<class T , class S >
bitfield< T, S >::bitfield ( v)
inline

Definition at line 26 of file bitfield.h.

◆ bitfield() [2/3]

template<class T , class S >
bitfield< T, S >::bitfield ( S  v = 0)
inline

Definition at line 27 of file bitfield.h.

◆ bitfield() [3/3]

template<class T , class S >
bitfield< T, S >::bitfield ( const bitfield< T, S > &  )
default

Member Function Documentation

◆ clear()

template<class T , class S >
void bitfield< T, S >::clear ( )
inline

Definition at line 58 of file bitfield.h.

◆ get()

template<class T , class S >
S bitfield< T, S >::get ( ) const
inline

Definition at line 67 of file bitfield.h.

◆ isOnlySet()

template<class T , class S >
template<typename... Args>
bool bitfield< T, S >::isOnlySet ( Args...  args)
inline

Definition at line 83 of file bitfield.h.

◆ isSet() [1/2]

template<class T , class S >
bool bitfield< T, S >::isSet ( const bitfield< T, S > &  v) const
inline

Definition at line 70 of file bitfield.h.

◆ isSet() [2/2]

template<class T , class S >
bool bitfield< T, S >::isSet ( const S  v) const
inline

Definition at line 71 of file bitfield.h.

◆ isSetAll()

template<class T , class S >
template<typename... Args>
bool bitfield< T, S >::isSetAll ( Args...  args)
inline

Definition at line 73 of file bitfield.h.

◆ isSetAny()

template<class T , class S >
template<typename... Args>
bool bitfield< T, S >::isSetAny ( Args...  args)
inline

Definition at line 78 of file bitfield.h.

◆ lor()

template<class T , class S >
template<typename... Args>
static bitfield bitfield< T, S >::lor ( const Args &...  args)
inlinestatic

Definition at line 88 of file bitfield.h.

◆ operator bool()

template<class T , class S >
bitfield< T, S >::operator bool ( ) const
inline

Definition at line 68 of file bitfield.h.

◆ operator S()

template<class T , class S >
bitfield< T, S >::operator S ( ) const
inline

Definition at line 69 of file bitfield.h.

◆ operator!=() [1/2]

template<class T , class S >
bool bitfield< T, S >::operator!= ( const bitfield< T, S v)
inline

Definition at line 47 of file bitfield.h.

◆ operator!=() [2/2]

template<class T , class S >
bool bitfield< T, S >::operator!= ( const T  v)
inline

Definition at line 48 of file bitfield.h.

◆ operator&() [1/2]

template<class T , class S >
bitfield bitfield< T, S >::operator& ( const bitfield< T, S v) const
inline

Definition at line 37 of file bitfield.h.

◆ operator&() [2/2]

template<class T , class S >
bitfield bitfield< T, S >::operator& ( const T  v) const
inline

Definition at line 38 of file bitfield.h.

◆ operator&=()

template<class T , class S >
bitfield & bitfield< T, S >::operator&= ( const bitfield< T, S v)
inline

Definition at line 39 of file bitfield.h.

◆ operator=()

template<class T , class S >
bitfield & bitfield< T, S >::operator= ( const bitfield< T, S > &  )
default

◆ operator==() [1/2]

template<class T , class S >
bool bitfield< T, S >::operator== ( const bitfield< T, S v)
inline

Definition at line 45 of file bitfield.h.

◆ operator==() [2/2]

template<class T , class S >
bool bitfield< T, S >::operator== ( const T  v)
inline

Definition at line 46 of file bitfield.h.

◆ operator|() [1/2]

template<class T , class S >
bitfield bitfield< T, S >::operator| ( const bitfield< T, S v) const
inline

Definition at line 30 of file bitfield.h.

◆ operator|() [2/2]

template<class T , class S >
bitfield bitfield< T, S >::operator| ( const T  v) const
inline

Definition at line 31 of file bitfield.h.

◆ operator|=()

template<class T , class S >
bitfield & bitfield< T, S >::operator|= ( const bitfield< T, S v)
inline

Definition at line 32 of file bitfield.h.

◆ operator~()

template<class T , class S >
bitfield bitfield< T, S >::operator~ ( ) const
inline

Definition at line 44 of file bitfield.h.

◆ set() [1/3]

template<class T , class S >
void bitfield< T, S >::set ( S  v)
inline

Definition at line 59 of file bitfield.h.

◆ set() [2/3]

template<class T , class S >
void bitfield< T, S >::set ( v)
inline

Definition at line 60 of file bitfield.h.

◆ set() [3/3]

template<class T , class S >
template<typename... Args>
void bitfield< T, S >::set ( v,
Args...  args 
)
inline

Definition at line 62 of file bitfield.h.

◆ setBits()

template<class T , class S >
bitfield & bitfield< T, S >::setBits ( const bitfield< T, S v,
bool  w 
)
inline

Definition at line 49 of file bitfield.h.


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