Diff of /mex/block_interface.h [76dce7] .. [89ea83] Maximize Restore

  Switch to unified view

a/mex/block_interface.h b/mex/block_interface.h
1
/*
2
 * This mex file serves as an object-like storage of data for the
3
 * block processing framework. The data is made persistent between
4
 * calls.
5
 * */
6
1
#include "mex.h"
7
#include "mex.h"
2
8
3
#define COMMAND_LENGTH 20
9
#define COMMAND_LENGTH 20
4
10
5
struct biEntry;
11
#define ARRAYLEN(x) ((sizeof(x))/(sizeof(*x)))
6
12
7
typedef struct 
13
/*
14
 * Structure for holding attributes
15
 * */
16
typedef struct biEntry biEntry;
17
struct biEntry 
8
{
18
{
9
char name[COMMAND_LENGTH];
19
   char name[COMMAND_LENGTH];
10
mxArray* var;
20
   mxArray* var;
11
void (*setter)(struct biEntry* obj,mxArray* in);
21
   void (*setter)(biEntry* obj,const mxArray* in);
12
mxArray* (*getter)(struct biEntry* obj);
22
   mxArray* (*getter)(biEntry* obj);
13
void (*reseter)(struct biEntry* obj, mxArray* in);
14
}
23
};
15
biEntry;
16
24
17
25
26
/*
27
 * Default setter and getter functions
28
 * */
18
void defaultSetter(biEntry* obj,mxArray* in);
29
void defaultSetter(biEntry* obj,const mxArray* in);
19
mxArray* defaultGetter(biEntry* obj);
30
mxArray* defaultGetter(biEntry* obj);
20
31
21
32
/*
33
 * General functions
34
 * */
22
biEntry* lookupEntry(const char* name, biEntry* dict, size_t dictLen);
35
biEntry* lookupEntry(const char* name, biEntry* dict, size_t dictLen);
36
void resetAll(biEntry* dict, size_t dictLen);
37
void clearAll(biEntry* dict, size_t dictLen);
38
void clearAllWrapper();
23
39
24
/*
40
/*
25
 * Custom functions
41
 * Custom functions
26
 * */
42
 * */
27
mxArray* getSource(biEntry* obj);
43
mxArray* getSource(biEntry* obj);
28
mxArray* getEnqBufCount(biEntry* obj);
44
mxArray* getEnqBufCount(biEntry* obj);
29
mxArray* getToPlay(biEntry* obj);
45
mxArray* getToPlay(biEntry* obj);
30
void incPageNo();
46
void incPageNo();
47
void pushPage(const mxArray* in);
48
mxArray* popPage();