OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::enum_bitmask< option_type, typename > Class Template Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/enum_bitmask.hpp>

Inheritance diagram for Slic3r::enum_bitmask< option_type, typename >:

Public Member Functions

constexpr enum_bitmask ()
constexpr enum_bitmask (option_type o)
constexpr enum_bitmask operator| (option_type t) const
constexpr enum_bitmask operator| (enum_bitmask< option_type > t) const
constexpr void operator|= (option_type t)
constexpr void operator|= (enum_bitmask< option_type > t)
constexpr bool operator& (option_type t) const
constexpr bool has (option_type t) const
constexpr bool operator== (const enum_bitmask r) const
constexpr bool operator!= (const enum_bitmask r) const
constexpr bool lower (const enum_bitmask r) const

Private Types

using underlying_type = typename std::underlying_type<option_type>::type

Private Member Functions

constexpr enum_bitmask (underlying_type o)

Static Private Member Functions

static constexpr underlying_type mask_value (option_type o)

Private Attributes

underlying_type m_bits = 0

Detailed Description

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
class Slic3r::enum_bitmask< option_type, typename >

Member Typedef Documentation

◆ underlying_type

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
using Slic3r::enum_bitmask< option_type, typename >::underlying_type = typename std::underlying_type<option_type>::type
private

Constructor & Destructor Documentation

◆ enum_bitmask() [1/3]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
Slic3r::enum_bitmask< option_type, typename >::enum_bitmask ( underlying_type o)
inlineexplicitconstexprprivate
22: m_bits(o) {}
Definition enum_bitmask.hpp:14
underlying_type m_bits
Definition enum_bitmask.hpp:55

◆ enum_bitmask() [2/3]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
Slic3r::enum_bitmask< option_type, typename >::enum_bitmask ( )
inlineconstexpr
26: m_bits(0) {}

Referenced by Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|(), Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|(), Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|=(), and Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|=().

Here is the caller graph for this function:

◆ enum_bitmask() [3/3]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
Slic3r::enum_bitmask< option_type, typename >::enum_bitmask ( option_type o)
inlineconstexpr
31: m_bits(mask_value(o)) {}
static constexpr underlying_type mask_value(option_type o)
Definition enum_bitmask.hpp:19

Member Function Documentation

◆ has()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
bool Slic3r::enum_bitmask< option_type, typename >::has ( option_type t) const
inlineconstexpr

◆ lower()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
bool Slic3r::enum_bitmask< option_type, typename >::lower ( const enum_bitmask< option_type, typename > r) const
inlineconstexpr
52{ return m_bits < r.m_bits; }

◆ mask_value()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr underlying_type Slic3r::enum_bitmask< option_type, typename >::mask_value ( option_type o)
inlinestaticconstexprprivate
19{ return 1 << static_cast<underlying_type>(o); }
typename std::underlying_type< option_type >::type underlying_type
Definition enum_bitmask.hpp:16

Referenced by Slic3r::enum_bitmask< ModelObjectCutAttribute >::has(), Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator&(), Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|(), and Slic3r::enum_bitmask< ModelObjectCutAttribute >::operator|=().

Here is the caller graph for this function:

◆ operator!=()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
bool Slic3r::enum_bitmask< option_type, typename >::operator!= ( const enum_bitmask< option_type, typename > r) const
inlineconstexpr
50{ return m_bits != r.m_bits; }

◆ operator&()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
bool Slic3r::enum_bitmask< option_type, typename >::operator& ( option_type t) const
inlineconstexpr
46{ return m_bits & mask_value(t); }

◆ operator==()

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
bool Slic3r::enum_bitmask< option_type, typename >::operator== ( const enum_bitmask< option_type, typename > r) const
inlineconstexpr
49{ return m_bits == r.m_bits; }

◆ operator|() [1/2]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
enum_bitmask Slic3r::enum_bitmask< option_type, typename >::operator| ( enum_bitmask< option_type > t) const
inlineconstexpr
37{ return enum_bitmask(m_bits | t.m_bits); }
constexpr enum_bitmask()
Definition enum_bitmask.hpp:26

◆ operator|() [2/2]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
enum_bitmask Slic3r::enum_bitmask< option_type, typename >::operator| ( option_type t) const
inlineconstexpr
34{ return enum_bitmask(m_bits | mask_value(t)); }

◆ operator|=() [1/2]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
void Slic3r::enum_bitmask< option_type, typename >::operator|= ( enum_bitmask< option_type > t)
inlineconstexpr

◆ operator|=() [2/2]

template<class option_type, typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
void Slic3r::enum_bitmask< option_type, typename >::operator|= ( option_type t)
inlineconstexpr

Member Data Documentation

◆ m_bits


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