Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::TSet< T, S > Class Template Reference

Template class for managing bit maks preferably when bits are defined as enumerate values. More...

#include <TSet.h>

Public Member Functions

 TSet ()
 
 TSet (const TSet &set)
 Copy constructor.
 
 TSet (S bits)
 Initializing constructor.
 
S & getBits ()
 Gets a reference to the storage integral typed value.
 
getBits () const
 Gets a copy of the storage integral typed value.
 
TSetoperator= (const TSet &set)
 assign operator.
 
bool has (T bit) const
 Returns true when the bit was Set.
 
TSetset (T bit)
 Sets bits in the mask.
 
TSetreset ()
 Resets all bits in the mask.
 
TSetunset (T bit)
 Unsets bits in the mask.
 
TSettoggle (T bit)
 Toggles a bit in the mask.
 
bool operator== (const TSet &set) const
 Compare equal operator.
 
bool operator!= (const TSet &set) const
 Compare unequal operator.
 
bool contains (T bit) const
 Operators and functions that are also available in the VCL 'Set' template.
 
TSetoperator<< (T bit)
 Operator for adding bits to the mask.
 
TSetoperator>> (T bit)
 Operator for removing bits from the mask.
 

Detailed Description

template<typename T = int, typename S = int>
class sf::TSet< T, S >

Template class for managing bit maks preferably when bits are defined as enumerate values.

Template Parameters
TInteger type for setting the bits.
SInteger type for containing the bits.

Constructor & Destructor Documentation

◆ TSet() [1/3]

template<typename T = int, typename S = int>
sf::TSet< T, S >::TSet ( )

Default constructor.

◆ TSet() [2/3]

template<typename T = int, typename S = int>
sf::TSet< T, S >::TSet ( const TSet< T, S > &  set)
inline

Copy constructor.

◆ TSet() [3/3]

template<typename T = int, typename S = int>
sf::TSet< T, S >::TSet ( bits)
explicit

Initializing constructor.

Member Function Documentation

◆ contains()

template<typename T = int, typename S = int>
bool sf::TSet< T, S >::contains ( bit) const

Operators and functions that are also available in the VCL 'Set' template.

Returns
True when bit is in the bit mask.

◆ getBits() [1/2]

template<typename T = int, typename S = int>
S & sf::TSet< T, S >::getBits ( )

Gets a reference to the storage integral typed value.

◆ getBits() [2/2]

template<typename T = int, typename S = int>
S sf::TSet< T, S >::getBits ( ) const

Gets a copy of the storage integral typed value.

◆ has()

template<typename T = int, typename S = int>
bool sf::TSet< T, S >::has ( bit) const

Returns true when the bit was Set.

◆ operator!=()

template<typename T = int, typename S = int>
bool sf::TSet< T, S >::operator!= ( const TSet< T, S > &  set) const

Compare unequal operator.

◆ operator<<()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::operator<< ( bit)

Operator for adding bits to the mask.

◆ operator=()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::operator= ( const TSet< T, S > &  set)

assign operator.

◆ operator==()

template<typename T = int, typename S = int>
bool sf::TSet< T, S >::operator== ( const TSet< T, S > &  set) const

Compare equal operator.

◆ operator>>()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::operator>> ( bit)

Operator for removing bits from the mask.

◆ reset()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::reset ( )

Resets all bits in the mask.

◆ set()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::set ( bit)

Sets bits in the mask.

◆ toggle()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::toggle ( bit)

Toggles a bit in the mask.

◆ unset()

template<typename T = int, typename S = int>
TSet & sf::TSet< T, S >::unset ( bit)

Unsets bits in the mask.


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