-
Notifications
You must be signed in to change notification settings - Fork 0
/
TypeLibrary.h
55 lines (49 loc) · 2.28 KB
/
TypeLibrary.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
#ifndef __TypeLibrary_H
#define __TypeLibrary_H
#include "hashmap.h"
typedef struct _TypeLibrary TypeLibrary;
typedef struct _NamedElement NamedElement;
typedef struct _TypeDefinition TypeDefinition;
typedef char* (*fptrTypeLibMetaClassName)(TypeLibrary*);
typedef char* (*fptrTypeLibInternalGetKey)(TypeLibrary*);
typedef TypeDefinition* (*fptrTypeLibFindSubTypesByID)(TypeLibrary*, char*);
typedef void (*fptrTypeLibAddSubTypes)(TypeLibrary*, TypeDefinition*);
typedef void (*fptrTypeLibRemoveSubTypes)(TypeLibrary*, TypeDefinition*);
typedef void (*fptrDeleteTypeLib)(TypeLibrary*);
typedef void (*fptrVisitAttrTypeLib)(void*, char*, Visitor*);
typedef void (*fptrVisitRefsTypeLib)(void*, char*, Visitor*);
typedef void* (*fptrFindByPathTypeLibrary)(char*, TypeLibrary*);
typedef struct _TypeLibrary {
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;
NamedElement *super;
map_t subTypes;
fptrTypeLibFindSubTypesByID FindSubTypesByID;
fptrTypeLibAddSubTypes AddSubTypes;
fptrTypeLibRemoveSubTypes RemoveSubTypes;
} TypeLibrary;
NamedElement* newPoly_TypeLibrary(void);
TypeLibrary* new_TypeLibrary(void);
char* TypeLibrary_metaClassName(void * const this);
char* TypeLibrary_internalGetKey(void * const this);
TypeDefinition* TypeLibrary_FindSubTypesByID(TypeLibrary* const this, char* id);
void TypeLibrary_AddSubTypes(TypeLibrary* const this, TypeDefinition* ptr);
void TypeLibrary_RemoveSubTypes(TypeLibrary* const this, TypeDefinition* ptr);
void deletePoly_TypeLibrary(void * const this);
void delete_TypeLibrary(void * const this);
void TypeLibrary_VisitAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void TypeLibrary_VisitPathAttributes(void* const this, char* parent, Visitor* visitor, bool recursive);
void TypeLibrary_VisitReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void TypeLibrary_VisitPathReferences(void* const this, char* parent, Visitor* visitor, bool recursive);
void* TypeLibrary_FindByPath(char* attribute, void * const this);
#endif /* __TypeLibrary_H */