rbmatlab 0.10.01
|
class which wraps an object pointer to an object that is stored somewhere on the hdd (in a cache)
As the wrapped object is already stored somewhere, it is not stored if the CacheableObject is stored. Instead only the filename and some consistency hash are stored on the hdd, from which the wrapped object can be reliably restored. (with a consistency check on the data)
Definition at line 1 of file CacheableObject.m.
Public Member Functions | |
CacheableObject ( matfile, fieldname) | |
constructor | |
function obj = | saveobj () |
saves all fields except for the obj handle | |
Static Public Member Functions | |
static function this = | loadobj ( obj) |
restores the CacheableObject object and fills the obj handle again. | |
Public Attributes | |
matfile | |
the file name where the wrapped object is stored | |
md5 | |
a hash computed from the cache file | |
obj | |
the pointer to the wrapped object | |
matfile_path | |
the full path to the file where the wrapped object is stored |
CacheableObject.CacheableObject | ( | matfile, | |
fieldname | |||
) |
constructor
At construction time, the obj attribute is tried to be filled with the obj stored in matfile
.
matfile | a string specifying the full path or only the file name of the mat-file where the object is stored. |
fieldname | a string specifying a fieldname that shall be passed as second argument to the load method. (Default: = []) |
Definition at line 52 of file CacheableObject.m.
function this = CacheableObject.loadobj | ( | obj | ) | [static] |
restores the CacheableObject object and fills the obj handle again.
obj | obj |
this | this |
matfile_path —
matfile path md5 —
md5 Definition at line 122 of file CacheableObject.m.
function obj = CacheableObject.saveobj | ( | ) |
saves all fields except for the obj handle
obj | struct to be stored in file |
matfile_path —
matfile path matfile —
matfile md5 —
md5 Definition at line 101 of file CacheableObject.m.