Intrusive Containers
Loading...
Searching...
No Matches
Container< s > Class Template Referenceabstract

Base Container Class. More...

#include <Container.h>

Inheritance diagram for Container< s >:

Protected Member Functions

 Container ()
 
 ~Container ()
 
virtual bool check () const =0
 
unsigned readLock (bool upgradable) const
 Obtain a read lock.
 
unsigned readLock (bool upgradable) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
unsigned readLock (bool upgradable) const
 
unsigned readLock (bool upgradable) const
 
unsigned readLock (bool upgradable) const
 
void readUnlock (unsigned code) const
 Release the read lock that was held.
 
void readUnlock (unsigned save) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
void readUnlock (unsigned save) const
 
void readUnlock (unsigned save) const
 
void readUnlock (unsigned save) const
 
unsigned writeLock (bool upgrade) const
 Obtain a write lock.
 
unsigned writeLock (bool upgrade) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
unsigned writeLock (bool upgrade) const
 
unsigned writeLock (bool upgrade) const
 
unsigned writeLock (bool upgrade) const
 
void writeUnlock (unsigned code) const
 Release write lock.
 
void writeUnlock (unsigned save) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
void writeUnlock (unsigned save) const
 
void writeUnlock (unsigned save) const
 
void writeUnlock (unsigned save) const
 

Private Member Functions

 Container (Container const &)=delete
 We are not copyable.
 
void operator= (Container const &)=delete
 We are not assignable;.
 

Friends

class ContainerNode< s >
 

Detailed Description

template<ContainerThreadSafety s>
class Container< s >

Base Container Class.

Provides the base locking ability for the container.

Template Parameters
sThe ContainerThreadSafety value to define the thread safety model of the Container
Note
Most of the testing of this library has been done with ContainerNoSafety

Constructor & Destructor Documentation

◆ Container() [1/2]

template<ContainerThreadSafety s>
Container< s >::Container ( )
inlineprotected

◆ ~Container()

template<ContainerThreadSafety s>
Container< s >::~Container ( )
inlineprotected

◆ Container() [2/2]

template<ContainerThreadSafety s>
Container< s >::Container ( Container< s > const & )
privatedelete

We are not copyable.

Member Function Documentation

◆ check()

◆ operator=()

template<ContainerThreadSafety s>
void Container< s >::operator= ( Container< s > const & )
privatedelete

We are not assignable;.

◆ readLock() [1/5]

template<ContainerThreadSafety s>
unsigned Container< s >::readLock ( bool upgradable) const
protected

Obtain a read lock.

While a read lock is held on a container, the container can not be changed.

Read locks will not be given while a write lock is held.

Parameters
upgradableIf called with upgradeable, then the lock can be upgradable to a write lock, and no other upgradable read lock will be granted. (Note, the code returned will need to encode the upgradable bit)
Returns
code to give to readUnlock()

Referenced by AATreeInRoot< R, N, K, s, n >::readLock(), BalTreeInRoot< R, N, K, s, n >::readLock(), DListInRoot< R, N, s, n >::readLock(), ListInRoot< R, N, s, n >::readLock(), ManyManyNode< R, N, s, n, L >::readLock(), ManyManyRoot< R, N, s, n, L >::readLock(), SortDListInNode< R, N, s, n >::readLock(), SortDListInRoot< R, N, s, n >::readLock(), SortListInNode< R, N, s, n >::readLock(), SortListInRoot< R, N, s, n >::readLock(), and TreeInRoot< R, N, K, s, n >::readLock().

Here is the caller graph for this function:

◆ readLock() [2/5]

unsigned Container< ContainerNoSafety >::readLock ( bool upgradable) const
inlineprotected

Under ContainerNoSafety application handles all the needed restrictions.

◆ readLock() [3/5]

unsigned Container< ContainerTaskOnly >::readLock ( bool upgradable) const
inlineprotected

◆ readLock() [4/5]

unsigned Container< ContainerTaskSafe >::readLock ( bool upgradable) const
inlineprotected

◆ readLock() [5/5]

unsigned Container< ContainerISRSafe >::readLock ( bool upgradable) const
inlineprotected

◆ readUnlock() [1/5]

◆ readUnlock() [2/5]

void Container< ContainerNoSafety >::readUnlock ( unsigned save) const
inlineprotected

Under ContainerNoSafety application handles all the needed restrictions.

◆ readUnlock() [3/5]

void Container< ContainerTaskOnly >::readUnlock ( unsigned save) const
inlineprotected

◆ readUnlock() [4/5]

void Container< ContainerTaskSafe >::readUnlock ( unsigned save) const
inlineprotected

◆ readUnlock() [5/5]

void Container< ContainerISRSafe >::readUnlock ( unsigned save) const
inlineprotected

◆ writeLock() [1/5]

template<ContainerThreadSafety s>
unsigned Container< s >::writeLock ( bool upgrade) const
protected

◆ writeLock() [2/5]

unsigned Container< ContainerNoSafety >::writeLock ( bool upgrade) const
inlineprotected

Under ContainerNoSafety application handles all the needed restrictions.

◆ writeLock() [3/5]

unsigned Container< ContainerTaskOnly >::writeLock ( bool upgrade) const
inlineprotected

◆ writeLock() [4/5]

unsigned Container< ContainerTaskSafe >::writeLock ( bool upgrade) const
inlineprotected

◆ writeLock() [5/5]

unsigned Container< ContainerISRSafe >::writeLock ( bool upgrade) const
inlineprotected

◆ writeUnlock() [1/5]

◆ writeUnlock() [2/5]

void Container< ContainerNoSafety >::writeUnlock ( unsigned save) const
inlineprotected

Under ContainerNoSafety application handles all the needed restrictions.

◆ writeUnlock() [3/5]

void Container< ContainerTaskOnly >::writeUnlock ( unsigned save) const
inlineprotected

◆ writeUnlock() [4/5]

void Container< ContainerTaskSafe >::writeUnlock ( unsigned save) const
inlineprotected

◆ writeUnlock() [5/5]

void Container< ContainerISRSafe >::writeUnlock ( unsigned save) const
inlineprotected

Friends And Related Symbol Documentation

◆ ContainerNode< s >

template<ContainerThreadSafety s>
friend class ContainerNode< s >
friend

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