123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef KSGSCompile_H
- #define KSGSCompile_H
- #include <Array.h>
- #include <Text.h>
- #include <initializer_list>
- using namespace Framework;
- namespace KSGScript
- {
- struct KSGSCompileVariable;
- struct KSGSCompileFunktion;
- struct KSGSCompileKlasse;
- class KSGSCompVarTable : public virtual ReferenceCounter
- {
- private:
- RCArray< Text > *namen;
- Array< KSGSCompileVariable * > *vars;
- public:
-
- __declspec( dllexport ) KSGSCompVarTable();
-
- __declspec( dllexport ) ~KSGSCompVarTable();
-
- __declspec( dllexport ) bool addVariable( const char *name, KSGSCompileVariable *var );
-
- __declspec( dllexport ) KSGSCompileVariable *get( const char *name ) const;
- __declspec( dllexport ) bool hat( const char *name ) const;
- };
- class KSGSCompFuncTable : public virtual ReferenceCounter
- {
- private:
- RCArray< Text > *namen;
- Array< KSGSCompileFunktion * > *funks;
- public:
-
- __declspec( dllexport ) KSGSCompFuncTable();
-
- __declspec( dllexport ) ~KSGSCompFuncTable();
-
- __declspec( dllexport ) bool addFunktion( const char *name, KSGSCompileFunktion *func );
-
- __declspec( dllexport ) KSGSCompileFunktion *get( const char *name ) const;
- __declspec( dllexport ) bool hat( const char *name ) const;
- };
- class KSGSCompKlassTable : public virtual ReferenceCounter
- {
- private:
- RCArray< Text > *namen;
- Array< KSGSCompileKlasse * > *klassen;
- public:
-
- __declspec( dllexport ) KSGSCompKlassTable();
-
- __declspec( dllexport ) ~KSGSCompKlassTable();
-
- __declspec( dllexport ) bool addKlasse( const char *name, KSGSCompileKlasse *klasse );
-
- __declspec( dllexport ) KSGSCompileKlasse *get( const char *name ) const;
- __declspec( dllexport ) KSGSCompileKlasse *get( int id ) const;
- __declspec( dllexport ) bool hat( const char *name ) const;
- __declspec( dllexport ) bool hat( int id ) const;
- };
- struct KSGSCompileVariable
- {
- int typ;
- int id;
- int sichtbar;
-
- __declspec( dllexport ) KSGSCompileVariable( int t, int s );
- };
- struct KSGSCompileFunktion
- {
- int typ;
- int id;
- int sichtbar;
- Array< int > parameterTyp;
- KSGSCompVarTable vars;
-
- __declspec( dllexport ) KSGSCompileFunktion( int t, int s, std::initializer_list< int > pt );
- };
- struct KSGSCompileKlasse
- {
- int id;
- KSGSCompVarTable vars;
- KSGSCompFuncTable funcs;
- };
- }
- #endif
|