Lynkeos
Instance Methods | Class Methods | List of all members
LynkeosObjectCache Class Reference

This class caches any kind of object. More...

#import <LynkeosObjectCache.h>

Inheritance diagram for LynkeosObjectCache:
Inheritance graph
[legend]
Collaboration diagram for LynkeosObjectCache:
Collaboration graph
[legend]

Instance Methods

(id) - initWithStrategy:capacity:policy:
 Initializer. More...
 
(void) - setObject:forKey:
 Put an object in the cache. More...
 
(NSObject *) - getObjectForKey:
 Retrieve an object from the cache. More...
 
(void) - setCapacity:
 Adapt the cache to a new size. More...
 

Class Methods

(void) + setMovieCache:
 Common cache for movie classes. More...
 
(void) + setImageProcessingCache:
 Common cache for processing images. More...
 
(LynkeosObjectCache *) + movieCache
 Common cache for movie classes. More...
 
(LynkeosObjectCache *) + imageProcessingCache
 Common cache for processing images. More...
 

Detailed Description

This class caches any kind of object.

Method Documentation

- (NSObject *) getObjectForKey: (id)  key

Retrieve an object from the cache.

Parameters
keythe key for this object
Returns
The object it it was found in the cache, nil otherwise
+ (LynkeosObjectCache *) imageProcessingCache

Common cache for processing images.

Returns
The image processing common cache

Referenced by ProcessStackManager::getParameterForItem:andParam:, and ProcessStackManager::nextParameterToProcess:.

- (id) initWithStrategy: (CacheCapacityStrategy_t strategy
capacity: (u_long)  capacity
policy: (u_short)  policy 

Initializer.

When first added to the cache, objects are always at the top, whatever the policy

Parameters
strategyCaching strategy (memory size or number of objects)
capacityThe maximum number of objects, or maximum memory in the cache
policyThe refresh policy of the cache
Returns
The initialized cache object
+ (LynkeosObjectCache *) movieCache

Common cache for movie classes.

Returns
The movie class common cache

Referenced by FFmpegReader(Private)::getFrame:, and MyQuickTimeReader(Private)::getPixelBufferAtIndex:.

- (void) setCapacity: (u_long)  capacity

Adapt the cache to a new size.

Parameters
capacityThe new size
+ (void) setImageProcessingCache: (LynkeosObjectCache*)  cache

Common cache for processing images.

Parameters
cacheThe new image processing cache
Returns
The image processing common cache
+ (void) setMovieCache: (LynkeosObjectCache*)  cache

Common cache for movie classes.

Parameters
cacheThe new movie cache
Returns
The movie class common cache
- (void) setObject: (NSObject*)  obj
forKey: (id)  key 

Put an object in the cache.

The object is retained by the cache and released when deleted from it

Parameters
objThe object to add to the cache
keyThe key to identify this object

Referenced by FFmpegReader(Private)::getFrame:, MyQuickTimeReader(Private)::getPixelBufferAtIndex:, and ProcessStackManager::nextParameterToProcess:.


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