58class CacheImpl :
public AbcA::ReadArraySampleCache
68 virtual AbcA::ReadArraySampleID
69 find(
const AbcA::ArraySample::Key &iKey );
71 virtual AbcA::ReadArraySampleID
72 store(
const AbcA::ArraySample::Key &iKey,
73 AbcA::ArraySamplePtr iBytes );
83 Record( AbcA::ArraySamplePtr iGivenPtr,
84 AbcA::ArraySamplePtr iDeleterPtr )
86 weakDeleter( iDeleterPtr )
88 ABCA_ASSERT( iGivenPtr && iDeleterPtr,
89 "Cannot record null records in CacheImpl" );
90 ABCA_ASSERT( iGivenPtr.get() == iDeleterPtr.get(),
91 "Given Ptr must match contents of DeleterPtr" );
95 AbcA::ArraySamplePtr given;
105 ArraySampleWeakPtr weakDeleter;
113 AbcA::ArraySamplePtr lock(
const AbcA::ArraySample::Key &iKey,
114 AbcA::ArraySamplePtr iSamp );
115 void unlock(
const AbcA::ArraySample::Key &iKey );
121 friend class CacheImpl;
122 RecordDeleter(
const AbcA::ArraySample::Key &iKey,
123 CacheImplPtr iCache )
128 void operator()( AbcA::ArraySample *iPtr )
130 CacheImplPtr cachePtr = m_cache.lock();
133 cachePtr->unlock( m_key );
138 AbcA::ArraySample::Key m_key;
139 CacheImplWeakPtr m_cache;
143 typedef AbcA::UnorderedMapUtil<Record>::umap_type Map;
144 typedef AbcA::UnorderedMapUtil<AbcA::ArraySamplePtr>::umap_type
148 UnlockedMap m_unlockedMap;