cheshirekow  v0.1.0
pthreads::TypeWrap< T, ID > Struct Template Reference

Provides a unique type that acts like a native type. More...

#include <cpp_pthreads/attr.h>

Public Member Functions

 operator const T & () const
 implicit conversion to a const reference of type T, means that this object can act exactly like a T object More...
 
 operator T & ()
 implicit conversion to a reference of type T, means that this object can act exactly like a T object More...
 
TypeWrap< T, ID > & operator= (const T &data)
 assigns the value to data More...
 
 TypeWrap ()
 does nothing More...
 
 TypeWrap (const T &data)
 initialize the stored data to data More...
 

Public Attributes

m_data
 

Detailed Description

template<typename T, unsigned int ID>
struct pthreads::TypeWrap< T, ID >

Provides a unique type that acts like a native type.

Note
This is used to inform the compiler of which template to instantiate. For instance GuardSize is typedefed as TypeWrap<std::size_t,0> while StackSize is typedefed as TypeWrap<std::size_t,1>. They both act just like std::size_t but they are in fact distinct types that the compiler can distinguish.

Definition at line 261 of file attr.h.

Constructor & Destructor Documentation

template<typename T , unsigned int ID>
pthreads::TypeWrap< T, ID >::TypeWrap ( )
inline

does nothing

Definition at line 265 of file attr.h.

template<typename T , unsigned int ID>
pthreads::TypeWrap< T, ID >::TypeWrap ( const T &  data)
inline

initialize the stored data to data

Definition at line 269 of file attr.h.

Member Function Documentation

template<typename T , unsigned int ID>
pthreads::TypeWrap< T, ID >::operator const T & ( ) const
inline

implicit conversion to a const reference of type T, means that this object can act exactly like a T object

Definition at line 287 of file attr.h.

template<typename T , unsigned int ID>
pthreads::TypeWrap< T, ID >::operator T & ( )
inline

implicit conversion to a reference of type T, means that this object can act exactly like a T object

Definition at line 281 of file attr.h.

template<typename T , unsigned int ID>
TypeWrap<T, ID>& pthreads::TypeWrap< T, ID >::operator= ( const T &  data)
inline

assigns the value to data

Definition at line 274 of file attr.h.

Member Data Documentation

template<typename T , unsigned int ID>
T pthreads::TypeWrap< T, ID >::m_data

Definition at line 262 of file attr.h.


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