Castor3D 0.16.0
Multiplatform 3D engine
Public Types | List of all members
castor::FlagCombination< FlagType > Class Template Reference

Template class providing implicit conversion from a scoped enum to its integral base type. More...

#include <FlagCombination.hpp>

Inheritance diagram for castor::FlagCombination< FlagType >:
Inheritance graph
[legend]

Public Types

using BaseType = typename std::underlying_type< FlagType >::type
 The basic integer type.
 

Public Member Functions

Construction.

constexpr FlagCombination (FlagType value) noexcept
 
constexpr FlagCombination (BaseType value=BaseType{}) noexcept
 

Casting.

constexpr operator BaseType const & () const noexcept
 
constexpr BaseType value () const noexcept
 

Iteration.

constexpr FlagIterator< FlagType > begin () const noexcept
 
constexpr FlagIterator< FlagType > end () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr bool empty () const noexcept
 

Binary operators.

constexpr FlagCombinationoperator&= (BaseType rhs) noexcept
 
constexpr FlagCombinationoperator|= (BaseType rhs) noexcept
 
constexpr FlagCombinationoperator^= (BaseType rhs) noexcept
 
constexpr FlagCombinationoperator&= (FlagType rhs) noexcept
 
constexpr FlagCombinationoperator|= (FlagType rhs) noexcept
 
constexpr FlagCombinationoperator^= (FlagType rhs) noexcept
 
constexpr FlagCombinationoperator&= (FlagCombination< FlagType > const &rhs) noexcept
 
constexpr FlagCombinationoperator|= (FlagCombination< FlagType > const &rhs) noexcept
 
constexpr FlagCombinationoperator^= (FlagCombination< FlagType > const &rhs) noexcept
 
constexpr FlagCombinationoperator~ () noexcept
 

Detailed Description

template<typename FlagType>
class castor::FlagCombination< FlagType >

Template class providing implicit conversion from a scoped enum to its integral base type.

Remarks
Allows definition of flags, through binary operations (&, |), for which operands will be of same binary size.

Member Typedef Documentation

◆ BaseType

template<typename FlagType >
using castor::FlagCombination< FlagType >::BaseType = typename std::underlying_type< FlagType >::type

The basic integer type.

Constructor & Destructor Documentation

◆ FlagCombination() [1/2]

template<typename FlagType >
constexpr castor::FlagCombination< FlagType >::FlagCombination ( FlagType value)
inlineconstexprnoexcept

References castor::FlagCombination< FlagType >::value().

Here is the call graph for this function:

◆ FlagCombination() [2/2]

template<typename FlagType >
constexpr castor::FlagCombination< FlagType >::FlagCombination ( BaseType value = BaseType{})
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ begin()

template<typename FlagType >
constexpr FlagIterator< FlagType > castor::FlagCombination< FlagType >::begin ( ) const
inlineconstexprnoexcept

Referenced by castor::FlagCombination< FlagType >::size().

Here is the caller graph for this function:

◆ empty()

template<typename FlagType >
constexpr bool castor::FlagCombination< FlagType >::empty ( ) const
inlineconstexprnoexcept

References castor::FlagCombination< FlagType >::value().

Here is the call graph for this function:

◆ end()

template<typename FlagType >
constexpr FlagIterator< FlagType > castor::FlagCombination< FlagType >::end ( ) const
inlineconstexprnoexcept

Referenced by castor::FlagCombination< FlagType >::size().

Here is the caller graph for this function:

◆ operator BaseType const &()

template<typename FlagType >
constexpr castor::FlagCombination< FlagType >::operator BaseType const & ( ) const
inlineconstexprnoexcept

◆ operator&=() [1/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator&= ( BaseType rhs)
inlineconstexprnoexcept

◆ operator&=() [2/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator&= ( FlagCombination< FlagType > const & rhs)
inlineconstexprnoexcept

◆ operator&=() [3/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator&= ( FlagType rhs)
inlineconstexprnoexcept

◆ operator^=() [1/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator^= ( BaseType rhs)
inlineconstexprnoexcept

◆ operator^=() [2/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator^= ( FlagCombination< FlagType > const & rhs)
inlineconstexprnoexcept

◆ operator^=() [3/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator^= ( FlagType rhs)
inlineconstexprnoexcept

◆ operator|=() [1/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator|= ( BaseType rhs)
inlineconstexprnoexcept

◆ operator|=() [2/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator|= ( FlagCombination< FlagType > const & rhs)
inlineconstexprnoexcept

◆ operator|=() [3/3]

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator|= ( FlagType rhs)
inlineconstexprnoexcept

◆ operator~()

template<typename FlagType >
constexpr FlagCombination & castor::FlagCombination< FlagType >::operator~ ( )
inlineconstexprnoexcept

◆ size()

template<typename FlagType >
constexpr size_t castor::FlagCombination< FlagType >::size ( ) const
inlineconstexprnoexcept

References castor::FlagCombination< FlagType >::begin(), and castor::FlagCombination< FlagType >::end().

Here is the call graph for this function:

◆ value()

template<typename FlagType >
constexpr BaseType castor::FlagCombination< FlagType >::value ( ) const
inlineconstexprnoexcept

Referenced by castor::FlagCombination< FlagType >::empty(), and castor::FlagCombination< FlagType >::FlagCombination().

Here is the caller graph for this function:

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