Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

CICache Class Reference

#include <cache.h>

List of all members.

Public Member Functions

 CICache (EDL *edl, Preferences *preferences, ArrayList< PluginServer * > *plugindb)
 ~CICache ()
void update (File *&file)
void set_edl (EDL *edl)
Filecheck_out (Asset *asset)
int check_in (Asset *asset)
int delete_entry (Asset *asset)
int delete_entry (char *path)
int age ()
int dump ()

Public Attributes

ArrayList< PluginServer * > * plugindb

Private Member Functions

int delete_oldest ()
int64_t get_memory_usage ()
int lock_all ()
int unlock_all ()

Private Attributes

Mutex * check_in_lock
Mutex * check_out_lock
Mutex * total_lock
EDLedl
Preferencespreferences

Friends

class CICacheItem


Detailed Description

Definition at line 44 of file cache.h.


Constructor & Destructor Documentation

CICache::CICache EDL edl,
Preferences preferences,
ArrayList< PluginServer * > *  plugindb
 

Definition at line 15 of file cache.C.

References check_in_lock, check_out_lock, EDL::copy_all(), EDL::create_objects(), and total_lock.

CICache::~CICache  ) 
 

Definition at line 30 of file cache.C.

References check_in_lock, check_out_lock, edl, and total_lock.


Member Function Documentation

int CICache::age  ) 
 

Definition at line 175 of file cache.C.

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

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

int CICache::check_in Asset asset  ) 
 

Definition at line 115 of file cache.C.

References age(), CICacheItem::asset, check_in_lock, CICacheItem::checked_out, CICacheItem::item_lock, Asset::path, and total_lock.

Referenced by AssetPicon::create_objects(), ResourcePixmap::draw_audio_source(), ResourcePixmap::draw_video_resource(), VRender::get_colormodel(), VModule::import_frame(), VRender::process_buffer(), VEdit::read_frame(), and AModule::render().

File * CICache::check_out Asset asset  ) 
 

Definition at line 66 of file cache.C.

References CICacheItem::asset, check_out_lock, CICacheItem::checked_out, CICacheItem, CICacheItem::counter, CICacheItem::file, CICacheItem::item_lock, and Asset::path.

Referenced by AssetPicon::create_objects(), ResourcePixmap::draw_audio_source(), ResourcePixmap::draw_video_resource(), VRender::get_colormodel(), VModule::import_frame(), VRender::process_buffer(), VEdit::read_frame(), and AModule::render().

int CICache::delete_entry char *  path  ) 
 

Definition at line 141 of file cache.C.

References EDL::assets, delete_entry(), edl, and Assets::get_asset().

int CICache::delete_entry Asset asset  ) 
 

Definition at line 148 of file cache.C.

References CICacheItem::asset, CICacheItem::checked_out, Asset::equivalent(), lock_all(), and unlock_all().

Referenced by delete_entry(), and MWindow::remove_assets_from_project().

int CICache::delete_oldest  )  [private]
 

Definition at line 216 of file cache.C.

References CICacheItem::checked_out, CICacheItem::counter, CICacheItem::file, File::purge_cache(), and total_lock.

Referenced by age().

int CICache::dump  ) 
 

Definition at line 252 of file cache.C.

References CICacheItem::asset, CICacheItem::counter, get_memory_usage(), lock_all(), Asset::path, and unlock_all().

Referenced by MWindow::remove_assets_from_project().

int64_t CICache::get_memory_usage  )  [private]
 

Definition at line 202 of file cache.C.

References CICacheItem::file, and File::get_memory_usage().

Referenced by age(), and dump().

int CICache::lock_all  )  [private]
 

Definition at line 270 of file cache.C.

References check_in_lock, and check_out_lock.

Referenced by delete_entry(), and dump().

void CICache::set_edl EDL edl  ) 
 

Definition at line 39 of file cache.C.

References EDL::copy_all().

Referenced by PlaybackEngine::create_cache(), PlaybackEngine::perform_change(), and MWindow::update_caches().

int CICache::unlock_all  )  [private]
 

Definition at line 276 of file cache.C.

References check_in_lock, and check_out_lock.

Referenced by delete_entry(), and dump().

void CICache::update File *&  file  ) 
 

Definition at line 44 of file cache.C.

References File::asset, CICacheItem::asset, CICacheItem, CICacheItem::file, Asset::path, File::set_asset(), and Asset::test_path().


Friends And Related Function Documentation

friend class CICacheItem [friend]
 

Definition at line 52 of file cache.h.

Referenced by check_out(), and update().


Member Data Documentation

Mutex* CICache::check_in_lock [private]
 

Definition at line 93 of file cache.h.

Referenced by check_in(), CICache(), lock_all(), unlock_all(), and ~CICache().

Mutex * CICache::check_out_lock [private]
 

Definition at line 93 of file cache.h.

Referenced by age(), check_out(), CICache(), lock_all(), unlock_all(), and ~CICache().

EDL* CICache::edl [private]
 

Definition at line 95 of file cache.h.

Referenced by CICacheItem::CICacheItem(), delete_entry(), and ~CICache().

ArrayList<PluginServer*>* CICache::plugindb
 

Definition at line 78 of file cache.h.

Preferences* CICache::preferences [private]
 

Definition at line 96 of file cache.h.

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

Mutex * CICache::total_lock [private]
 

Definition at line 93 of file cache.h.

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


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:11 2006 for Cinelerra-svn by  doxygen 1.4.4