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

Base Container Node Class. More...

#include <Container.h>

Inheritance diagram for ContainerNode< s >:

Protected Member Functions

 ContainerNode (C *root=nullptr)
 
 ContainerNode (ContainerNode const &)=delete
 
 ~ContainerNode ()
 
virtual bool check () const =0
 
void operator= (ContainerNode const &)=delete
 
unsigned readLock (bool upgradable) const
 
unsigned readLock (bool upgradable) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
void readUnlock (unsigned code) const
 
void readUnlock (unsigned save) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
void setRoot (C *root)
 Set our Container.
 
unsigned writeLock (bool upgrade) const
 
unsigned writeLock (bool upgrade) const
 Under ContainerNoSafety application handles all the needed restrictions.
 
void writeUnlock (unsigned code) const
 
void writeUnlock (unsigned save) const
 Under ContainerNoSafety application handles all the needed restrictions.
 

Private Types

typedef Container< s > C
 The type of the Container that we are part of.
 

Detailed Description

template<ContainerThreadSafety s>
class ContainerNode< s >

Base Container Node Class.

Used to provide the Thread Safety Primitives for a Container Node

Template Parameters
sThe ContainerThreadSafety value to define the thread safety model of the Container Note, the Nodes must match the safety level of the container.

Member Typedef Documentation

◆ C

template<ContainerThreadSafety s>
Container<s> ContainerNode< s >::C
private

The type of the Container that we are part of.

Constructor & Destructor Documentation

◆ ContainerNode() [1/2]

template<ContainerThreadSafety s>
ContainerNode< s >::ContainerNode ( C * root = nullptr)
inlineprotected

References ContainerNode< s >::setRoot().

Here is the call graph for this function:

◆ ~ContainerNode()

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

◆ ContainerNode() [2/2]

template<ContainerThreadSafety s>
ContainerNode< s >::ContainerNode ( ContainerNode< s > const & )
protecteddelete

Member Function Documentation

◆ check()

◆ operator=()

template<ContainerThreadSafety s>
void ContainerNode< s >::operator= ( ContainerNode< s > const & )
protecteddelete

◆ readLock() [1/2]

◆ readLock() [2/2]

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

Under ContainerNoSafety application handles all the needed restrictions.

◆ readUnlock() [1/2]

◆ readUnlock() [2/2]

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

Under ContainerNoSafety application handles all the needed restrictions.

◆ setRoot()

template<ContainerThreadSafety s>
void ContainerNode< s >::setRoot ( C * root)
inlineprotected

Set our Container.

Used to allow to Node to record what Container it is in. Used only if safety method need resources from the Container, like a Mutex

If an operation changes the root of a node, then it needs to save the original root to exit the critical section on that container that it entered before the operation.

Referenced by ContainerNode< s >::ContainerNode(), DListInNode< R, N, s, n >::setRoot(), ListInNode< R, N, s, n >::setRoot(), and TreeInNode< R, N, K, s, n >::setRoot().

Here is the caller graph for this function:

◆ writeLock() [1/2]

◆ writeLock() [2/2]

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

Under ContainerNoSafety application handles all the needed restrictions.

◆ writeUnlock() [1/2]

◆ writeUnlock() [2/2]

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

Under ContainerNoSafety application handles all the needed restrictions.


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