-
Notifications
You must be signed in to change notification settings - Fork 0
/
DictionaryType.h
53 lines (47 loc) · 2.29 KB
/
DictionaryType.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
#ifndef __DictionaryType_H
#define __DictionaryType_H
#include "hashmap.h"
typedef struct _DictionaryAttribute DictionaryAttribute;
typedef struct _DictionaryType DictionaryType;
typedef struct _Visitor Visitor;
typedef char* (*fptrDicTypeMetaClassName)(DictionaryType*);
typedef char* (*fptrDicTypeInternalGetKey)(DictionaryType*);
typedef void (*fptrDeleteDicType)(DictionaryType*);
typedef DictionaryAttribute* (*fptrDicTypeFindAttrByID)(DictionaryType*, char*);
typedef void (*fptrDicTypeAddAttr)(DictionaryType*, DictionaryAttribute*);
typedef void (*fptrDicTypeRemAttr)(DictionaryType*, DictionaryAttribute*);
typedef void (*fptrVisitAttrDicType)(void*, char*, Visitor*);
typedef void (*fptrVisitRefsDicType)(void*, char*, Visitor*);
typedef void* (*fptrFindByPathDicType)(char*, DictionaryType*);
typedef struct _DictionaryType {
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;
char generated_KMF_ID[9];
map_t attributes;
fptrDicTypeFindAttrByID FindAttributesByID;
fptrDicTypeAddAttr AddAttributes;
fptrDicTypeRemAttr RemoveAttributes;
} DictionaryType;
DictionaryType* new_DictionaryType(void);
void delete_DictionaryType(void* const this);
char* DictionaryType_internalGetKey(void* const this);
char* DictionaryType_metaClassName(void* const this);
DictionaryAttribute* DictionaryType_FindAttributesByID(DictionaryType* const this, char* id);
void DictionaryType_AddAttributes(DictionaryType* const this, DictionaryAttribute* ptr);
void DictionaryType_RemoveAttributes(DictionaryType* const this, DictionaryAttribute* ptr);
void DictionaryType_VisitAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void DictionaryType_VisitPathAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void DictionaryType_VisitReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void DictionaryType_VisitPathReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void* DictionaryType_FindByPath(char* attribute, void* const this);
#endif /* __DictionaryType_H */