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.
S getBits () const
 Gets a copy of the storage integral typed value.
TSet & operator= (const TSet &set)
 assign operator.
bool has (T bit) const
 Returns true when the bit was Set.
TSet & set (T bit)
 Sets bits in the mask.
TSet & reset ()
 Resets all bits in the mask.
TSet & unset (T bit)
 Unsets bits in the mask.
TSet & toggle (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.
TSet & operator<< (T bit)
 Operator for adding bits to the mask.
TSet & operator>> (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 ( S bits)
explicit

Initializing constructor.

Member Function Documentation

◆ contains()

template<typename T = int, typename S = int>
bool sf::TSet< T, S >::contains ( T 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 ( T 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<< ( T 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>> ( T 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 ( T bit)

Sets bits in the mask.

◆ toggle()

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

Toggles a bit in the mask.

◆ unset()

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

Unsets bits in the mask.


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