CacheBase Class Reference

#include <cachebase.h>

Inherits List< CacheItemBase >.

Inherited by FrameCache, and WaveCache.

Collaboration diagram for CacheBase:

Collaboration graph
[legend]

Public Member Functions

 CacheBase ()
virtual ~CacheBase ()
int get_age ()
void remove_all ()
void remove_asset (Asset *asset)
void put_item (CacheItemBase *item)
CacheItemBaseget_item (int64_t position)
void unlock ()
int get_oldest ()
int delete_oldest ()
int64_t get_memory_usage ()

Data Fields

Mutexlock
CacheItemBasecurrent_item

Detailed Description

Definition at line 40 of file cachebase.h.


Constructor & Destructor Documentation

CacheBase::CacheBase (  ) 

Definition at line 37 of file cachebase.C.

References current_item, and lock.

CacheBase::~CacheBase (  )  [virtual]

Definition at line 44 of file cachebase.C.

References lock.


Member Function Documentation

int CacheBase::get_age (  ) 

Definition at line 51 of file cachebase.C.

References EDL::next_id().

Referenced by FrameCache::get_frame(), FrameCache::get_frame_ptr(), WaveCache::get_wave(), and FrameCache::put_frame().

Here is the call graph for this function:

void CacheBase::remove_all (  ) 

Definition at line 64 of file cachebase.C.

References current_item, List< CacheItemBase >::last, Mutex::lock(), lock, List< CacheItemBase >::total(), and Mutex::unlock().

Referenced by MWindow::reset_caches().

Here is the call graph for this function:

void CacheBase::remove_asset ( Asset asset  ) 

void CacheBase::put_item ( CacheItemBase item  ) 

CacheItemBase * CacheBase::get_item ( int64_t  position  ) 

void CacheBase::unlock (  ) 

Definition at line 59 of file cachebase.C.

References lock, and Mutex::unlock().

Referenced by ResourceThread::do_audio(), ResourceThread::do_video(), ResourcePixmap::draw_audio_source(), and ResourcePixmap::draw_video_resource().

Here is the call graph for this function:

int CacheBase::get_oldest (  ) 

Definition at line 100 of file cachebase.C.

References List< CacheItemBase >::first, Mutex::lock(), lock, NEXT, oldest, and Mutex::unlock().

Referenced by MWindow::age_caches().

Here is the call graph for this function:

int CacheBase::delete_oldest (  ) 

Definition at line 115 of file cachebase.C.

References current_item, List< CacheItemBase >::first, Mutex::lock(), lock, NEXT, oldest, and Mutex::unlock().

Referenced by MWindow::age_caches(), and File::purge_cache().

Here is the call graph for this function:

int64_t CacheBase::get_memory_usage (  ) 

Definition at line 146 of file cachebase.C.

References List< CacheItemBase >::first, Mutex::lock(), lock, NEXT, and Mutex::unlock().

Referenced by MWindow::age_caches(), and File::get_memory_usage().

Here is the call graph for this function:


Field Documentation

Definition at line 75 of file cachebase.h.

Referenced by CacheBase(), delete_oldest(), get_item(), put_item(), remove_all(), and remove_asset().


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

Generated on Mon Apr 28 14:17:18 2008 for Cinelerra by  doxygen 1.5.5