Kiwi Engine
VM for interpreter
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
KEProgram.h
Go to the documentation of this file.
1 
8 #ifndef KEPROGRAM_H
9 #define KEPROGRAM_H
10 
11 #include <Coconut/Coconut.h>
12 #include "KEForwarders.h"
13 
17 struct KEProgram {
19  struct CNObject superClass ;
21  struct KEFrame * rootFrame ;
23  struct CNObjectList entryPaths ;
25  struct CNObjectList entryFunctions ;
26 } ;
27 
34 struct KEProgram *
35 KEAllocateProgram(struct CNResource * resource) ;
36 
41 static inline void
42 KERetainProgram(struct KEProgram * dst)
43 {
44  CNRetainObject(&(dst->superClass)) ;
45 }
46 
51 static inline void
52 KEReleaseProgram(struct KEProgram * dst)
53 {
54  CNReleaseObject(&(dst->superClass)) ;
55 }
56 
62 static inline struct CNResource *
63 KEResourceOfProgram(struct KEProgram * src)
64 {
65  return CNResourceOfObject(&(src->superClass)) ;
66 }
67 
73 static inline struct KEFrame *
74 KERootFrameOfProgram(struct KEProgram * src)
75 {
76  return src->rootFrame ;
77 }
78 
84 void
85 KEAddEntryPathToProgram(struct KEProgram * dst, struct KEPath * path) ;
86 
92 static inline const struct CNObjectList *
93 KEEntryPathsInProgram(const struct KEProgram * src)
94 {
95  return &(src->entryPaths) ;
96 }
97 
103 void
104 KEAddEntryFunctionToProgram(struct KEProgram * dst, struct KEFunction * func) ;
105 
111 static inline const struct CNObjectList *
112 KEEntryFunctionsInProgram(const struct KEProgram * src)
113 {
114  return &(src->entryFunctions) ;
115 }
116 
117 #endif /* KEPROGRAM_H */
KEProgram class.
Definition: KEProgram.h:17
void KEAddEntryPathToProgram(struct KEProgram *dst, struct KEPath *path)
Add entry path.
struct KEProgram * KEAllocateProgram(struct CNResource *resource)
Allocate KEProgram object.
struct CNObjectList entryFunctions
Definition: KEProgram.h:25
Definition: KEFrame.h:16
Definition: KEFunction.h:18
struct CNObjectList entryPaths
Definition: KEProgram.h:23
struct KEFrame * rootFrame
Definition: KEProgram.h:21
Forward declarations of the data type in KiwiEngine.
Definition: KEPath.h:16
struct CNObject superClass
Definition: KEProgram.h:19
void KEAddEntryFunctionToProgram(struct KEProgram *dst, struct KEFunction *func)
Add function on entry path.