CICache Class Reference

#include <cache.h>

Inherits List< CICacheItem >.

Collaboration diagram for CICache:

Collaboration graph
[legend]

Public Member Functions

 CICache (Preferences *preferences, ArrayList< PluginServer * > *plugindb)
 ~CICache ()
Filecheck_out (Asset *asset, EDL *edl, int block=1)
int check_in (Asset *asset)
int delete_entry (Asset *asset)
int delete_entry (char *path)
void remove_all ()
int get_oldest ()
int64_t get_memory_usage (int use_lock)
int delete_oldest ()
int age ()
int dump ()

Data Fields

ArrayList< PluginServer * > * plugindb

Private Member Functions

int lock_all ()
int unlock_all ()

Private Attributes

Mutextotal_lock
Conditioncheck_out_lock
EDLedl
Preferencespreferences

Friends

class CICacheItem

Detailed Description

Definition at line 45 of file cache.h.


Constructor & Destructor Documentation

CICache::CICache ( Preferences preferences,
ArrayList< PluginServer * > *  plugindb 
)

Definition at line 17 of file cache.C.

References check_out_lock, and total_lock.

CICache::~CICache (  ) 

Definition at line 27 of file cache.C.

References check_out_lock, Garbage::delete_object(), List< CICacheItem >::last, List< CICacheItem >::remove_pointer(), and total_lock.

Here is the call graph for this function:


Member Function Documentation

File * CICache::check_out ( Asset asset,
EDL edl,
int  block = 1 
)

int CICache::check_in ( Asset asset  ) 

int CICache::delete_entry ( Asset asset  ) 

int CICache::delete_entry ( char *  path  ) 

Definition at line 157 of file cache.C.

References Garbage::delete_object(), List< CICacheItem >::first, Mutex::lock(), NEXT, List< CICacheItem >::remove_pointer(), total_lock, and Mutex::unlock().

Here is the call graph for this function:

void CICache::remove_all (  ) 

int CICache::get_oldest (  ) 

Definition at line 240 of file cache.C.

References CICacheItem::age, List< CICacheItem >::last, Mutex::lock(), oldest, PREVIOUS, total_lock, and Mutex::unlock().

Referenced by MWindow::age_caches().

Here is the call graph for this function:

int64_t CICache::get_memory_usage ( int  use_lock  ) 

Definition at line 226 of file cache.C.

References CICacheItem::file, List< CICacheItem >::first, File::get_memory_usage(), Mutex::lock(), NEXT, total_lock, and Mutex::unlock().

Referenced by age(), MWindow::age_caches(), and dump().

Here is the call graph for this function:

int CICache::delete_oldest (  ) 

int CICache::age (  ) 

Definition at line 201 of file cache.C.

References Preferences::cache_size, delete_oldest(), get_memory_usage(), and preferences.

Referenced by check_in(), VModule::import_frame(), and AModule::render().

Here is the call graph for this function:

int CICache::dump (  ) 

Definition at line 306 of file cache.C.

References CICacheItem::age, CICacheItem::asset, List< CICacheItem >::first, get_memory_usage(), Mutex::lock(), NEXT, Asset::path, total_lock, and Mutex::unlock().

Here is the call graph for this function:

int CICache::lock_all (  )  [private]

int CICache::unlock_all (  )  [private]


Friends And Related Function Documentation

friend class CICacheItem [friend]

Definition at line 52 of file cache.h.

Referenced by check_out().


Field Documentation

Definition at line 92 of file cache.h.

Definition at line 104 of file cache.h.

Referenced by check_in(), check_out(), CICache(), and ~CICache().

EDL* CICache::edl [private]

Definition at line 106 of file cache.h.

Definition at line 107 of file cache.h.

Referenced by age(), and CICacheItem::CICacheItem().


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

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