NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
ncbi::TAtomicStack< _T > Class Template Reference

Search Toolkit Book for ncbi::TAtomicStack

#include <objtools/writers/atomics.hpp>

+ Inheritance diagram for ncbi::TAtomicStack< _T >:
+ Collaboration diagram for ncbi::TAtomicStack< _T >:

Classes

struct  TNode
 

Public Types

using value_type = _T
 
using pointer_type = TNode *
 
using atomic_pointer = std::atomic< pointer_type >
 

Public Member Functions

 TAtomicStack ()=default
 
pointer_type pop_front ()
 
void push_front (pointer_type ptr)
 
size_t size () const
 

Private Attributes

std::atomic< size_t > m_size = 0
 
atomic_pointer m_head = nullptr
 

Detailed Description

template<typename _T>
class ncbi::TAtomicStack< _T >

Definition at line 43 of file atomics.hpp.

Member Typedef Documentation

◆ atomic_pointer

template<typename _T >
using ncbi::TAtomicStack< _T >::atomic_pointer = std::atomic<pointer_type>

Definition at line 50 of file atomics.hpp.

◆ pointer_type

template<typename _T >
using ncbi::TAtomicStack< _T >::pointer_type = TNode*

Definition at line 49 of file atomics.hpp.

◆ value_type

template<typename _T >
using ncbi::TAtomicStack< _T >::value_type = _T

Definition at line 46 of file atomics.hpp.

Constructor & Destructor Documentation

◆ TAtomicStack()

template<typename _T >
ncbi::TAtomicStack< _T >::TAtomicStack ( )
default

Member Function Documentation

◆ pop_front()

template<typename _T >
pointer_type ncbi::TAtomicStack< _T >::pop_front ( )
inline

◆ push_front()

template<typename _T >
void ncbi::TAtomicStack< _T >::push_front ( pointer_type  ptr)
inline

Definition at line 90 of file atomics.hpp.

Referenced by ncbi::TResourcePool< _T >::Deallocate().

◆ size()

template<typename _T >
size_t ncbi::TAtomicStack< _T >::size ( void  ) const
inline

Definition at line 101 of file atomics.hpp.

Referenced by ncbi::TResourcePool< _T >::Deallocate().

Member Data Documentation

◆ m_head

template<typename _T >
atomic_pointer ncbi::TAtomicStack< _T >::m_head = nullptr
private

◆ m_size

template<typename _T >
std::atomic<size_t> ncbi::TAtomicStack< _T >::m_size = 0
private

The documentation for this class was generated from the following file:
Modified on Fri Feb 23 11:50:19 2024 by modify_doxy.py rev. 669887