NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
limited_resource_map< Key, Value, Resource, Less > Class Template Reference

Search Toolkit Book for limited_resource_map

#include <sra/readers/sra/limited_resource_map.hpp>

+ Inheritance diagram for limited_resource_map< Key, Value, Resource, Less >:
+ Collaboration diagram for limited_resource_map< Key, Value, Resource, Less >:

Classes

struct  SLess
 
struct  SNode
 

Public Types

typedef Key key_type
 
typedef Value mapped_type
 
typedef pair< const key_type, mapped_typevalue_type
 
typedef Resource resource_type
 

Public Member Functions

 limited_resource_map (const resource_type &resource_limit)
 
resource_type get_resource_limit (void) const
 
void set_resource_limit (resource_type resource_limit)
 
resource_type resource_used () const
 
bool empty (void) const
 
size_t size (void) const
 
void clear (void)
 
mapped_type get (const key_type &key)
 
void put (const key_type &key, const mapped_type &value, const resource_type &resource_used)
 
void erase (const key_type &key)
 

Protected Member Functions

SNodex_GetNode (TMapIterator iter)
 
void x_GC (void)
 
void x_Erase (TMapIterator iter)
 
void x_MarkAdded (TMapIterator iter)
 
void x_MarkUsed (TMapIterator iter)
 

Private Types

typedef Less TLess
 
typedef set< SNode, SLessTMap
 
typedef TMap::iterator TMapIterator
 
typedef TMap::const_iterator TMapConstIterator
 
typedef list< TMapIteratorTRemoveList
 
typedef TRemoveList::iterator TRemoveListIterator
 

Private Attributes

TMap m_Map
 
resource_type m_ResourceLimit
 
resource_type m_ResourceUsed
 
TRemoveList m_RemoveList
 

Detailed Description

template<class Key, class Value, class Resource, class Less = less<Key>>
class limited_resource_map< Key, Value, Resource, Less >

Definition at line 47 of file limited_resource_map.hpp.

Member Typedef Documentation

◆ key_type

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef Key limited_resource_map< Key, Value, Resource, Less >::key_type

Definition at line 50 of file limited_resource_map.hpp.

◆ mapped_type

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef Value limited_resource_map< Key, Value, Resource, Less >::mapped_type

Definition at line 51 of file limited_resource_map.hpp.

◆ resource_type

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef Resource limited_resource_map< Key, Value, Resource, Less >::resource_type

Definition at line 53 of file limited_resource_map.hpp.

◆ TLess

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef Less limited_resource_map< Key, Value, Resource, Less >::TLess
private

Definition at line 58 of file limited_resource_map.hpp.

◆ TMap

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef set<SNode, SLess> limited_resource_map< Key, Value, Resource, Less >::TMap
private

Definition at line 59 of file limited_resource_map.hpp.

◆ TMapConstIterator

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef TMap::const_iterator limited_resource_map< Key, Value, Resource, Less >::TMapConstIterator
private

Definition at line 61 of file limited_resource_map.hpp.

◆ TMapIterator

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef TMap::iterator limited_resource_map< Key, Value, Resource, Less >::TMapIterator
private

Definition at line 60 of file limited_resource_map.hpp.

◆ TRemoveList

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef list<TMapIterator> limited_resource_map< Key, Value, Resource, Less >::TRemoveList
private

Definition at line 62 of file limited_resource_map.hpp.

◆ TRemoveListIterator

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef TRemoveList::iterator limited_resource_map< Key, Value, Resource, Less >::TRemoveListIterator
private

Definition at line 63 of file limited_resource_map.hpp.

◆ value_type

template<class Key , class Value , class Resource , class Less = less<Key>>
typedef pair<const key_type, mapped_type> limited_resource_map< Key, Value, Resource, Less >::value_type

Definition at line 52 of file limited_resource_map.hpp.

Constructor & Destructor Documentation

◆ limited_resource_map()

template<class Key , class Value , class Resource , class Less = less<Key>>
limited_resource_map< Key, Value, Resource, Less >::limited_resource_map ( const resource_type resource_limit)
inlineexplicit

Definition at line 96 of file limited_resource_map.hpp.

Member Function Documentation

◆ clear()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::clear ( void  )
inline

Definition at line 119 of file limited_resource_map.hpp.

◆ empty()

template<class Key , class Value , class Resource , class Less = less<Key>>
bool limited_resource_map< Key, Value, Resource, Less >::empty ( void  ) const
inline

Definition at line 113 of file limited_resource_map.hpp.

◆ erase()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::erase ( const key_type key)
inline

Definition at line 148 of file limited_resource_map.hpp.

◆ get()

template<class Key , class Value , class Resource , class Less = less<Key>>
mapped_type limited_resource_map< Key, Value, Resource, Less >::get ( const key_type key)
inline

Definition at line 125 of file limited_resource_map.hpp.

Referenced by CWGSDb_Impl::GetAmbiguityInfo().

◆ get_resource_limit()

template<class Key , class Value , class Resource , class Less = less<Key>>
resource_type limited_resource_map< Key, Value, Resource, Less >::get_resource_limit ( void  ) const
inline

◆ put()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::put ( const key_type key,
const mapped_type value,
const resource_type resource_used 
)
inline

Definition at line 135 of file limited_resource_map.hpp.

Referenced by CWGSDb_Impl::PutAmbiguityInfo().

◆ resource_used()

template<class Key , class Value , class Resource , class Less = less<Key>>
resource_type limited_resource_map< Key, Value, Resource, Less >::resource_used ( ) const
inline

◆ set_resource_limit()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::set_resource_limit ( resource_type  resource_limit)
inline

Definition at line 105 of file limited_resource_map.hpp.

◆ size()

template<class Key , class Value , class Resource , class Less = less<Key>>
size_t limited_resource_map< Key, Value, Resource, Less >::size ( void  ) const
inline

Definition at line 116 of file limited_resource_map.hpp.

◆ x_Erase()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::x_Erase ( TMapIterator  iter)
inlineprotected

◆ x_GC()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::x_GC ( void  )
inlineprotected

◆ x_GetNode()

template<class Key , class Value , class Resource , class Less = less<Key>>
SNode& limited_resource_map< Key, Value, Resource, Less >::x_GetNode ( TMapIterator  iter)
inlineprotected

◆ x_MarkAdded()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::x_MarkAdded ( TMapIterator  iter)
inlineprotected

◆ x_MarkUsed()

template<class Key , class Value , class Resource , class Less = less<Key>>
void limited_resource_map< Key, Value, Resource, Less >::x_MarkUsed ( TMapIterator  iter)
inlineprotected

Member Data Documentation

◆ m_Map

template<class Key , class Value , class Resource , class Less = less<Key>>
TMap limited_resource_map< Key, Value, Resource, Less >::m_Map
private

◆ m_RemoveList

template<class Key , class Value , class Resource , class Less = less<Key>>
TRemoveList limited_resource_map< Key, Value, Resource, Less >::m_RemoveList
private

◆ m_ResourceLimit

template<class Key , class Value , class Resource , class Less = less<Key>>
resource_type limited_resource_map< Key, Value, Resource, Less >::m_ResourceLimit
private

◆ m_ResourceUsed

template<class Key , class Value , class Resource , class Less = less<Key>>
resource_type limited_resource_map< Key, Value, Resource, Less >::m_ResourceUsed
private

The documentation for this class was generated from the following file:
Modified on Wed Apr 17 13:08:37 2024 by modify_doxy.py rev. 669887