ldas-tools-al 2.6.7
Loading...
Searching...
No Matches
LDASTools::AL::ReadWriteLockVariable< T, V > Class Template Reference

Implements read/write lock symantics for a variable. More...

#include <ReadWriteLock.hh>

Public Types

typedef ReadWriteLock::baton_type baton_type
 Baton.
typedef V element_type
 Type of variable.
typedef ReadWriteLock::baton_type baton_type
 Baton.
typedef V element_type
 Type of variable.

Public Member Functions

 ReadWriteLockVariable (baton_type Baton, int Timeout, V &Variable, const char *Filename, int Linenum)
 Constructor.
 ReadWriteLockVariable (baton_type Baton, int Timeout, const V &Variable, const char *Filename, int Linenum)
 Constructor.
 ReadWriteLockVariable (const ReadWriteLockVariable &Source, const char *Filename, int Linenum)
 Copy constructor.
const V & Var () const
 Read only access to the variable.
V & Var ()
 Read/Write access to the variable.
 ReadWriteLockVariable (baton_type Baton, int Timeout, V &Variable, const char *Filename, int Linenum)
 Constructor.
 ReadWriteLockVariable (baton_type Baton, int Timeout, const V &Variable, const char *Filename, int Linenum)
 Constructor.
 ReadWriteLockVariable (const ReadWriteLockVariable &Source, const char *Filename, int Linenum)
 Copy constructor.
const V & Var () const
 Read only access to the variable.
V & Var ()
 Read/Write access to the variable.

Detailed Description

template<ReadWriteLock::mode_type T, typename V>
class LDASTools::AL::ReadWriteLockVariable< T, V >

Implements read/write lock symantics for a variable.

This class allows for manipulation of variables to be thread safe.

std::string v;
lock( baton, 0, v);
try
{
if ( lock.Var( ).size( ) == 0 )
{
lock.Var( ).assign( "New value" );
}
}
catch( )
{
}
ReadWriteLockVariable(baton_type Baton, int Timeout, V &Variable, const char *Filename, int Linenum)
Constructor.
Definition ReadWriteLock.hh:521
Manager of the read/write lock resource.
Definition ReadWriteLock.hh:169

Member Typedef Documentation

◆ baton_type [1/2]

Baton.

The resource used to manage resouce access.

◆ baton_type [2/2]

Baton.

The resource used to manage resouce access.

◆ element_type [1/2]

template<ReadWriteLock::mode_type T, typename V>
typedef V LDASTools::AL::ReadWriteLockVariable< T, V >::element_type

Type of variable.

The type of variable being managed.

◆ element_type [2/2]

template<ReadWriteLock::mode_type T, typename V>
typedef V LDASTools::AL::ReadWriteLockVariable< T, V >::element_type

Type of variable.

The type of variable being managed.

Constructor & Destructor Documentation

◆ ReadWriteLockVariable() [1/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( baton_type Baton,
int Timeout,
V & Variable,
const char * Filename,
int Linenum )
inline

Constructor.

Parameters
[in]BatonBaton controlling access to the resource.
[in]TimeoutMaximum length of time to wait on obtaining the lock.
[in]VariableVariable being managed by the class.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

◆ ReadWriteLockVariable() [2/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( baton_type Baton,
int Timeout,
const V & Variable,
const char * Filename,
int Linenum )
inline

Constructor.

Parameters
[in]BatonBaton controlling access to the resource.
[in]TimeoutMaximum length of time to wait on obtaining the lock.
[in]VariableVariable being managed by the class.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

◆ ReadWriteLockVariable() [3/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( const ReadWriteLockVariable< T, V > & Source,
const char * Filename,
int Linenum )
inline

Copy constructor.

Parameters
[in]SourceSource from which to initialize.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

◆ ReadWriteLockVariable() [4/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( baton_type Baton,
int Timeout,
V & Variable,
const char * Filename,
int Linenum )

Constructor.

Parameters
[in]BatonBaton controlling access to the resource.
[in]TimeoutMaximum length of time to wait on obtaining the lock.
[in]VariableVariable being managed by the class.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

◆ ReadWriteLockVariable() [5/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( baton_type Baton,
int Timeout,
const V & Variable,
const char * Filename,
int Linenum )

Constructor.

Parameters
[in]BatonBaton controlling access to the resource.
[in]TimeoutMaximum length of time to wait on obtaining the lock.
[in]VariableVariable being managed by the class.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

◆ ReadWriteLockVariable() [6/6]

template<ReadWriteLock::mode_type T, typename V>
LDASTools::AL::ReadWriteLockVariable< T, V >::ReadWriteLockVariable ( const ReadWriteLockVariable< T, V > & Source,
const char * Filename,
int Linenum )

Copy constructor.

Parameters
[in]SourceSource from which to initialize.
[in]FilenameThe filename from where the call was made.
[in]LinenumThe line number from where the call was made.

The documentation for this class was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/build/include/ldastoolsal/ReadWriteLock.hh
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/src/ReadWriteLock.hh