|
cheshirekow
v0.1.0
|
Attributes object for type Base.
More...
#include <cpp_pthreads/attr.h>
Public Member Functions | |
| int | destroy () |
| destroy the attribute object More... | |
| template<typename T > | |
| int | get (T &value) |
safe value retrieval, sets value to the value stored in the attribute object More... | |
| template<typename T , typename U > | |
| int | get (const Access< Base, T > &access, U &value) |
safe value retrieval, sets value to the value stored in the attribute object More... | |
| int | init () |
| initialize the attribute object More... | |
| template<typename T > | |
| Attr< Base > & | operator<< (const T &value) |
| stream assignment, unsafe, ignores error values returned More... | |
| template<typename T > | |
| Delegate< Base, T > | operator[] (const Access< Base, T > &access) |
| map operator, unsafe assignment and retrieval, ignores error values returned More... | |
| template<typename T > | |
| T | operator[] (const Access< Base, T > &access) const |
| map operator for retrieval, ignores error values returned More... | |
| template<typename T > | |
| int | set (const T &value) |
| safe assignment of an attribute by value, use only when type is implied More... | |
Private Attributes | |
| AttrType< Base >::type | m_data |
| the wrapped pthreads_XXXattr_t object More... | |
Friends | |
| template<class Base2 , typename T > | |
| class | Access |
| template<class Base2 , typename T > | |
| class | Assignment |
| template<class Base2 , typename T > | |
| class | Delegate |
| class | Friendly< Base >::type |
Attributes object for type Base.
For example, Attr<Thread> is the cpp-pthreads object wrapping pthread_attr_t
| int pthreads::Attr< Base >::destroy | ( | ) |
destroy the attribute object
safe value retrieval, sets value to the value stored in the attribute object
| T | the type of the value to get, see note |
| value | where to store the value when retrieved |
T. For enumerators this is implied natively. For values which are built-in data types, use the data type specific to the field. For instance to get the guardsize of an Attr<Thread> object use the following:
|
inline |
safe value retrieval, sets value to the value stored in the attribute object
| T | the type of the value to get, see note |
| U | the type of the result object to set |
| access | object of type Access<Base,T> which retrieves the correct attribute value |
| value | the value to retrieve |
T. In order to tell the compiler which object you are trying to retrieve, use one of the statically defined Access<Base,T> object. For instance to get the guardsize of an Attr<Thread> object as an in use the following:| int pthreads::Attr< Base >::init | ( | ) |
initialize the attribute object
|
inline |
|
inline |
map operator, unsafe assignment and retrieval, ignores error values returned
Usage:
|
inline |
|
inline |
safe assignment of an attribute by value, use only when type is implied
| T | the type of the value to set, see note |
| value | The value to set |
T. For enumerators this is implied natively. For values which are built-in data types, use the constructor for the actual data type. For instance to set the guardsize of an Attr<Thread> to a value 100 use set( GuardSize(100) )
|
friend |
|
private |