Ptex
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PtexHashMap< Key, Value > Class Template Reference

#include <PtexHashMap.h>

Classes

class  Entry
 

Public Member Functions

 PtexHashMap ()
 
 ~PtexHashMap ()
 
void clear ()
 
uint32_t size () const
 
Value get (Key &key)
 
Value tryInsert (Key &key, Value value, size_t &newMemUsed)
 
template<typename Fn >
void foreach (Fn &fn)
 

Private Member Functions

 PtexHashMap (const PtexHashMap &)
 
void operator= (const PtexHashMap &)
 
void initContents ()
 
void deleteContents ()
 
EntrygetEntries ()
 
EntrylockEntries ()
 
void unlockEntries (Entry *entries)
 
EntrylockEntriesAndGrowIfNeeded (size_t &newMemUsed)
 
Entrygrow (Entry *oldEntries, size_t &newMemUsed)
 

Private Attributes

Entry *volatile _entries
 
uint32_t volatile _numEntries
 
uint32_t volatile _size
 
std::vector< Entry * > _oldEntries
 

Detailed Description

template<typename Key, typename Value>
class PtexHashMap< Key, Value >

Definition at line 151 of file PtexHashMap.h.

Constructor & Destructor Documentation

◆ PtexHashMap() [1/2]

template<typename Key , typename Value >
PtexHashMap< Key, Value >::PtexHashMap ( const PtexHashMap< Key, Value > &  )
private

◆ PtexHashMap() [2/2]

template<typename Key , typename Value >
PtexHashMap< Key, Value >::PtexHashMap ( )
inline

Definition at line 185 of file PtexHashMap.h.

◆ ~PtexHashMap()

template<typename Key , typename Value >
PtexHashMap< Key, Value >::~PtexHashMap ( )
inline

Definition at line 190 of file PtexHashMap.h.

Member Function Documentation

◆ clear()

template<typename Key , typename Value >
void PtexHashMap< Key, Value >::clear ( )
inline

Definition at line 195 of file PtexHashMap.h.

Referenced by PtexReader::prune().

◆ deleteContents()

template<typename Key , typename Value >
void PtexHashMap< Key, Value >::deleteContents ( )
inlineprivate

◆ foreach()

template<typename Key , typename Value >
template<typename Fn >
void PtexHashMap< Key, Value >::foreach ( Fn &  fn)
inline

Definition at line 252 of file PtexHashMap.h.

Referenced by PtexReaderCache::purgeAll().

◆ get()

template<typename Key , typename Value >
Value PtexHashMap< Key, Value >::get ( Key &  key)
inline

◆ getEntries()

template<typename Key , typename Value >
Entry* PtexHashMap< Key, Value >::getEntries ( )
inlineprivate

◆ grow()

template<typename Key , typename Value >
Entry* PtexHashMap< Key, Value >::grow ( Entry oldEntries,
size_t &  newMemUsed 
)
inlineprivate

◆ initContents()

template<typename Key , typename Value >
void PtexHashMap< Key, Value >::initContents ( )
inlineprivate

◆ lockEntries()

template<typename Key , typename Value >
Entry* PtexHashMap< Key, Value >::lockEntries ( )
inlineprivate

◆ lockEntriesAndGrowIfNeeded()

template<typename Key , typename Value >
Entry* PtexHashMap< Key, Value >::lockEntriesAndGrowIfNeeded ( size_t &  newMemUsed)
inlineprivate

◆ operator=()

template<typename Key , typename Value >
void PtexHashMap< Key, Value >::operator= ( const PtexHashMap< Key, Value > &  )
private

◆ size()

template<typename Key , typename Value >
uint32_t PtexHashMap< Key, Value >::size ( ) const
inline

Definition at line 201 of file PtexHashMap.h.

Referenced by PtexReaderCache::getStats().

◆ tryInsert()

template<typename Key , typename Value >
Value PtexHashMap< Key, Value >::tryInsert ( Key &  key,
Value  value,
size_t &  newMemUsed 
)
inline

Definition at line 224 of file PtexHashMap.h.

Referenced by PtexReaderCache::get(), and PtexReader::getData().

◆ unlockEntries()

template<typename Key , typename Value >
void PtexHashMap< Key, Value >::unlockEntries ( Entry entries)
inlineprivate

Member Data Documentation

◆ _entries

template<typename Key , typename Value >
Entry* volatile PtexHashMap< Key, Value >::_entries
private

◆ _numEntries

template<typename Key , typename Value >
uint32_t volatile PtexHashMap< Key, Value >::_numEntries
private

◆ _oldEntries

template<typename Key , typename Value >
std::vector<Entry*> PtexHashMap< Key, Value >::_oldEntries
private

◆ _size

template<typename Key , typename Value >
uint32_t volatile PtexHashMap< Key, Value >::_size
private

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