glbinding  2.1.1.96dbfd46d679
A C++ binding for the OpenGL API, generated using the gl.xml specification.
glbinding::SharedBitfield< Type, Types... > Class Template Reference

A representation of a bitfield value that could be member of multiple bitfield types as allowed in OpenGL. More...

#include <glbinding/include/glbinding/SharedBitfield.h>

Inheritance diagram for glbinding::SharedBitfield< Type, Types... >:
glbinding::SharedBitfield< Types... >

Public Types

using UnderlyingType = typename SharedBitfield< Types... >::UnderlyingType
 inherit UnderlyingType declaration More...
 

Public Member Functions

template<typename ConstructionType >
 SharedBitfield (ConstructionType value)
 Constructor. More...
 
 SharedBitfield (typename std::underlying_type< Type >::type value)
 Constructor. More...
 
 operator Type () const
 Cast operator to allow for conversion of the generic value to a specific bitfield type. More...
 
template<typename... T>
auto operator| (SharedBitfield< T... > other) const -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type >::type
 Performs a bit-wise 'or' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection. More...
 
template<typename... T>
auto operator|= (SharedBitfield< T... > other) -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, SharedBitfield & >::type
 Performs a bit-wise 'or' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield. More...
 
template<typename... T>
auto operator& (SharedBitfield< T... > other) const -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type >::type
 Performs a bit-wise 'and' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection. More...
 
template<typename... T>
auto operator&= (SharedBitfield< T... > other) -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, SharedBitfield & >::type
 Performs a bit-wise 'and' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield. More...
 
template<typename... T>
auto operator^ (SharedBitfield< T... > other) const -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type >::type
 Performs a bit-wise 'xor' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection. More...
 
template<typename... T>
auto operator^= (SharedBitfield< T... > other) -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, SharedBitfield & >::type
 Performs a bit-wise 'xor' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield. More...
 
template<typename... T>
auto operator== (SharedBitfield< T... > other) const -> typename std::enable_if<!std::is_same< typename intersect_SharedBitfield< SharedBitfield, SharedBitfield< T... >>::type, SharedBitfield<>>::value, bool >::type
 Test for equality of the values of this SharedBitfield and the other SharedBitfield. More...
 
template<typename T >
auto operator== (T other) const -> typename std::enable_if< is_member_of_SharedBitfield< T, Type, Types... >::value, bool >::type
 Test for equality of the value of this SharedBitfield and the other bitfield value. More...
 

Detailed Description

template<typename Type, typename... Types>
class glbinding::SharedBitfield< Type, Types... >

A representation of a bitfield value that could be member of multiple bitfield types as allowed in OpenGL.

Parameters
TypeThe head of valid bitfields type for the given value.
TypesThe tail of valid bitfields type for the given value.

Member Typedef Documentation

template<typename Type , typename... Types>
using glbinding::SharedBitfield< Type, Types... >::UnderlyingType = typename SharedBitfield<Types...>::UnderlyingType

inherit UnderlyingType declaration

Constructor & Destructor Documentation

template<typename Type , typename... Types>
template<typename ConstructionType >
glbinding::SharedBitfield< Type, Types... >::SharedBitfield ( ConstructionType  value)

Constructor.

Template Parameters
ConstructionTypeThe type of the passed value which is implicitly convertible to the UnderlyingType.
Parameters
[in]valueThe value of this SharedBitfield.
template<typename Type , typename... Types>
glbinding::SharedBitfield< Type, Types... >::SharedBitfield ( typename std::underlying_type< Type >::type  value)

Constructor.

Parameters
[in]valueThe value of this SharedBitfield.

Member Function Documentation

template<typename Type , typename... Types>
glbinding::SharedBitfield< Type, Types... >::operator Type ( ) const

Cast operator to allow for conversion of the generic value to a specific bitfield type.

Returns
The bitfield value as type of Type.
template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator| ( SharedBitfield< T... >  other) const -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type>::type

Performs a bit-wise 'or' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection.

Parameters
[in]otherThe SharedBitfield instance to operate with.
Returns
The new SharedBitfield with intersected types list and computed value.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator|= ( SharedBitfield< T... >  other) -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, SharedBitfield &>::type

Performs a bit-wise 'or' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield.

Parameters
[in]otherThe SharedBitfield instance to operate with.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator& ( SharedBitfield< T... >  other) const -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type>::type

Performs a bit-wise 'and' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection.

Parameters
[in]otherThe SharedBitfield instance to operate with.
Returns
The new SharedBitfield with intersected types list and computed value.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator&= ( SharedBitfield< T... >  other) -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, SharedBitfield &>::type

Performs a bit-wise 'and' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield.

Parameters
[in]otherThe SharedBitfield instance to operate with.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator^ ( SharedBitfield< T... >  other) const -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type>::type

Performs a bit-wise 'xor' operation on the values of this and other while constraining the resulting shared bitfield types to the intersection.

Parameters
[in]otherThe SharedBitfield instance to operate with.
Returns
The new SharedBitfield with intersected types list and computed value.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator^= ( SharedBitfield< T... >  other) -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, SharedBitfield &>::type

Performs a bit-wise 'xor' assignment operation on the values of this and other, where type list of the right hand side has to be a superset of the types list of this SharedBitfield.

Parameters
[in]otherThe SharedBitfield instance to operate with.

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename... T>
auto glbinding::SharedBitfield< Type, Types... >::operator== ( SharedBitfield< T... >  other) const -> typename std::enable_if<!std::is_same<typename intersect_SharedBitfield<SharedBitfield, SharedBitfield<T...>>::type, SharedBitfield<>>::value, bool>::type

Test for equality of the values of this SharedBitfield and the other SharedBitfield.

Parameters
[in]otherThe SharedBitfield instance to operate with.
Returns
true iff the values equals

This method is not visible to the compiler if the operands don't share any bitfield type (the intersection is empty) and thus results in a compiler error.

template<typename Type , typename... Types>
template<typename T>
auto glbinding::SharedBitfield< Type, Types... >::operator== ( other) const -> typename std::enable_if<is_member_of_SharedBitfield<T, Type, Types...>::value, bool>::type

Test for equality of the value of this SharedBitfield and the other bitfield value.

Template Parameters
TThe bitfield type of the value to test
Parameters
[in]otherThe bitfield value to operate with..
Returns
true iff the values equals

This method is not visible to the compiler if the this SharedBitfield type list contains the type T.


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