-
Notifications
You must be signed in to change notification settings - Fork 0
/
Channel.h
58 lines (52 loc) · 2.16 KB
/
Channel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __Channel_H
#define __Channel_H
#include <stdbool.h>
#include "hashmap.h"
#include "KMF4C.h"
typedef struct _MBinding MBinding;
typedef struct _Channel Channel;
typedef struct _Instance Instance;
typedef struct _Visitor Visitor;
typedef char* (*fptrChannelInternalGetKey)(Channel*);
typedef char* (*fptrChannelMetaClassName)(Channel*);
typedef void (*fptrChannelAddBindings)(Channel*, MBinding*);
typedef void (*fptrChannelRemoveBindings)(Channel*, MBinding*);
typedef MBinding* (*fptrChannelFindBindingsByID)(Channel*, char*);
typedef void (*fptrVisitAttrChannel)(void*, char*, Visitor*, bool);
typedef void (*fptrVisitRefsChannel)(void*, char*, Visitor*, bool);
typedef void* (*fptrFindByPathChannel)(char*, Channel*);
typedef void (*fptrDeleteChannel)(void*);
typedef struct _Channel {
void *pDerivedObj;
char *eContainer;
char *path;
map_t refs;
fptrKMFMetaClassName metaClassName;
fptrKMFInternalGetKey internalGetKey;
fptrVisitAttr VisitAttributes;
fptrVisitAttr VisitPathAttributes;
fptrVisitRefs VisitReferences;
fptrVisitRefs VisitPathReferences;
fptrFindByPath FindByPath;
fptrDelete Delete;
Instance *super;
map_t bindings;
fptrChannelFindBindingsByID FindBindingsByID;
fptrChannelAddBindings AddBindings;
fptrChannelRemoveBindings RemoveBindings;
} Channel;
Instance* newPoly_Channel(void);
Channel* new_Channel(void);
void deletePoly_Channel(void* const this);
void delete_Channel(void* const this);
char* Channel_metaClassName(void* const this);
char* Channel_internalGetKey(void* const this);
void Channel_AddBindings(Channel* const this, MBinding* ptr);
void Channel_RemoveBindings(Channel* const this, MBinding* ptr);
MBinding* Channel_FindBindingsByID(Channel* const this, char* id);
void Channel_VisitAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void Channel_VisitPathAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void Channel_VisitReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void Channel_VisitPathReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void* Channel_FindByPath(char* attribute, void* const this);
#endif /*__Channel_H */