-
Notifications
You must be signed in to change notification settings - Fork 0
/
Group.h
58 lines (52 loc) · 2.11 KB
/
Group.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 H_Group
#define H_Group
#include <stdbool.h>
#include "hashmap.h"
#include "KMF4C.h"
typedef struct _ContainerNode ContainerNode;
typedef struct _Group Group;
typedef struct _Instance Instance;
typedef struct _Visitor Visitor;
typedef char* (*fptrGroupInternalGetKey)(Group*);
typedef char* (*fptrGroupMetaClassName)(Group*);
typedef ContainerNode* (*fptrGroupFindSubNodesByID)(Group*, char*);
typedef void (*fptrGroupAddSubNodes)(Group*, ContainerNode*);
typedef void (*fptrGroupRemoveSubNodes)(Group*, ContainerNode*);
typedef void (*fptrDeleteGroup)(Group*);
typedef void (*fptrVisitAttrGroup)(void*, char*, Visitor*, bool);
typedef void (*fptrVisitRefsGroup)(void*, char*, Visitor*, bool);
typedef void* (*fptrFindByPathGroup)(char*, Group*);
typedef struct _Group {
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 subNodes;
fptrGroupAddSubNodes AddSubNodes;
fptrGroupRemoveSubNodes RemoveSubNodes;
fptrGroupFindSubNodesByID FindSubNodesByID;
} Group;
Instance* newPoly_Group(void);
Group* new_Group(void);
char* Group_internalGetKey(void* const this);
char* Group_metaClassName(void* const this);
ContainerNode* Group_FindSubNodesByID(Group* const this, char* id);
void Group_AddSubNodes(Group* const this, ContainerNode* ptr);
void Group_RemoveSubNodes(Group* const this, ContainerNode* ptr);
void deletePoly_Group(void * const this);
void delete_Group(void * const this);
void Group_VisitAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void Group_VisitPathAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void Group_VisitReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void Group_VisitPathReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void* Group_FindByPath(char *attribute, void * const this);
#endif /* H_Group */