mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
mf::masked_elem< Elem, typename > Struct Template Reference

Nullable wrapper for elem type which adds mask. More...

#include <masked_elem.h>

Public Member Functions

bool is_null () const
 
 operator bool () const
 
 masked_elem ()
 
 masked_elem (const Elem &el)
 
 masked_elem (const masked_elem &)=default
 
masked_elemoperator= (const masked_elem &)=default
 
masked_elemoperator= (const Elem &el)
 
 operator const Elem & () const
 
 operator Elem & ()
 

Static Public Member Functions

static masked_elem null ()
 

Public Attributes

Elem elem
 Non-nullable element. More...
 
bool mask
 Mask, false if masked_elem is null. More...
 

Friends

bool operator== (const masked_elem &a, const masked_elem &b)
 
bool operator!= (const masked_elem &a, const masked_elem &b)
 

Detailed Description

template<typename Elem, typename = void>
struct mf::masked_elem< Elem, typename >

Nullable wrapper for elem type which adds mask.

POD type, where the elem is always at same memory address as the masked_elem object. A one byte mask is added behind the element. Depending in alignmment requirement of Elem, sizeof(masked_elem<Elem>) can become larger than sizeof(Elem) + 1.

Constructor & Destructor Documentation

template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::masked_elem ( )
inline
template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::masked_elem ( const Elem &  el)
inline
template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::masked_elem ( const masked_elem< Elem, typename > &  )
default

Member Function Documentation

template<typename Elem , typename = void>
bool mf::masked_elem< Elem, typename >::is_null ( ) const
inline
template<typename Elem , typename = void>
static masked_elem mf::masked_elem< Elem, typename >::null ( )
inlinestatic
template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::operator bool ( ) const
inlineexplicit
template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::operator const Elem & ( ) const
inline
template<typename Elem , typename = void>
mf::masked_elem< Elem, typename >::operator Elem & ( )
inline
template<typename Elem , typename = void>
masked_elem& mf::masked_elem< Elem, typename >::operator= ( const masked_elem< Elem, typename > &  )
default
template<typename Elem , typename = void>
masked_elem& mf::masked_elem< Elem, typename >::operator= ( const Elem &  el)
inline

Friends And Related Function Documentation

template<typename Elem , typename = void>
bool operator!= ( const masked_elem< Elem, typename > &  a,
const masked_elem< Elem, typename > &  b 
)
friend
template<typename Elem , typename = void>
bool operator== ( const masked_elem< Elem, typename > &  a,
const masked_elem< Elem, typename > &  b 
)
friend

Member Data Documentation

template<typename Elem , typename = void>
Elem mf::masked_elem< Elem, typename >::elem

Non-nullable element.

template<typename Elem , typename = void>
bool mf::masked_elem< Elem, typename >::mask

Mask, false if masked_elem is null.


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