Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bslmt::ReaderWriterLockAssert_Imp Struct Reference

#include <bslmt_readerwriterlockassert.h>

List of all members.

Static Public Member Functions

template<class RW_LOCK >
static void assertIsLocked (RW_LOCK *rwLock, const char *text, const char *file, int line, const char *level)
template<class RW_LOCK >
static void assertIsLockedRead (RW_LOCK *rwLock, const char *text, const char *file, int line, const char *level)
template<class RW_LOCK >
static void assertIsLockedWrite (RW_LOCK *rwLock, const char *text, const char *file, int line, const char *level)
static bool isValidLevel (const char *level)

Detailed Description

This struct provides a (component private) namespace for implementation functions of the assert macros defined in this component. This class should not be used directly in client code.

See Component bslmt_readerwriterlockassert


Member Function Documentation

template<class RW_LOCK >
static void bslmt::ReaderWriterLockAssert_Imp::assertIsLocked ( RW_LOCK *  rwLock,
const char *  text,
const char *  file,
int  line,
const char *  level 
) [static]

If the specified rwLock is not locked (i.e., neither a read lock or a write lock), call bsls::Assert::invokeHandler with the specified text, file, line, and level, where text is text describing the assertion being performed, file is the name of the source file that called the macro, line is the line number in the file where the macro was called, and level is one of the bslsAssert::k_LEVEL_* string literals. This function is intended to implement BSLMT_READERWRITERLOCKASSERT_IS_LOCKED, BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_SAFE, and BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_OPT and should not otherwise be called directly.

template<class RW_LOCK >
static void bslmt::ReaderWriterLockAssert_Imp::assertIsLockedRead ( RW_LOCK *  rwLock,
const char *  text,
const char *  file,
int  line,
const char *  level 
) [static]

If the specified rwLock is not locked for reading, call bsls::Assert::invokeHandler with the specified text, file, line, and level, where text is text describing the assertion being performed, file is the name of the source file that called the macro, line is the line number in the file where the macro was called, and level is one of the bslsAssert::k_LEVEL_* string literals. This function is intended to implement BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ, BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_SAFE, and BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_OPT and should not otherwise be called directly.

template<class RW_LOCK >
static void bslmt::ReaderWriterLockAssert_Imp::assertIsLockedWrite ( RW_LOCK *  rwLock,
const char *  text,
const char *  file,
int  line,
const char *  level 
) [static]

If the specified rwLock is not locked for writing, call bsls::Assert::invokeHandler with the specified text, file, line, and level, where text is text describing the assertion being performed, file is the name of the source file that called the macro, line is the line number in the file where the macro was called, and level is one of the bsls::Assert::k_LEVEL_* string literals. This function is intended to implement BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ, BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_SAFE, and BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_OPT and should not otherwise be called directly.

static bool bslmt::ReaderWriterLockAssert_Imp::isValidLevel ( const char *  level  )  [static]

Return true if the specified level compares equal to one of the bsls::Assert::k_LEVEL_* string literals, and false otherwise.


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