CARMA C++
carma::util::PthreadMutexAttr Class Reference

A simple wrapper class that makes use of ::pthread_mutexattr_t easier in a C++ world. More...

#include <carma/util/PthreadMutexAttr.h>

Public Member Functions

const ::pthread_mutexattr_t & InternalPthreadMutexAttr () const
 Obtain a reference to the internal ::pthread_mutexattr_t. More...
 
::pthread_mutexattr_t & InternalPthreadMutexAttr ()
 Obtain a reference to the internal ::pthread_mutexattr_t. More...
 
 PthreadMutexAttr ()
 Construct mutex attributes with the CARMA defaults. More...
 
 PthreadMutexAttr (int type)
 Construct mutex attributes with the given mutex type More...
 
virtual ~PthreadMutexAttr ()
 Destruct mutex attributes. More...
 

Detailed Description

A simple wrapper class that makes use of ::pthread_mutexattr_t easier in a C++ world.

Definition at line 14 of file PthreadMutexAttr.h.

Constructor & Destructor Documentation

carma::util::PthreadMutexAttr::PthreadMutexAttr ( )
explicit

Construct mutex attributes with the CARMA defaults.

Any internal errors will throw an exception.

carma::util::PthreadMutexAttr::PthreadMutexAttr ( int  type)
explicit

Construct mutex attributes with the given mutex type

Any internal errors will throw an exception.

virtual carma::util::PthreadMutexAttr::~PthreadMutexAttr ( )
virtual

Destruct mutex attributes.

No exceptions will be thrown and hence internal errors will be ignored as far as clients are concerned (though they may be logged).

Member Function Documentation

const ::pthread_mutexattr_t & carma::util::PthreadMutexAttr::InternalPthreadMutexAttr ( ) const

Obtain a reference to the internal ::pthread_mutexattr_t.

Warning
Use this with care. Certainly do not go off and call something like ::pthread_mutexattr_destroy on the return value. If you don't know what you are doing with POSIX mutex attributes then think twice before using this method.
Returns
a reference to the internal ::pthread_mutexattr_t

Definition at line 80 of file PthreadMutexAttr.h.

pthread_mutexattr_t & carma::util::PthreadMutexAttr::InternalPthreadMutexAttr ( )

Obtain a reference to the internal ::pthread_mutexattr_t.

Warning
Use this with care. Certainly do not go off and call something like ::pthread_mutexattr_destroy on the return value. If you don't know what you are doing with POSIX mutex attributes then think twice before using this method.
Returns
a reference to the internal ::pthread_mutexattr_t

Definition at line 87 of file PthreadMutexAttr.h.


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