Kiwi Script
KiwiScript Interpreter
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
KSVariable.h
Go to the documentation of this file.
1 
8 #ifndef KSVARIABLE_H
9 #define KSVARIABLE_H
10 
11 #include <KiwiEngine/KiwiEngine.h>
12 #include "KSForwarders.h"
13 
15 struct KSVariable {
17  struct CNObject superClass ;
19  const struct CNFixedString * identifier ;
21  struct KEFrame * type ;
23  struct KELineInfo * lineInfo ;
24 } ;
25 
33 struct KSVariable *
34 KSAllocateVariable(const struct CNFixedString * ident,
35  struct KELineInfo * linfo,
36  struct CNResource * resource) ;
37 
42 static inline void
43 KSRetainVariable(struct KSVariable * dst)
44 {
45  CNRetainObject(&(dst->superClass)) ;
46 }
47 
52 static inline void
53 KSReleaseVariable(struct KSVariable * dst)
54 {
55  CNReleaseObject(&(dst->superClass)) ;
56 }
57 
63 static inline void
64 KSSetVariableType(struct KSVariable * dst, struct KEFrame * type)
65 {
66  KERetainFrame(type) ;
67  if(dst->type){
68  KEReleaseFrame(dst->type) ;
69  }
70  dst->type = type ;
71 }
72 
73 #endif /* KSVARIABLE_H */
74 
struct KEFrame * type
Definition: KSVariable.h:21
struct CNFixedString * identifier
Definition: KSVariable.h:19
struct KSVariable * KSAllocateVariable(const struct CNFixedString *ident, struct KELineInfo *linfo, struct CNResource *resource)
Allocate vairiable.
struct CNObject superClass
Definition: KSVariable.h:17
struct KELineInfo * lineInfo
Definition: KSVariable.h:23
Forward declarations for the KiwiScript.
Definition: KSVariable.h:15