rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
CacheableObject Class Reference

Detailed Description

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 17 of file CacheableObject.m.

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

Public Member Functions

 CacheableObject (matfile, fieldname)
 constructor More...
 
function objsaveobj ()
 saves all fields except for the obj handle More...
 

Static Public Member Functions

static function this = loadobj (obj)
 restores the CacheableObject object and fills the obj handle again. More...
 

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
 

Constructor & Destructor Documentation

CacheableObject.CacheableObject (   matfile,
  fieldname 
)

constructor

At construction time, the obj attribute is tried to be filled with the obj stored in matfile.

Parameters
matfilea string specifying the full path or only the file name of the mat-file where the object is stored.
fieldnamea string specifying a fieldname that shall be passed as second argument to the load method. (Default: = [])

Definition at line 70 of file CacheableObject.m.

Here is the caller graph for this function:

Member Function Documentation

function this = CacheableObject.loadobj (   obj)
static

restores the CacheableObject object and fills the obj handle again.

Parameters
objobj
Return values
thisthis
Required fields of obj:
  • matfile_path —  matfile path
  • md5 —  md5

Definition at line 141 of file CacheableObject.m.

Here is the call graph for this function:

function obj = CacheableObject.saveobj ( )

saves all fields except for the obj handle

Return values
objstruct to be stored in file
Generated fields of obj:
  • matfile_path —  matfile path
  • matfile —  matfile
  • md5 —  md5

Definition at line 120 of file CacheableObject.m.


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