#else
#define __ENDIAN_PAD(x) 0
#endif
+#if defined(_WIN32)
+# if defined(__GNUC__) || defined(__TINYC__)
+# define ecere_stdcall __attribute__((__stdcall__))
+# define ecere_gcc_struct __attribute__((gcc_struct))
+# else
+# define ecere_stdcall __stdcall
+# define ecere_gcc_struct
+# endif
+#else
+# define ecere_stdcall
+# define ecere_gcc_struct
+#endif
#include <stdint.h>
#include <sys/types.h>
-#if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
-#define _64BIT 1
-#else
-#define _64BIT 0
-#endif
+static unsigned int i18n;
-#define arch_PointerSize sizeof(void *)
-#define structSize_Instance (_64BIT ? 24 : 12)
-#define structSize_Module (_64BIT ? 560 : 300)
+static unsigned int outputPot;
-struct __ecereNameSpace__ecere__com__Instance;
+static unsigned int disabledPooling;
-extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
+static int targetPlatform;
-extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
+static int targetBits;
-extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
+static unsigned int isConsole;
-extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
+static unsigned int isDynamicLibrary;
-extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
+static unsigned int isStaticLibrary;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
+static struct Context * theGlobalContext;
-struct __ecereNameSpace__ecere__sys__BTNode;
+static char mainModuleName[797];
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
+static char projectName[797];
-struct __ecereNameSpace__ecere__sys__BinaryTree
-{
-struct __ecereNameSpace__ecere__sys__BTNode * root;
-int count;
-int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
-void (* FreeKey)(void * key);
-} __attribute__ ((gcc_struct));
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
+
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
+
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
+
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__MapIterator_map;
+
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Iterator_data;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__MapIterator_key;
struct __ecereNameSpace__ecere__sys__OldList
{
int count;
unsigned int offset;
unsigned int circ;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
+struct __ecereNameSpace__ecere__com__DataValue
+{
+union
+{
+char c;
+unsigned char uc;
+short s;
+unsigned short us;
+int i;
+unsigned int ui;
+void * p;
+float f;
+double d;
+long long i64;
+uint64 ui64;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
-struct __ecereNameSpace__ecere__com__Method
+struct __ecereNameSpace__ecere__com__SerialBuffer
{
-const char * name;
-struct __ecereNameSpace__ecere__com__Method * parent;
-struct __ecereNameSpace__ecere__com__Method * left;
-struct __ecereNameSpace__ecere__com__Method * right;
-int depth;
-int (* function)();
-int vid;
-int type;
-struct __ecereNameSpace__ecere__com__Class * _class;
-void * symbol;
-const char * dataTypeString;
-struct Type * dataType;
-int memberAccess;
-} __attribute__ ((gcc_struct));
+unsigned char * _buffer;
+unsigned int count;
+unsigned int _size;
+unsigned int pos;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
+extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
-struct __ecereNameSpace__ecere__com__Property
-{
-struct __ecereNameSpace__ecere__com__Property * prev;
-struct __ecereNameSpace__ecere__com__Property * next;
-const char * name;
-unsigned int isProperty;
-int memberAccess;
-int id;
-struct __ecereNameSpace__ecere__com__Class * _class;
-const char * dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-struct Type * dataType;
-void (* Set)(void * , int);
-int (* Get)(void * );
-unsigned int (* IsSet)(void * );
-void * data;
-void * symbol;
-int vid;
-unsigned int conversion;
-unsigned int watcherOffset;
-const char * category;
-unsigned int compiled;
-unsigned int selfWatchable;
-unsigned int isWatchable;
-} __attribute__ ((gcc_struct));
+extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
+
+extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
+
+extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
+
+extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
+struct External;
struct CodePosition
{
int charPos;
int pos;
int included;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
+struct Context;
-struct Location
-{
-struct CodePosition start;
-struct CodePosition end;
-} __attribute__ ((gcc_struct));
+struct Expression;
+
+extern char * __ecereNameSpace__ecere__sys__TrimLSpaces(const char * string, char * output);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
+extern int strcmp(const char * , const char * );
-struct Attrib;
+extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
+extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
-struct ExtDecl;
+extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
+extern char * strcpy(char * , const char * );
-struct ClassDefinition;
+extern void FixModuleName(char * moduleName);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
+extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
-struct Context;
+struct TemplateParameter;
+
+extern int sprintf(char * , const char * , ...);
+
+struct TypeName;
+
+struct Declarator;
+
+struct Identifier;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
+extern char * strcat(char * , const char * );
-struct Instantiation;
+extern int GetHostBits(void);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
+extern void SetSymbolsDir(const char * s);
-struct Declaration;
+extern int printf(const char * , ...);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
+extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
-struct Statement;
+extern char * __ecereNameSpace__ecere__sys__GetExtension(const char * string, char * output);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
+extern void SetTargetPlatform(int platform);
-struct TypeName;
+extern void SetTargetBits(int bits);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
+extern void SetInSymbolGen(unsigned int b);
-struct Initializer;
+struct __ecereNameSpace__ecere__com__IteratorPointer;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
+extern int __ecereNameSpace__ecere__sys__Tokenize(char * string, int maxTokens, char * tokens[], unsigned int esc);
-struct __ecereNameSpace__ecere__com__DataValue
+extern int strcasecmp(const char * , const char * );
+
+extern unsigned int LoadSymbols(const char * fileName, int importType, unsigned int loadDllOnly);
+
+extern void CheckDataRedefinitions(void);
+
+extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
+
+extern char * strstr(const char * , const char * );
+
+extern size_t strlen(const char * );
+
+struct ContextStringPair
{
-union
+char * string;
+char * context;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__CustomAVLTree
{
-char c;
-unsigned char uc;
-short s;
-unsigned short us;
-int i;
-unsigned int ui;
-void * p;
-float f;
-double d;
-long long i64;
-uint64 ui64;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__com__AVLNode * root;
+int count;
+} ecere_gcc_struct;
+
+extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
+struct Definition;
-struct Expression;
+extern void FreeIncludeFiles(void);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
+const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
-struct TemplateDatatype;
+int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
+static struct __ecereNameSpace__ecere__sys__OldList modules;
-struct TemplateArgument;
+struct __ecereNameSpace__ecere__sys__OldList _defines =
+{
+0, 0, 0, 0, 0
+};
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
+struct __ecereNameSpace__ecere__sys__OldList _imports =
+{
+0, 0, 0, 0, 0
+};
-struct TemplateParameter;
+extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
+extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
-struct Specifier;
+extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
+extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
-struct Identifier;
+extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
-struct Declarator;
+void * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindName(struct __ecereNameSpace__ecere__sys__OldList * this, const char * name, unsigned int warn);
+
+void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
+
+void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
+
+struct Location
+{
+struct CodePosition start;
+struct CodePosition end;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
+extern void FinishTemplatesContext(struct Context * context);
-struct FunctionDefinition;
+extern void SetGlobalContext(struct Context * context);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
+extern void SetTopContext(struct Context * context);
-struct DBTableDef;
+extern void SetCurrentContext(struct Context * context);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
+extern void FreeContext(struct Context * context);
-struct External;
+extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
+extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
+
+extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
+
+extern struct Identifier * MkIdentifier(const char * string);
+
+extern void FreeModuleDefine(struct Definition * def);
+
+struct ModuleImport;
+
+static struct ModuleImport * mainModule;
+
+extern struct ModuleImport * GetMainModule(void);
+
+extern void SetMainModule(struct ModuleImport * moduleImport);
struct ModuleImport
{
struct __ecereNameSpace__ecere__sys__OldList functions;
int importType;
int importAccess;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
+extern void FreeModuleImport(struct ModuleImport * imp);
-struct ClassImport
+struct __ecereNameSpace__ecere__com__Class;
+
+struct __ecereNameSpace__ecere__com__Instance
{
-struct ClassImport * prev;
-struct ClassImport * next;
-char * name;
-struct __ecereNameSpace__ecere__sys__OldList methods;
-struct __ecereNameSpace__ecere__sys__OldList properties;
-unsigned int itself;
-int isRemote;
-} __attribute__ ((gcc_struct));
+void * * _vTbl;
+struct __ecereNameSpace__ecere__com__Class * _class;
+int _refCount;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
-struct Symbol
-{
-char * string;
-struct Symbol * parent;
-struct Symbol * left;
-struct Symbol * right;
-int depth;
-struct Type * type;
+extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
+
+static struct __ecereNameSpace__ecere__com__Class * thisAppClass;
+
+extern struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
+
+extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
+
+extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
+
+extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+static struct __ecereNameSpace__ecere__com__Instance * dcomSymbols;
+
+extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
+
+extern void __ecereNameSpace__ecere__com__eInstance_Delete(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+extern void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
+
+struct __ecereNameSpace__ecere__com__MapIterator
+{
+struct __ecereNameSpace__ecere__com__Instance * container;
+struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__Iterator
+{
+struct __ecereNameSpace__ecere__com__Instance * container;
+struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
+} ecere_gcc_struct;
+
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_GetLine(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max);
+
+extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
+
+int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
+
+int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
+
+int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
+
+int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
+
+int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
+
+int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add;
+
+int __ecereVMethodID___ecereNameSpace__ecere__com__Container_RemoveAll;
+
+int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Free;
+
+struct __ecereNameSpace__ecere__com__Instance * __ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_map(struct __ecereNameSpace__ecere__com__MapIterator * this);
+
+void __ecereProp___ecereNameSpace__ecere__com__MapIterator_Set_map(struct __ecereNameSpace__ecere__com__MapIterator * this, struct __ecereNameSpace__ecere__com__Instance * value);
+
+const uint64 __ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_key(struct __ecereNameSpace__ecere__com__MapIterator * this);
+
+unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Index(struct __ecereNameSpace__ecere__com__Iterator * this, const uint64 index, unsigned int create);
+
+uint64 __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(struct __ecereNameSpace__ecere__com__Iterator * this);
+
+void __ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(struct __ecereNameSpace__ecere__com__Iterator * this, uint64 value);
+
+unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Next();
+
+struct ModuleInfo;
+
+struct ModuleInfo
+{
+struct ModuleInfo * prev, * next;
+char * name;
+unsigned int globalInstance;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__sys__BTNode;
+
+struct __ecereNameSpace__ecere__sys__BTNode
+{
+uintptr_t key;
+struct __ecereNameSpace__ecere__sys__BTNode * parent;
+struct __ecereNameSpace__ecere__sys__BTNode * left;
+struct __ecereNameSpace__ecere__sys__BTNode * right;
+int depth;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
+
+struct __ecereNameSpace__ecere__com__Property;
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
+
+extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+struct FunctionImport;
+
+struct FunctionImport
+{
+struct FunctionImport * prev;
+struct FunctionImport * next;
+char * name;
+} ecere_gcc_struct;
+
+struct MethodImport;
+
+struct MethodImport
+{
+struct MethodImport * prev;
+struct MethodImport * next;
+char * name;
+unsigned int isVirtual;
+} ecere_gcc_struct;
+
+struct PropertyImport;
+
+struct PropertyImport
+{
+struct PropertyImport * prev;
+struct PropertyImport * next;
+char * name;
+unsigned int isVirtual;
+unsigned int hasSet;
+unsigned int hasGet;
+} ecere_gcc_struct;
+
+struct ImportedModule;
+
+struct ImportedModule
+{
+struct ImportedModule * prev;
+struct ImportedModule * next;
+char * name;
+int type;
+int importType;
+unsigned int globalInstance;
+unsigned int dllOnly;
+int importAccess;
+} ecere_gcc_struct;
+
+struct Type;
+
+struct __ecereNameSpace__ecere__com__Property
+{
+struct __ecereNameSpace__ecere__com__Property * prev;
+struct __ecereNameSpace__ecere__com__Property * next;
+const char * name;
+unsigned int isProperty;
+int memberAccess;
+int id;
+struct __ecereNameSpace__ecere__com__Class * _class;
+const char * dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+struct Type * dataType;
+void (* Set)(void * , int);
+int (* Get)(void * );
+unsigned int (* IsSet)(void * );
+void * data;
+void * symbol;
+int vid;
+unsigned int conversion;
+unsigned int watcherOffset;
+const char * category;
+unsigned int compiled;
+unsigned int selfWatchable;
+unsigned int isWatchable;
+} ecere_gcc_struct;
+
+extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
+
+extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+
+extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+
+struct __ecereNameSpace__ecere__com__BTNamedLink;
+
+struct __ecereNameSpace__ecere__com__BTNamedLink
+{
+const char * name;
+struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
+struct __ecereNameSpace__ecere__com__BTNamedLink * left;
+struct __ecereNameSpace__ecere__com__BTNamedLink * right;
+int depth;
+void * data;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__sys__OldLink;
+
+struct __ecereNameSpace__ecere__sys__OldLink
+{
+struct __ecereNameSpace__ecere__sys__OldLink * prev;
+struct __ecereNameSpace__ecere__sys__OldLink * next;
+void * data;
+} ecere_gcc_struct;
+
+struct Symbol;
+
+extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
+
+extern struct Symbol * FindClass(const char * name);
+
+struct __ecereNameSpace__ecere__com__NameSpace;
+
+extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
+
+struct ClassImport;
+
+struct ClassImport
+{
+struct ClassImport * prev;
+struct ClassImport * next;
+char * name;
+struct __ecereNameSpace__ecere__sys__OldList methods;
+struct __ecereNameSpace__ecere__sys__OldList properties;
+unsigned int itself;
+int isRemote;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__Method;
+
+struct __ecereNameSpace__ecere__com__Method
+{
+const char * name;
+struct __ecereNameSpace__ecere__com__Method * parent;
+struct __ecereNameSpace__ecere__com__Method * left;
+struct __ecereNameSpace__ecere__com__Method * right;
+int depth;
+int (* function)();
+int vid;
+int type;
+struct __ecereNameSpace__ecere__com__Class * _class;
+void * symbol;
+const char * dataTypeString;
+struct Type * dataType;
+int memberAccess;
+} ecere_gcc_struct;
+
+struct Symbol
+{
+char * string;
+struct Symbol * parent;
+struct Symbol * left;
+struct Symbol * right;
+int depth;
+struct Type * type;
union
{
struct __ecereNameSpace__ecere__com__Method * method;
struct __ecereNameSpace__ecere__com__Property * _property;
struct __ecereNameSpace__ecere__com__Class * registered;
-} __attribute__ ((gcc_struct)) __anon1;
-int id;
-int idCode;
+} ecere_gcc_struct __anon1;
+unsigned int notYetDeclared;
union
{
struct
{
struct External * pointerExternal;
struct External * structExternal;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
struct
{
struct External * externalGet;
struct External * externalSet;
struct External * externalPtr;
struct External * externalIsSet;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
struct
{
struct External * methodExternal;
struct External * methodCodeExternal;
-} __attribute__ ((gcc_struct)) __anon3;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon3;
+} ecere_gcc_struct __anon2;
unsigned int imported;
unsigned int declaredStructSym;
struct __ecereNameSpace__ecere__com__Class * _class;
struct Context * ctx;
int isIterator;
struct Expression * propCategory;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
+unsigned int mustRegister;
+} ecere_gcc_struct;
struct Type
{
{
struct __ecereNameSpace__ecere__sys__OldList members;
char * enumName;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
struct
{
struct Type * returnType;
struct Symbol * thisClass;
unsigned int staticMethod;
struct TemplateParameter * thisClassTemplate;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
struct
{
struct __ecereNameSpace__ecere__com__Method * method;
struct __ecereNameSpace__ecere__com__Class * methodClass;
struct __ecereNameSpace__ecere__com__Class * usedClass;
-} __attribute__ ((gcc_struct)) __anon3;
+} ecere_gcc_struct __anon3;
struct
{
struct Type * arrayType;
struct Expression * arraySizeExp;
unsigned int freeExp;
struct Symbol * enumClass;
-} __attribute__ ((gcc_struct)) __anon4;
+} ecere_gcc_struct __anon4;
struct Type * type;
struct TemplateParameter * templateParameter;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
int kind;
unsigned int size;
char * name;
char * typeName;
+struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int declaredWithStruct : 1;
unsigned int typedByReference : 1;
unsigned int casted : 1;
-} __attribute__ ((gcc_struct));
+unsigned int pointerAlignment : 1;
+unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
+extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name);
-struct __ecereNameSpace__ecere__com__Class
+extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
+
+struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
{
-struct __ecereNameSpace__ecere__com__Class * prev;
-struct __ecereNameSpace__ecere__com__Class * next;
-const char * name;
-int offset;
-int structSize;
-void * * _vTbl;
-int vTblSize;
-unsigned int (* Constructor)(void * );
-void (* Destructor)(void * );
-int offsetClass;
-int sizeClass;
-struct __ecereNameSpace__ecere__com__Class * base;
-struct __ecereNameSpace__ecere__sys__BinaryTree methods;
-struct __ecereNameSpace__ecere__sys__BinaryTree members;
-struct __ecereNameSpace__ecere__sys__BinaryTree prop;
-struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
-struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
-struct __ecereNameSpace__ecere__sys__OldList derivatives;
-int memberID;
-int startMemberID;
-int type;
-struct __ecereNameSpace__ecere__com__Instance * module;
-struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
-const char * dataTypeString;
-struct Type * dataType;
-int typeSize;
-int defaultAlignment;
-void (* Initialize)();
-int memberOffset;
-struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
-const char * designerClass;
-unsigned int noExpansion;
-const char * defaultProperty;
-unsigned int comRedefinition;
-int count;
-int isRemote;
-unsigned int internalDecl;
-void * data;
-unsigned int computeSize;
-int structAlignment;
-int destructionWatchOffset;
-unsigned int fixed;
-struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
-int inheritanceAccess;
-const char * fullName;
-void * symbol;
-struct __ecereNameSpace__ecere__sys__OldList conversions;
-struct __ecereNameSpace__ecere__sys__OldList templateParams;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
-struct __ecereNameSpace__ecere__com__Class * templateClass;
-struct __ecereNameSpace__ecere__sys__OldList templatized;
-int numParams;
-unsigned int isInstanceClass;
-unsigned int byValueSystemClass;
-} __attribute__ ((gcc_struct));
+0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
+};
-extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
+struct __ecereNameSpace__ecere__com__Module;
-extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
+static struct __ecereNameSpace__ecere__com__Instance * privateModule;
-extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
-extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
+extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
-extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
-extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
+extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
-extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
+extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
-extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
+extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
-struct __ecereNameSpace__ecere__com__Instance
+struct __ecereNameSpace__ecere__com__Application;
+
+extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
+
+struct __ecereNameSpace__ecere__sys__BinaryTree;
+
+struct __ecereNameSpace__ecere__sys__BinaryTree
{
-void * * _vTbl;
-struct __ecereNameSpace__ecere__com__Class * _class;
-int _refCount;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__sys__BTNode * root;
+int count;
+int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
+void (* FreeKey)(void * key);
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__NameSpace
+{
+const char * name;
+struct __ecereNameSpace__ecere__com__NameSpace * btParent;
+struct __ecereNameSpace__ecere__com__NameSpace * left;
+struct __ecereNameSpace__ecere__com__NameSpace * right;
+int depth;
+struct __ecereNameSpace__ecere__com__NameSpace * parent;
+struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
+struct __ecereNameSpace__ecere__sys__BinaryTree classes;
+struct __ecereNameSpace__ecere__sys__BinaryTree defines;
+struct __ecereNameSpace__ecere__sys__BinaryTree functions;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
+
+int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
+
+struct __ecereNameSpace__ecere__com__Application
+{
+int argc;
+const char * * argv;
+int exitCode;
+unsigned int isGUIApp;
+struct __ecereNameSpace__ecere__sys__OldList allModules;
+char * parsedCommand;
+struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__Module
+{
+struct __ecereNameSpace__ecere__com__Instance * application;
+struct __ecereNameSpace__ecere__sys__OldList classes;
+struct __ecereNameSpace__ecere__sys__OldList defines;
+struct __ecereNameSpace__ecere__sys__OldList functions;
+struct __ecereNameSpace__ecere__sys__OldList modules;
+struct __ecereNameSpace__ecere__com__Instance * prev;
+struct __ecereNameSpace__ecere__com__Instance * next;
+const char * name;
+void * library;
+void * Unload;
+int importType;
+int origImportType;
+struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
+struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
+static struct __ecereNameSpace__ecere__com__NameSpace globalData;
+
+extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
+
+void __ecereUnregisterModule_ecs(struct __ecereNameSpace__ecere__com__Instance * module)
+{
+
+}
+
+struct __ecereNameSpace__ecere__com__DataMember;
+
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument
+{
+union
+{
+struct
+{
+const char * dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+} ecere_gcc_struct __anon1;
+struct __ecereNameSpace__ecere__com__DataValue expression;
+struct
+{
+const char * memberString;
+union
+{
+struct __ecereNameSpace__ecere__com__DataMember * member;
+struct __ecereNameSpace__ecere__com__Property * prop;
+struct __ecereNameSpace__ecere__com__Method * method;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct __anon2;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
struct __ecereNameSpace__ecere__com__DataMember
{
struct __ecereNameSpace__ecere__sys__OldList members;
struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
int memberOffset;
-int structAlignment;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
+short structAlignment;
+short pointerAlignment;
+} ecere_gcc_struct;
-struct __ecereNameSpace__ecere__com__SerialBuffer
+struct __ecereNameSpace__ecere__com__Class
{
-unsigned char * _buffer;
-unsigned int count;
-unsigned int _size;
-unsigned int pos;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__com__Class * prev;
+struct __ecereNameSpace__ecere__com__Class * next;
+const char * name;
+int offset;
+int structSize;
+void * * _vTbl;
+int vTblSize;
+unsigned int (* Constructor)(void * );
+void (* Destructor)(void * );
+int offsetClass;
+int sizeClass;
+struct __ecereNameSpace__ecere__com__Class * base;
+struct __ecereNameSpace__ecere__sys__BinaryTree methods;
+struct __ecereNameSpace__ecere__sys__BinaryTree members;
+struct __ecereNameSpace__ecere__sys__BinaryTree prop;
+struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
+struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
+struct __ecereNameSpace__ecere__sys__OldList derivatives;
+int memberID;
+int startMemberID;
+int type;
+struct __ecereNameSpace__ecere__com__Instance * module;
+struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
+const char * dataTypeString;
+struct Type * dataType;
+int typeSize;
+int defaultAlignment;
+void (* Initialize)();
+int memberOffset;
+struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
+const char * designerClass;
+unsigned int noExpansion;
+const char * defaultProperty;
+unsigned int comRedefinition;
+int count;
+int isRemote;
+unsigned int internalDecl;
+void * data;
+unsigned int computeSize;
+short structAlignment;
+short pointerAlignment;
+int destructionWatchOffset;
+unsigned int fixed;
+struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
+int inheritanceAccess;
+const char * fullName;
+void * symbol;
+struct __ecereNameSpace__ecere__sys__OldList conversions;
+struct __ecereNameSpace__ecere__sys__OldList templateParams;
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
+struct __ecereNameSpace__ecere__com__Class * templateClass;
+struct __ecereNameSpace__ecere__sys__OldList templatized;
+int numParams;
+unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
+} ecere_gcc_struct;
+
+static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleInfo;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
+static struct __ecereNameSpace__ecere__com__Class * __ecereClass_SymbolgenApp;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument
-{
-union
+static struct __ecereNameSpace__ecere__com__Class * FindAppClass(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, unsigned int thisModule)
{
-struct
+struct __ecereNameSpace__ecere__com__BTNamedLink * link;
+struct __ecereNameSpace__ecere__com__NameSpace * ns;
+
+for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*nameSpace).classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
{
-const char * dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-} __attribute__ ((gcc_struct)) __anon1;
-struct __ecereNameSpace__ecere__com__DataValue expression;
-struct
+struct __ecereNameSpace__ecere__com__Class * _class = link->data;
+
+if(strcmp(_class->fullName, "ecere::com::Application") && (!thisModule || _class->module == privateModule))
{
-const char * memberString;
-union
+struct __ecereNameSpace__ecere__com__Class * base;
+
+for(base = _class->base; base && base->type != 1000; base = base->base)
+if(!strcmp(base->fullName, "ecere::com::Application"))
+return _class;
+}
+}
+for(ns = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*nameSpace).nameSpaces); ns; ns = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)ns)))
{
-struct __ecereNameSpace__ecere__com__DataMember * member;
-struct __ecereNameSpace__ecere__com__Property * prop;
-struct __ecereNameSpace__ecere__com__Method * method;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__com__Class * _class = FindAppClass(ns, thisModule);
+if(_class)
+return _class;
+}
+return (((void *)0));
+}
-static unsigned int i18n;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
-static unsigned int outputPot;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
-static unsigned int disabledPooling;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
-static int targetPlatform;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
-static int targetBits;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
-static unsigned int isConsole;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
-static unsigned int isDynamicLibrary;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Map_TPL_ContextStringPair__ecere__com__List_TPL_String___;
-static unsigned int isStaticLibrary;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
-static struct __ecereNameSpace__ecere__sys__OldList modules;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_String_;
-static struct __ecereNameSpace__ecere__com__Instance * dcomSymbols;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
-struct __ecereNameSpace__ecere__sys__OldList _defines =
-{
-0, 0, 0, 0, 0
-};
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
-struct __ecereNameSpace__ecere__sys__OldList _imports =
-{
-0, 0, 0, 0, 0
-};
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
-struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
-{
-0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
-};
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
-
-struct __ecereNameSpace__ecere__com__NameSpace
-{
-const char * name;
-struct __ecereNameSpace__ecere__com__NameSpace * btParent;
-struct __ecereNameSpace__ecere__com__NameSpace * left;
-struct __ecereNameSpace__ecere__com__NameSpace * right;
-int depth;
-struct __ecereNameSpace__ecere__com__NameSpace * parent;
-struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
-struct __ecereNameSpace__ecere__sys__BinaryTree classes;
-struct __ecereNameSpace__ecere__sys__BinaryTree defines;
-struct __ecereNameSpace__ecere__sys__BinaryTree functions;
-} __attribute__ ((gcc_struct));
-
-static struct __ecereNameSpace__ecere__com__NameSpace globalData;
-
-static struct Context * theGlobalContext;
-
-static struct ModuleImport * mainModule;
-
-static struct __ecereNameSpace__ecere__com__Instance * privateModule;
-
-static char mainModuleName[797];
-
-static char projectName[797];
-
-extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
-
-extern char * __ecereNameSpace__ecere__sys__TrimLSpaces(const char * string, char * output);
-
-extern int strcmp(const char * , const char * );
-
-extern struct ModuleImport * GetMainModule(void);
-
-extern void SetMainModule(struct ModuleImport * moduleImport);
-
-extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
-
-struct MethodImport
-{
-struct MethodImport * prev;
-struct MethodImport * next;
-char * name;
-unsigned int isVirtual;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
-
-struct PropertyImport
-{
-struct PropertyImport * prev;
-struct PropertyImport * next;
-char * name;
-unsigned int isVirtual;
-unsigned int hasSet;
-unsigned int hasGet;
-} __attribute__ ((gcc_struct));
-
-extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
-
-struct FunctionImport
-{
-struct FunctionImport * prev;
-struct FunctionImport * next;
-char * name;
-} __attribute__ ((gcc_struct));
-
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_GetLine(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max);
-
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
-void * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindName(struct __ecereNameSpace__ecere__sys__OldList * this, const char * name, unsigned int warn);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__CustomAVLTree;
-extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Map;
static void LoadImports(const char * fileName)
{
}
}
-static struct __ecereNameSpace__ecere__com__Class * thisAppClass;
-
-struct ModuleInfo
+void __ecereCreateModuleInstances_ecs()
{
-struct ModuleInfo * prev, * next;
-char * name;
-unsigned int globalInstance;
-} __attribute__ ((gcc_struct));
-
-static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleInfo;
-
-extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
-
-extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
-
-extern char * strcpy(char * , const char * );
-
-extern void FixModuleName(char * moduleName);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
+(globalData.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString);
+theGlobalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
+}
-struct ImportedModule
+void __ecereDestroyModuleInstances_ecs()
{
-struct ImportedModule * prev;
-struct ImportedModule * next;
-char * name;
-int type;
-int importType;
-unsigned int globalInstance;
-unsigned int dllOnly;
-int importAccess;
-} __attribute__ ((gcc_struct));
-
-static void BindDCOMServer();
-
-static void BindDCOMClient();
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
+((theGlobalContext ? __extension__ ({
+void * __ecerePtrToDelete = (theGlobalContext);
-extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
-
-extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
-
-extern struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
-
-extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
-
-extern void FinishTemplatesContext(struct Context * context);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
+__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
+}) : 0), theGlobalContext = 0);
+}
-struct __ecereNameSpace__ecere__com__GlobalFunction
+static void BindDCOMClient()
{
-struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
-struct __ecereNameSpace__ecere__com__GlobalFunction * next;
-const char * name;
-int (* function)();
-struct __ecereNameSpace__ecere__com__Instance * module;
-struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
-const char * dataTypeString;
-struct Type * dataType;
-void * symbol;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
-
-extern int sprintf(char * , const char * , ...);
-
-extern void __ecereNameSpace__ecere__com__eInstance_Delete(struct __ecereNameSpace__ecere__com__Instance * instance);
-
-int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
-
-int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
-
-int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
-
-int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
+struct __ecereNameSpace__ecere__com__Class * dcomClientObjectClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMClientObject");
+struct __ecereNameSpace__ecere__sys__OldLink * deriv;
-int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
+if(dcomClientObjectClass && dcomClientObjectClass->derivatives.first)
+{
+struct __ecereNameSpace__ecere__com__Instance * f;
-int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
+if(!dcomSymbols)
+dcomSymbols = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
+f = dcomSymbols;
+for(deriv = dcomClientObjectClass->derivatives.first; deriv; deriv = deriv->next)
+{
+struct __ecereNameSpace__ecere__com__Class * _class = deriv->data;
+struct __ecereNameSpace__ecere__com__Method * method, * next;
+int id = 0;
+int vid;
+unsigned int doVirtual;
-static void WriteMain(const char * fileName)
+DeclareClass((((void *)0)), FindClass("ecere::net::DCOMClientObject"), "__ecereClass___ecereNameSpace__ecere__net__DCOMClientObject");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "class %s : ecere::net::DCOMClientObject\n", _class->fullName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
+if(_class->vTblSize > _class->base->vTblSize)
{
-struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
+int vid;
-if(f)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual void CallVirtualMethod(uint __ecereMethodID, SerialBuffer __ecereBuffer)\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " switch(__ecereMethodID)\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+for(vid = _class->base->vTblSize; vid < _class->vTblSize; vid++)
{
-struct ModuleImport * module;
-struct ModuleInfo * defModule;
-unsigned int anyMethod = 0, anyProp = 0, anyFunction = 0;
-struct ImportedModule * importedModule;
+struct __ecereNameSpace__ecere__com__Method * method;
-__ecereNameSpace__ecere__sys__GetLastDirectory(fileName, mainModuleName);
-__ecereNameSpace__ecere__sys__StripExtension(mainModuleName);
-if(!projectName[0])
+for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
{
-strcpy(projectName, mainModuleName);
-__ecereNameSpace__ecere__sys__StripExtension(projectName);
+if(method->type == 1 && method->_class == _class && method->vid == vid)
+break;
}
-FixModuleName(mainModuleName);
-if(targetPlatform == 1 && !isConsole && !isStaticLibrary && !isDynamicLibrary)
+if(method)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+struct Type * param;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef void * HINSTANCE;\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+method->dataType = ProcessTypeString(method->dataTypeString, 0);
+if(method->dataType && method->dataType->name)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " case %d:\n", vid - _class->base->vTblSize);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+{
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+{
+struct TypeName * resultType;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "#define WINAPI __stdcall\n");
+if(method->dataType->__anon1.__anon2.returnType->kind == 8)
+classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
+else
+{
+PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
-for(importedModule = _defines.first; importedModule; importedModule = importedModule->next)
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
+resultType = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(resultType, f, 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
+}
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-if(importedModule->type == 0)
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "import ");
-if(importedModule->importType == 1)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "static ", importedModule->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\"%s\"\n", importedModule->name);
-}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " char %s[1024];\n", param->name);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+DeclareClass((((void *)0)), FindClass("String"), "__ecereClass_String");
}
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+else
+{
+struct TypeName * paramTypeName;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static Module __currentModule;\n\n");
-if(!isStaticLibrary)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "Module __thisModule;\n\n");
-BindDCOMServer();
-BindDCOMClient();
-if(dcomSymbols)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereRegisterModule_%s(Module module);\n\n", mainModuleName);
-for(module = _imports.first; module; module = module->next)
-{
-struct ClassImport * _class;
-struct FunctionImport * function;
-
-if(module->importType == 1)
-{
+if(param->kind == 8)
+classSym = param->__anon1._class;
+else
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "bool __ecereDll_Load_%s(Module module);\n", module->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "bool __ecereDll_Unload_%s(Module module);\n", module->name);
+PrintTypeNoConst(param, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
+}
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(param, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier(param->name)));
+paramTypeName = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(paramTypeName, f, 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
}
}
-for(_class = module->classes.first; _class; _class = _class->next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-struct MethodImport * method;
-struct PropertyImport * prop;
-char className[1024] = "";
-struct __ecereNameSpace__ecere__com__Class * regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, _class->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(");
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
+{
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "(StaticString)");
+}
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-FullClassNameCat(className, _class->name, 1);
-if(_class->itself)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "Class __ecereClass_%s;\n", className);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, param->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereResult = ");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s(", method->name);
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
+if(param->prev)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-for(method = _class->methods.first; method; method = method->next)
+if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
{
-struct __ecereNameSpace__ecere__com__Method * meth = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, method->name, privateModule);
-
-if(meth && !meth->dataType)
+if(!strcmp(param->__anon1._class->string, "String"))
{
-struct Context * context = SetupTemplatesContext(regClass);
-
-meth->dataType = ProcessTypeString(meth->dataTypeString, 0);
-FinishTemplatesContext(context);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
}
-if(method->isVirtual)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "int __ecereVMethodID_%s_%s;\n", className, method->name);
-else if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1 && (!meth || !meth->dataType->dllExport))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "int (*__ecereMethod_%s_%s)();\n", className, method->name);
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
}
-anyMethod = 1;
}
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(__ecereResult);\n");
}
-for(prop = _class->properties.first; prop; prop = prop->next)
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-char propName[1024];
-
-propName[0] = (char)0;
-FullClassNameCat(propName, prop->name, 1);
-if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
+if(param->kind == 8 && strcmp(param->__anon1._class->string, "String") && param->__anon1._class->__anon1.registered && (param->__anon1._class->__anon1.registered->type == 0 || param->__anon1._class->__anon1.registered->type == 5))
{
-if(prop->hasSet)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereProp_%s_Set_%s;\n", className, propName);
-if(prop->hasGet)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereProp_%s_Get_%s;\n", className, propName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete %s;\n", param->name);
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "Property __ecereProp_%s_%s;\n", className, propName);
-anyProp = 1;
}
+if(method->dataType->__anon1.__anon2.returnType->kind == 8 && strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String") && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && (method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 0 || method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 5))
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereResult;\n");
}
}
-for(function = module->functions.first; function; function = function->next)
-{
-struct __ecereNameSpace__ecere__com__GlobalFunction * func = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, function->name);
-
-if(func && !func->dataType)
-func->dataType = ProcessTypeString(func->dataTypeString, 0);
-if(module->name && module->importType != 1 && (!func || !func->dataType || !func->dataType->dllExport))
-{
-char functionName[1024];
-
-functionName[0] = (char)0;
-FullClassNameCat(functionName, function->name, 0);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereFunction_%s;\n", functionName);
-anyFunction = 1;
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " break;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
}
}
}
-for(defModule = modules.first; defModule; defModule = defModule->next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+doVirtual = 1;
+id = 0;
+vid = _class->base->vTblSize;
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
+while(next && ((next->type == 1) != doVirtual || (doVirtual && next->vid != vid)))
{
-char moduleName[1024];
-
-strcpy(moduleName, defModule->name);
-FixModuleName(moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereRegisterModule_%s(Module module);\n", moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereUnregisterModule_%s(Module module);\n", moduleName);
-if(defModule->globalInstance)
+id++;
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)next));
+if(!next && doVirtual)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereCreateModuleInstances_%s();\n", moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereDestroyModuleInstances_%s();\n", moduleName);
+if(vid == _class->vTblSize)
+doVirtual = 0;
+else
+vid++;
+id = 0;
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
}
}
-if(dcomSymbols)
+for(method = next; method; method = next)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(dcomSymbols, 0, 0);
-while(!((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
+struct Type * param;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(dcomSymbols))
+if(!method->dataType)
+method->dataType = ProcessTypeString(method->dataTypeString, 0);
+if(method->dataType->name)
{
-char buffer[4096];
-int read = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(dcomSymbols, buffer, 1, sizeof (buffer));
-
-if(!read)
-break;
-((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+if(doVirtual)
+{
+char name[1024];
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(f, buffer, 1, read);
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+strcpy(name, "__ecereVMethodID_");
+FullClassNameCat(name, method->_class->fullName, 1);
+strcat(name, "_");
+strcat(name, method->name);
+DeclareMethod((((void *)0)), method, name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "virtual ");
}
-if(isStaticLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", method->dataTypeString);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+if(method->dataType)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\nbool __ecereDll_Load_%s(Module module)\n{\n", projectName);
-}
-else if(isDynamicLibrary)
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
-if(targetPlatform == 1)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+struct TypeName * resultType;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __stdcall __ecereDll_Load(Module module)\n{\n");
+if(method->dataType->__anon1.__anon2.returnType->kind == 8)
+classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
else
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __ecereDll_Load(Module module)\n{\n");
-}
-else if(targetPlatform == 1 && !isConsole)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\nint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, char * cmdLine, int show)\n{\n");
+PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
+resultType = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(resultType, f, 0);
+if(method->dataType->__anon1.__anon2.returnType->kind == 9)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = { 0 }");
+else if(method->dataType->__anon1.__anon2.returnType->kind == 8 && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " { }");
else
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\nint main(int _argc, char * _argv[])\n{\n");
-if(!isDynamicLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = 0");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n\n");
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref this;\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " int exitCode;\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " Module module;\n");
-}
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __attribute__((unused)) Class _class;\n");
-if(anyMethod)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " Method method;\n");
-if(anyProp)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " Property _property;\n");
-if(anyFunction)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " GlobalFunction function;\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
-if(disabledPooling)
+if(param->kind == 8)
+classSym = param->__anon1._class;
+else
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " eSystem_SetPoolingDisabled(true);\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
+PrintTypeNoConst(param, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
-if(isDynamicLibrary)
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(!__currentModule)\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __currentModule = module;\n");
-if(!isStaticLibrary)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = module;\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n\n");
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
}
-else if(targetPlatform == 1 && !isConsole)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = __currentModule = module = __ecere_COM_Initialize(1, 0, null);\n\n");
else
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = __currentModule = module = __ecere_COM_Initialize(1, _argc, (void *)_argv);\n\n");
-if(_imports.count)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
+}
+DeclareMethod((((void *)0)), __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMClientObject"), "CallMethod", privateModule), "__ecereMethod___ecereNameSpace__ecere__net__DCOMClientObject_CallMethod");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(DCOMClientObject::CallMethod(%d))\n", id++);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-for(module = _imports.first; module; module = module->next)
+if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
{
-if(module->name)
+if(!strcmp(param->__anon1._class->string, "String"))
+{
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize((StaticString)%s);\n", param->name);
+}
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(%s);\n", param->name);
+}
+}
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
+if(method->dataType->__anon1.__anon2.returnType->kind == 8 && !strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String"))
{
-if(module->importType == 1)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eModule_LoadStatic(module, \"%s\", %s, __ecereDll_Load_%s, __ecereDll_Unload_%s);\n", module->name, (module->importAccess == 2) ? "privateAccess" : "publicAccess", module->name, module->name);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize((StaticString)__ecereResult);\n");
+}
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eModule_Load(module, \"%s\", %s);\n", module->name, (module->importAccess == 2) ? "privateAccess" : "publicAccess");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(__ecereResult);\n");
}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Free();\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete this;\n");
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " return __ecereResult;\n");
}
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
}
-if(modules.count)
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method));
+while(next && ((next->type == 1) != doVirtual || (doVirtual && next->vid != vid)))
{
-for(defModule = modules.first; defModule; defModule = defModule->next)
+id++;
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)next));
+if(!next && doVirtual)
{
-char moduleName[1024];
-
-strcpy(moduleName, defModule->name);
-FixModuleName(moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereRegisterModule_%s(module);\n", moduleName);
+if(vid == _class->vTblSize)
+doVirtual = 0;
+else
+vid++;
+id = 0;
+next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
+}
}
+if(next)
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
-if(dcomSymbols)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereRegisterModule_%s(module);\n\n", mainModuleName);
-(__ecereNameSpace__ecere__com__eInstance_DecRef(dcomSymbols), dcomSymbols = 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
+if(deriv->next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+}
}
-if(isDynamicLibrary)
-{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+static void BindDCOMServer()
+{
+unsigned int mutexDeclared = 0;
+struct __ecereNameSpace__ecere__com__Class * _class;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
+for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
+{
+if(_class->isRemote == 3)
+break;
}
-for(module = _imports.first; module; module = module->next)
+if(_class)
{
-struct ClassImport * _class;
-struct FunctionImport * function;
+struct __ecereNameSpace__ecere__com__Instance * f;
-if(module->classes.count)
+if(!dcomSymbols)
+dcomSymbols = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
+f = dcomSymbols;
+DeclareClass((((void *)0)), FindClass("ecere::net::DCOMServerObject"), "__ecereClass___ecereNameSpace__ecere__net__DCOMServerObject");
+for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
{
-for(_class = module->classes.first; _class; _class = _class->next)
+if(_class->isRemote == 3)
{
-struct __ecereNameSpace__ecere__com__Class * regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, _class->name);
+struct __ecereNameSpace__ecere__com__Method * method;
+int id = 0;
+int vid;
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "class DCOM%s : ecere::net::DCOMServerObject\n", _class->fullName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual void CallMethod(uint __ecereMethodID, SerialBuffer __ecereBuffer)\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s inst = (%s)instance;\n", _class->fullName, _class->fullName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref inst;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " switch(__ecereMethodID)\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
{
-struct MethodImport * method;
-struct PropertyImport * prop;
-char classID[1024];
-char className[1024] = "";
+struct Type * param;
-FullClassNameCat(className, _class->name, 1);
-if(_class->itself)
-sprintf(classID, "__ecereClass_%s", className);
-else
-strcpy(classID, "_class");
-if(isDynamicLibrary && !isStaticLibrary)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = eSystem_FindClass(__currentModule, \"%s\");\n", classID, _class->name);
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = eSystem_FindClass(module, \"%s\");\n", classID, _class->name);
-for(method = _class->methods.first; method; method = method->next)
+method->dataType = ProcessTypeString(method->dataTypeString, 0);
+if(method->dataType && method->dataType->name)
{
-struct __ecereNameSpace__ecere__com__Method * meth = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, method->name, privateModule);
-
-if(!meth || !meth->dataType->dllExport)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " case %d:\n", id++);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
{
-if(method->isVirtual || ((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1))
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " method = eClass_FindMethod(%s, \"%s\", module);\n", classID, method->name);
-if(method->isVirtual)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(method) __ecereVMethodID_%s_%s = method.vid;\n", className, method->name);
+struct TypeName * resultType;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
+
+if(method->dataType->__anon1.__anon2.returnType->kind == 8)
+classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(method) __ecereMethod_%s_%s = method.function;\n", className, method->name);
-}
+{
+PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
+resultType = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(resultType, f, 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
}
-for(prop = _class->properties.first; prop; prop = prop->next)
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-char propName[1024];
-
-propName[0] = (char)0;
-FullClassNameCat(propName, prop->name, 1);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_%s = _property = eClass_FindProperty(%s, \"%s\", module);\n", className, propName, classID, prop->name);
-if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
{
-if(prop->hasSet)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_Set_%s = _property.Set;\n", className, propName);
-if(prop->hasGet)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_Get_%s = _property.Get;\n", className, propName);
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " char %s[1024];\n", param->name);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+DeclareClass((((void *)0)), FindClass("String"), "__ecereClass_String");
}
-}
-}
-if(module->functions.count)
-{
-for(function = module->functions.first; function; function = function->next)
-{
-struct __ecereNameSpace__ecere__com__GlobalFunction * func = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, function->name);
-
-if(module->name && module->importType != 1 && (!func || !func->dataType || !func->dataType->dllExport))
+else
{
-char functionName[1024];
+struct TypeName * paramTypeName;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-functionName[0] = (char)0;
-FullClassNameCat(functionName, function->name, 0);
-if(isDynamicLibrary && !isStaticLibrary)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " function = eSystem_FindFunction(__currentModule, \"%s\");\n", function->name);
+if(param->kind == 8)
+classSym = param->__anon1._class;
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " function = eSystem_FindFunction(module, \"%s\");\n", function->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(function) __ecereFunction_%s = function.function;\n", functionName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-}
+{
+PrintTypeNoConst(param, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(param, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier(param->name)));
+paramTypeName = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(paramTypeName, f, 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
}
}
-for(defModule = modules.first; defModule; defModule = defModule->next)
-if(defModule->globalInstance)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-if(!strcmp(defModule->name, "i18n"))
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereCreateModuleInstances_i18n();\n");
-}
-if(i18n)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(");
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
{
-if(isDynamicLibrary)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " LoadTranslatedStrings(\"%s\", \"%s\");\n", projectName, projectName);
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " LoadTranslatedStrings(null, \"%s\");\n", projectName);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "(StaticString)");
}
-if(isDynamicLibrary)
-{
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, param->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
}
-if(!isDynamicLibrary && thisAppClass)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereResult = ");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "((%s)instance).%s(", _class->fullName, method->name);
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " _class = eSystem_FindClass(__currentModule, \"%s\");\n", thisAppClass->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eInstance_Evolve((Instance *)&__currentModule, _class);\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __thisModule = __currentModule;\n");
+if(param->prev)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
}
-if(isDynamicLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
-}
-if(modules.count)
+if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
{
-for(defModule = modules.first; defModule; defModule = defModule->next)
-if(defModule->globalInstance)
+if(!strcmp(param->__anon1._class->string, "String"))
{
-char moduleName[1024];
-
-if(!strcmp(defModule->name, "i18n"))
-continue;
-strcpy(moduleName, defModule->name);
-FixModuleName(moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereCreateModuleInstances_%s();\n", moduleName);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
}
-if(isDynamicLibrary)
-{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
}
-if(!isDynamicLibrary && thisAppClass)
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ((void(*)(void *))(void *)__currentModule._vTbl[12])(__currentModule);\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(__ecereResult);\n");
}
-if(isDynamicLibrary)
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " return true;\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
-if(isStaticLibrary)
+if(param->kind == 8 && strcmp(param->__anon1._class->string, "String") && param->__anon1._class->__anon1.registered && (param->__anon1._class->__anon1.registered->type == 0 || param->__anon1._class->__anon1.registered->type == 5))
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\nbool __ecereDll_Unload_%s(Module module)\n{\n", projectName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete %s;\n", param->name);
}
-else
+}
+if(method->dataType->__anon1.__anon2.returnType->kind == 8 && strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String") && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && (method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 0 || method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 5))
{
-if(targetPlatform == 1)
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __stdcall __ecereDll_Unload(Module module)\n{\n");
-else
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __ecereDll_Unload(Module module)\n{\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereResult;\n");
}
}
-if(isDynamicLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " break;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+}
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete inst;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+for(vid = _class->base->vTblSize; vid < _class->vTblSize; vid++)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+struct __ecereNameSpace__ecere__com__Method * method;
+struct Type * param;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
+for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
+if(method->type == 1 && method->_class == _class && method->vid == vid)
+break;
+if(method)
+{
+if(!mutexDeclared)
+{
+DeclareClass((((void *)0)), FindClass("ecere::sys::Mutex"), "__ecereClass___ecereNameSpace__ecere__sys__Mutex");
+DeclareMethod((((void *)0)), __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::sys::Mutex"), "Wait", privateModule), "__ecereMethod___ecereNameSpace__ecere__sys__Mutex_Wait");
+DeclareMethod((((void *)0)), __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::sys::Mutex"), "Release", privateModule), "__ecereMethod___ecereNameSpace__ecere__sys__Mutex_Release");
+mutexDeclared = 1;
}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+if(!method->dataType)
+method->dataType = ProcessTypeString(method->dataTypeString, 0);
+if(method->dataType->name)
{
-unsigned int destroyI18n = 0;
-
-if(modules.count)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual %s\n", method->dataTypeString);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+if(method->dataType)
{
-for(defModule = modules.first; defModule; defModule = defModule->next)
-if(defModule->globalInstance)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " DCOM%s __ecereObject = (void *)_vTbl[-1];\n", _class->fullName);
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
-char moduleName[1024];
+struct TypeName * resultType;
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-if(!strcmp(defModule->name, "i18n"))
+if(method->dataType->__anon1.__anon2.returnType->kind == 8)
+classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
+else
{
-destroyI18n = 1;
-continue;
-}
-strcpy(moduleName, defModule->name);
-FixModuleName(moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereDestroyModuleInstances_%s();\n", moduleName);
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
-if(i18n)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " UnloadTranslatedStrings(\"%s\");\n", projectName);
-if(destroyI18n)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereDestroyModuleInstances_i18n();\n");
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
+decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
+resultType = MkTypeName(specs, decl);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
+OutputTypeName(resultType, f, 0);
+if(method->dataType->__anon1.__anon2.returnType->kind == 9)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = { 0 }");
+else if(method->dataType->__anon1.__anon2.returnType->kind == 8 && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " { }");
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = 0");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n\n");
}
-if(isDynamicLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref __ecereObject;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereMethod___ecereNameSpace__ecere__sys__Mutex_Wait(__ecereObject.mutex);\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
{
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+char type[1024] = "";
+char className[1024];
+struct Symbol * classSym;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
-if(isDynamicLibrary)
+if(param->kind == 8)
+classSym = param->__anon1._class;
+else
{
+PrintTypeNoConst(param, type, 0, 1);
+classSym = FindClass(type);
+type[0] = 0;
}
-if(modules.count)
-{
-for(defModule = modules.first; defModule; defModule = defModule->next)
+strcpy(className, "__ecereClass_");
+FullClassNameCat(className, classSym->string, 1);
+DeclareClass((((void *)0)), classSym, className);
+if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
{
-char moduleName[1024];
-
-strcpy(moduleName, defModule->name);
-FixModuleName(moduleName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereUnregisterModule_%s(module);\n", moduleName);
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.argsBuffer.Serialize((StaticString)%s);\n", param->name);
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.argsBuffer.Serialize(%s);\n", param->name);
}
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+DeclareMethod((((void *)0)), __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMServerObject"), "CallVirtualMethod", privateModule), "__ecereMethod___ecereNameSpace__ecere__net__DCOMServerObject_CallVirtualMethod");
+{
+unsigned int hasReturnValue = method->dataType->__anon1.__anon2.returnType->kind != 0;
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
+if(!hasReturnValue)
+{
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
+{
+if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
+{
+hasReturnValue = 1;
+break;
+}
+}
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(__ecereObject.CallVirtualMethod(%d, %s))\n", vid - _class->base->vTblSize, hasReturnValue ? "true" : "false");
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
+{
+if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
+{
+if(!strcmp(param->__anon1._class->string, "String"))
+{
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize((StaticString)%s);\n", param->name);
+}
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize(%s);\n", param->name);
+}
+}
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+{
+if(method->dataType->__anon1.__anon2.returnType->kind == 8 && !strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String"))
+{
+DeclareClass((((void *)0)), FindClass("StaticString"), "__ecereClass_StaticString");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize((StaticString)__ecereResult);\n");
+}
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize(__ecereResult);\n");
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " else\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ((%s)this).%s::%s(", _class->fullName, _class->fullName, method->name);
+for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
+if(param->next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Free();\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereMethod___ecereNameSpace__ecere__sys__Mutex_Release(__ecereObject.mutex);\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereObject;\n");
+if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " return __ecereResult;\n");
+}
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
+}
+}
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
+}
+}
+}
+}
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __currentModule = (void *)0;\n");
-if(!isStaticLibrary)
+struct __ecereNameSpace__ecere__com__GlobalFunction;
+
+extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
+
+struct __ecereNameSpace__ecere__com__GlobalFunction
+{
+struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
+struct __ecereNameSpace__ecere__com__GlobalFunction * next;
+const char * name;
+int (* function)();
+struct __ecereNameSpace__ecere__com__Instance * module;
+struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
+const char * dataTypeString;
+struct Type * dataType;
+void * symbol;
+} ecere_gcc_struct;
+
+static void WriteMain(const char * fileName)
+{
+struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
+
+if(f)
+{
+struct ModuleImport * module;
+struct ModuleInfo * defModule;
+unsigned int anyMethod = 0, anyProp = 0, anyFunction = 0;
+struct ImportedModule * importedModule;
+
+__ecereNameSpace__ecere__sys__GetLastDirectory(fileName, mainModuleName);
+__ecereNameSpace__ecere__sys__StripExtension(mainModuleName);
+if(!projectName[0])
+{
+strcpy(projectName, mainModuleName);
+__ecereNameSpace__ecere__sys__StripExtension(projectName);
+}
+FixModuleName(mainModuleName);
+if(targetPlatform == 1 && !isConsole && !isStaticLibrary && !isDynamicLibrary)
{
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__thisModule == module)\n");
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef void * HINSTANCE;\n");
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = (void *)0;\n");
-}
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "#define WINAPI __stdcall\n");
}
-if(!isDynamicLibrary)
+for(importedModule = _defines.first; importedModule; importedModule = importedModule->next)
+{
+if(importedModule->type == 0)
{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "import ");
+if(importedModule->importType == 1)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "static ", importedModule->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\"%s\"\n", importedModule->name);
+}
+}
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n _class = eSystem_FindClass(__currentModule, \"ecere::com::Application\");\n exitCode = ((ecere::com::Application)__currentModule).exitCode;\n delete __currentModule;\n return exitCode;\n");
-}
-else
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " return true;\n");
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static Module __currentModule;\n\n");
+if(!isStaticLibrary)
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
-__ecereNameSpace__ecere__com__eInstance_Delete(f);
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "Module __thisModule;\n\n");
+BindDCOMServer();
+BindDCOMClient();
+if(dcomSymbols)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereRegisterModule_%s(Module module);\n\n", mainModuleName);
+for(module = _imports.first; module; module = module->next)
+{
+struct ClassImport * _class;
+struct FunctionImport * function;
+
+if(module->importType == 1)
+{
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "bool __ecereDll_Load_%s(Module module);\n", module->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "bool __ecereDll_Unload_%s(Module module);\n", module->name);
}
}
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
-
-struct __ecereNameSpace__ecere__com__BTNamedLink
+for(_class = module->classes.first; _class; _class = _class->next)
{
-const char * name;
-struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
-struct __ecereNameSpace__ecere__com__BTNamedLink * left;
-struct __ecereNameSpace__ecere__com__BTNamedLink * right;
-int depth;
-void * data;
-} __attribute__ ((gcc_struct));
-
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
-
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
+struct MethodImport * method;
+struct PropertyImport * prop;
+char className[1024] = "";
+struct __ecereNameSpace__ecere__com__Class * regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, _class->name);
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
+FullClassNameCat(className, _class->name, 1);
+if(_class->itself)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "Class __ecereClass_%s;\n", className);
+{
+{
+for(method = _class->methods.first; method; method = method->next)
+{
+struct __ecereNameSpace__ecere__com__Method * meth = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, method->name, privateModule);
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
+if(meth && !meth->dataType)
+{
+struct Context * context = SetupTemplatesContext(regClass);
-static struct __ecereNameSpace__ecere__com__Class * FindAppClass(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, unsigned int thisModule)
+meth->dataType = ProcessTypeString(meth->dataTypeString, 0);
+FinishTemplatesContext(context);
+}
+if(method->isVirtual)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "int __ecereVMethodID_%s_%s;\n", className, method->name);
+else if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1 && (!meth || !meth->dataType->dllExport))
{
-struct __ecereNameSpace__ecere__com__BTNamedLink * link;
-struct __ecereNameSpace__ecere__com__NameSpace * ns;
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "int (*__ecereMethod_%s_%s)();\n", className, method->name);
+}
+anyMethod = 1;
+}
+}
+for(prop = _class->properties.first; prop; prop = prop->next)
+{
+char propName[1024];
-for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*nameSpace).classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
+propName[0] = 0;
+FullClassNameCat(propName, prop->name, 1);
+if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
{
-struct __ecereNameSpace__ecere__com__Class * _class = link->data;
+if(prop->hasSet)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereProp_%s_Set_%s;\n", className, propName);
+if(prop->hasGet)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereProp_%s_Get_%s;\n", className, propName);
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "Property __ecereProp_%s_%s;\n", className, propName);
+anyProp = 1;
+}
+}
+}
+for(function = module->functions.first; function; function = function->next)
+{
+struct __ecereNameSpace__ecere__com__GlobalFunction * func = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, function->name);
-if(strcmp(_class->fullName, "ecere::com::Application") && (!thisModule || _class->module == privateModule))
+if(func && !func->dataType)
+func->dataType = ProcessTypeString(func->dataTypeString, 0);
+if(module->name && module->importType != 1 && (!func || !func->dataType || !func->dataType->dllExport))
{
-struct __ecereNameSpace__ecere__com__Class * base;
+char functionName[1024];
-for(base = _class->base; base && base->type != 1000; base = base->base)
-if(!strcmp(base->fullName, "ecere::com::Application"))
-return _class;
+functionName[0] = 0;
+FullClassNameCat(functionName, function->name, 0);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereFunction_%s;\n", functionName);
+anyFunction = 1;
}
}
-for(ns = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*nameSpace).nameSpaces); ns; ns = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)ns)))
+}
+for(defModule = modules.first; defModule; defModule = defModule->next)
{
-struct __ecereNameSpace__ecere__com__Class * _class = FindAppClass(ns, thisModule);
+char moduleName[1024];
-if(_class)
-return _class;
+strcpy(moduleName, defModule->name);
+FixModuleName(moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereRegisterModule_%s(Module module);\n", moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereUnregisterModule_%s(Module module);\n", moduleName);
+if(defModule->globalInstance)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereCreateModuleInstances_%s();\n", moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void __ecereDestroyModuleInstances_%s();\n", moduleName);
}
-return (((void *)0));
}
+if(dcomSymbols)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(dcomSymbols, 0, 0);
+while(!((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
-struct __ecereNameSpace__ecere__com__Module
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(dcomSymbols))
{
-struct __ecereNameSpace__ecere__com__Instance * application;
-struct __ecereNameSpace__ecere__sys__OldList classes;
-struct __ecereNameSpace__ecere__sys__OldList defines;
-struct __ecereNameSpace__ecere__sys__OldList functions;
-struct __ecereNameSpace__ecere__sys__OldList modules;
-struct __ecereNameSpace__ecere__com__Instance * prev;
-struct __ecereNameSpace__ecere__com__Instance * next;
-const char * name;
-void * library;
-void * Unload;
-int importType;
-int origImportType;
-struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
-struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
+char buffer[4096];
+int read = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = dcomSymbols;
-struct __ecereNameSpace__ecere__com__SubModule
-{
-struct __ecereNameSpace__ecere__com__SubModule * prev;
-struct __ecereNameSpace__ecere__com__SubModule * next;
-struct __ecereNameSpace__ecere__com__Instance * module;
-int importMode;
-} __attribute__ ((gcc_struct));
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(dcomSymbols, buffer, 1, sizeof (buffer));
-static struct __ecereNameSpace__ecere__com__Class * SearchAppClass_Module(struct __ecereNameSpace__ecere__com__Instance * module)
-{
-struct __ecereNameSpace__ecere__com__Class * appClass;
-struct __ecereNameSpace__ecere__com__SubModule * subModule;
+if(!read)
+break;
+((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-appClass = FindAppClass(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, 0);
-if(appClass)
-return appClass;
-appClass = FindAppClass(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace, 0);
-if(appClass)
-return appClass;
-for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
-{
-appClass = SearchAppClass_Module(subModule->module);
-if(appClass)
-return appClass;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(f, buffer, 1, read);
}
-return (((void *)0));
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+if(isStaticLibrary)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\nbool __ecereDll_Load_%s(Module module)\n{\n", projectName);
}
+else if(isDynamicLibrary)
+{
+if(targetPlatform == 1)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __stdcall __ecereDll_Load(Module module)\n{\n");
+else
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-struct __ecereNameSpace__ecere__sys__OldLink
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __ecereDll_Load(Module module)\n{\n");
+}
+else if(targetPlatform == 1 && !isConsole)
{
-struct __ecereNameSpace__ecere__sys__OldLink * prev;
-struct __ecereNameSpace__ecere__sys__OldLink * next;
-void * data;
-} __attribute__ ((gcc_struct));
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void DeclareClass(struct Symbol * classSym, const char * className);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\nint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, char * cmdLine, int show)\n{\n");
+}
+else
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct Symbol * FindClass(const char * name);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\nint main(int _argc, char * _argv[])\n{\n");
+if(!isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " int exitCode;\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " Module module;\n");
+}
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __attribute__((unused)) Class _class;\n");
+if(anyMethod)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __attribute__((unused)) Method method;\n");
+if(anyProp)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __attribute__((unused)) Property _property;\n");
+if(anyFunction)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct Identifier * MkIdentifier(const char * string);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __attribute__((unused)) GlobalFunction function;\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
+if(disabledPooling)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " eSystem_SetPoolingDisabled(true);\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern char * strcat(char * , const char * );
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(!__currentModule)\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-static void BindDCOMClient()
-{
-struct __ecereNameSpace__ecere__com__Class * dcomClientObjectClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMClientObject");
-struct __ecereNameSpace__ecere__sys__OldLink * deriv;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __currentModule = module;\n");
+if(!isStaticLibrary)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-if(dcomClientObjectClass && dcomClientObjectClass->derivatives.first)
-{
-struct __ecereNameSpace__ecere__com__Instance * f;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = module;\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-if(!dcomSymbols)
-dcomSymbols = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
-f = dcomSymbols;
-for(deriv = dcomClientObjectClass->derivatives.first; deriv; deriv = deriv->next)
-{
-struct __ecereNameSpace__ecere__com__Class * _class = deriv->data;
-struct __ecereNameSpace__ecere__com__Method * method, * next;
-int id = 0;
-int vid;
-unsigned int doVirtual;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n\n");
+}
+else if(targetPlatform == 1 && !isConsole)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-DeclareClass(FindClass("ecere::net::DCOMClientObject"), "__ecereClass___ecereNameSpace__ecere__net__DCOMClientObject");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "class %s : ecere::net::DCOMClientObject\n", _class->fullName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
-if(_class->vTblSize > _class->base->vTblSize)
-{
-int vid;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = __currentModule = module = __ecere_COM_Initialize(1, 0, null);\n\n");
+else
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual void CallVirtualMethod(uint __ecereMethodID, SerialBuffer __ecereBuffer)\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " switch(__ecereMethodID)\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-for(vid = _class->base->vTblSize; vid < _class->vTblSize; vid++)
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = __currentModule = module = __ecere_COM_Initialize(1, _argc, (void *)_argv);\n\n");
+if(_imports.count)
{
-struct __ecereNameSpace__ecere__com__Method * method;
-
-for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
+for(module = _imports.first; module; module = module->next)
{
-if(method->type == 1 && method->_class == _class && method->vid == vid)
-break;
-}
-if(method)
+if(module->name)
{
-struct Type * param;
-
-method->dataType = ProcessTypeString(method->dataTypeString, 0);
-if(method->dataType && method->dataType->name)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " case %d:\n", vid - _class->base->vTblSize);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
+if(module->importType == 1)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eModule_LoadStatic(module, \"%s\", %s, __ecereDll_Load_%s, __ecereDll_Unload_%s);\n", module->name, (module->importAccess == 2) ? "privateAccess" : "publicAccess", module->name, module->name);
+else
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eModule_Load(module, \"%s\", %s);\n", module->name, (module->importAccess == 2) ? "privateAccess" : "publicAccess");
+}
+}
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+if(modules.count)
{
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+for(defModule = modules.first; defModule; defModule = defModule->next)
{
-struct TypeName * resultType;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
+char moduleName[1024];
-if(method->dataType->__anon1.__anon2.returnType->kind == 8)
-classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
-else
-{
-PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
+strcpy(moduleName, defModule->name);
+FixModuleName(moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereRegisterModule_%s(module);\n", moduleName);
}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
-resultType = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(resultType, f, 0);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
+if(dcomSymbols)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " char %s[1024];\n", param->name);
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-DeclareClass(FindClass("String"), "__ecereClass_String");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereRegisterModule_%s(module);\n\n", mainModuleName);
+(__ecereNameSpace__ecere__com__eInstance_DecRef(dcomSymbols), dcomSymbols = 0);
}
-else
+if(isDynamicLibrary)
{
-struct TypeName * paramTypeName;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-if(param->kind == 8)
-classSym = param->__anon1._class;
-else
-{
-PrintTypeNoConst(param, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(param, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier(param->name)));
-paramTypeName = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(paramTypeName, f, 0);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(");
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "(StaticString)");
-}
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, param->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereResult = ");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s(", method->name);
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->prev)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
-{
-if(!strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
-}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
-}
-}
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(__ecereResult);\n");
-}
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && strcmp(param->__anon1._class->string, "String") && param->__anon1._class->__anon1.registered && (param->__anon1._class->__anon1.registered->type == 0 || param->__anon1._class->__anon1.registered->type == 5))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete %s;\n", param->name);
-}
-}
-if(method->dataType->__anon1.__anon2.returnType->kind == 8 && strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String") && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && (method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 0 || method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 5))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereResult;\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " break;\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-}
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-}
-doVirtual = 1;
-id = 0;
-vid = _class->base->vTblSize;
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
-while(next && ((next->type == 1) != doVirtual || (doVirtual && next->vid != vid)))
-{
-id++;
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)next));
-if(!next && doVirtual)
-{
-if(vid == _class->vTblSize)
-doVirtual = 0;
-else
-vid++;
-id = 0;
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
-}
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
}
-for(method = next; method; method = next)
+for(module = _imports.first; module; module = module->next)
{
-struct Type * param;
+struct ClassImport * _class;
+struct FunctionImport * function;
-if(!method->dataType)
-method->dataType = ProcessTypeString(method->dataTypeString, 0);
-if(method->dataType->name)
+if(module->classes.count)
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-if(doVirtual)
+for(_class = module->classes.first; _class; _class = _class->next)
{
-char name[1024];
+struct __ecereNameSpace__ecere__com__Class * regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, _class->name);
-strcpy(name, "__ecereVMethodID_");
-FullClassNameCat(name, method->_class->fullName, 1);
-strcat(name, "_");
-strcat(name, method->name);
-DeclareMethod(method, name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "virtual ");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", method->dataTypeString);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-if(method->dataType)
-{
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
{
-struct TypeName * resultType;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
+struct MethodImport * method;
+struct PropertyImport * prop;
+char classID[1024];
+char className[1024] = "";
-if(method->dataType->__anon1.__anon2.returnType->kind == 8)
-classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
+FullClassNameCat(className, _class->name, 1);
+if(_class->itself)
+sprintf(classID, "__ecereClass_%s", className);
else
-{
-PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
-resultType = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(resultType, f, 0);
-if(method->dataType->__anon1.__anon2.returnType->kind == 9)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = { 0 }");
-else if(method->dataType->__anon1.__anon2.returnType->kind == 8 && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " { }");
+strcpy(classID, "_class");
+if(isDynamicLibrary && !isStaticLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = eSystem_FindClass(__currentModule, \"%s\");\n", classID, _class->name);
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = 0");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n\n");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref this;\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = eSystem_FindClass(module, \"%s\");\n", classID, _class->name);
+for(method = _class->methods.first; method; method = method->next)
{
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
+struct __ecereNameSpace__ecere__com__Method * meth = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, method->name, privateModule);
-if(param->kind == 8)
-classSym = param->__anon1._class;
-else
+if(!meth || !meth->dataType->dllExport)
{
-PrintTypeNoConst(param, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
+if(method->isVirtual || ((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1))
{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
-}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " method = eClass_FindMethod(%s, \"%s\", module);\n", classID, method->name);
+if(method->isVirtual)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(method) __ecereVMethodID_%s_%s = method.vid;\n", className, method->name);
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
-}
-DeclareMethod(__ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMClientObject"), "CallMethod", privateModule), "__ecereMethod___ecereNameSpace__ecere__net__DCOMClientObject_CallMethod");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(DCOMClientObject::CallMethod(%d))\n", id++);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
-{
-if(!strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize((StaticString)%s);\n", param->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(method) __ecereMethod_%s_%s = method.function;\n", className, method->name);
}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(%s);\n", param->name);
}
}
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
+for(prop = _class->properties.first; prop; prop = prop->next)
{
-if(method->dataType->__anon1.__anon2.returnType->kind == 8 && !strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String"))
+char propName[1024];
+
+propName[0] = 0;
+FullClassNameCat(propName, prop->name, 1);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_%s = _property = eClass_FindProperty(%s, \"%s\", module);\n", className, propName, classID, prop->name);
+if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize((StaticString)__ecereResult);\n");
+if(prop->hasSet)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_Set_%s = _property.Set;\n", className, propName);
+if(prop->hasGet)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_Get_%s = _property.Get;\n", className, propName);
}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(__ecereResult);\n");
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Free();\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete this;\n");
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " return __ecereResult;\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
}
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method));
-while(next && ((next->type == 1) != doVirtual || (doVirtual && next->vid != vid)))
+if(module->functions.count)
{
-id++;
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)next));
-if(!next && doVirtual)
+for(function = module->functions.first; function; function = function->next)
{
-if(vid == _class->vTblSize)
-doVirtual = 0;
+struct __ecereNameSpace__ecere__com__GlobalFunction * func = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, function->name);
+
+if(module->name && module->importType != 1 && (!func || !func->dataType || !func->dataType->dllExport))
+{
+char functionName[1024];
+
+functionName[0] = 0;
+FullClassNameCat(functionName, function->name, 0);
+if(isDynamicLibrary && !isStaticLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " function = eSystem_FindFunction(__currentModule, \"%s\");\n", function->name);
else
-vid++;
-id = 0;
-next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods);
-}
-}
-if(next)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " function = eSystem_FindFunction(module, \"%s\");\n", function->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(function) __ecereFunction_%s = function.function;\n", functionName);
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
-if(deriv->next)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
}
}
-
-static void BindDCOMServer()
+for(defModule = modules.first; defModule; defModule = defModule->next)
+if(defModule->globalInstance)
{
-unsigned int mutexDeclared = 0;
-struct __ecereNameSpace__ecere__com__Class * _class;
-
-for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + 24)))->classes.first; _class; _class = _class->next)
-{
-if(_class->isRemote == 3)
-break;
-}
-if(_class)
-{
-struct __ecereNameSpace__ecere__com__Instance * f;
-
-if(!dcomSymbols)
-dcomSymbols = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
-f = dcomSymbols;
-DeclareClass(FindClass("ecere::net::DCOMServerObject"), "__ecereClass___ecereNameSpace__ecere__net__DCOMServerObject");
-for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + structSize_Instance)))->classes.first; _class; _class = _class->next)
-{
-if(_class->isRemote == 3)
-{
-struct __ecereNameSpace__ecere__com__Method * method;
-int id = 0;
-int vid;
-
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "class DCOM%s : ecere::net::DCOMServerObject\n", _class->fullName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual void CallMethod(uint __ecereMethodID, SerialBuffer __ecereBuffer)\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s inst = (%s)instance;\n", _class->fullName, _class->fullName);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref inst;\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " switch(__ecereMethodID)\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
-{
-struct Type * param;
-
-method->dataType = ProcessTypeString(method->dataTypeString, 0);
-if(method->dataType && method->dataType->name)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " case %d:\n", id++);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-{
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-struct TypeName * resultType;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
-
-if(method->dataType->__anon1.__anon2.returnType->kind == 8)
-classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
-else
-{
-PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
-resultType = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(resultType, f, 0);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
-}
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " char %s[1024];\n", param->name);
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-DeclareClass(FindClass("String"), "__ecereClass_String");
-}
-else
-{
-struct TypeName * paramTypeName;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
-
-if(param->kind == 8)
-classSym = param->__anon1._class;
-else
-{
-PrintTypeNoConst(param, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(param, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier(param->name)));
-paramTypeName = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(paramTypeName, f, 0);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Unserialize(");
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "(StaticString)");
-}
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-
-__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, param->name);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereResult = ");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "((%s)instance).%s(", _class->fullName, method->name);
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->prev)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
-{
-if(!strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize((StaticString)%s);\n", param->name);
-}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(%s);\n", param->name);
-}
-}
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereBuffer.Serialize(__ecereResult);\n");
-}
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && strcmp(param->__anon1._class->string, "String") && param->__anon1._class->__anon1.registered && (param->__anon1._class->__anon1.registered->type == 0 || param->__anon1._class->__anon1.registered->type == 5))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete %s;\n", param->name);
-}
-}
-if(method->dataType->__anon1.__anon2.returnType->kind == 8 && strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String") && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && (method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 0 || method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 5))
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereResult;\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " break;\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete inst;\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-for(vid = _class->base->vTblSize; vid < _class->vTblSize; vid++)
-{
-struct __ecereNameSpace__ecere__com__Method * method;
-struct Type * param;
-
-for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
-if(method->type == 1 && method->_class == _class && method->vid == vid)
-break;
-if(method)
-{
-if(!mutexDeclared)
-{
-DeclareClass(FindClass("ecere::sys::Mutex"), "__ecereClass___ecereNameSpace__ecere__sys__Mutex");
-DeclareMethod(__ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::sys::Mutex"), "Wait", privateModule), "__ecereMethod___ecereNameSpace__ecere__sys__Mutex_Wait");
-DeclareMethod(__ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::sys::Mutex"), "Release", privateModule), "__ecereMethod___ecereNameSpace__ecere__sys__Mutex_Release");
-mutexDeclared = 1;
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
-if(!method->dataType)
-method->dataType = ProcessTypeString(method->dataTypeString, 0);
-if(method->dataType->name)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " virtual %s\n", method->dataTypeString);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-if(method->dataType)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " DCOM%s __ecereObject = (void *)_vTbl[-1];\n", _class->fullName);
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-struct TypeName * resultType;
-struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
-struct Declarator * decl;
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
-
-if(method->dataType->__anon1.__anon2.returnType->kind == 8)
-classSym = method->dataType->__anon1.__anon2.returnType->__anon1._class;
-else
-{
-PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-PrintType(method->dataType->__anon1.__anon2.returnType, type, 1, 1);
-decl = SpecDeclFromString(type, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereResult")));
-resultType = MkTypeName(specs, decl);
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
-OutputTypeName(resultType, f, 0);
-if(method->dataType->__anon1.__anon2.returnType->kind == 9)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = { 0 }");
-else if(method->dataType->__anon1.__anon2.returnType->kind == 8 && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && method->dataType->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " { }");
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " = 0");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";\n\n");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " incref __ecereObject;\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereMethod___ecereNameSpace__ecere__sys__Mutex_Wait(__ecereObject.mutex);\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-char type[1024] = "";
-char className[1024];
-struct Symbol * classSym;
-
-if(param->kind == 8)
-classSym = param->__anon1._class;
-else
-{
-PrintTypeNoConst(param, type, 0, 1);
-classSym = FindClass(type);
-type[0] = (char)0;
-}
-strcpy(className, "__ecereClass_");
-FullClassNameCat(className, classSym->string, 1);
-DeclareClass(classSym, className);
-if(param->kind == 8 && !strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.argsBuffer.Serialize((StaticString)%s);\n", param->name);
-}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.argsBuffer.Serialize(%s);\n", param->name);
-}
-DeclareMethod(__ecereNameSpace__ecere__com__eClass_FindMethod(__ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::net::DCOMServerObject"), "CallVirtualMethod", privateModule), "__ecereMethod___ecereNameSpace__ecere__net__DCOMServerObject_CallVirtualMethod");
-{
-unsigned int hasReturnValue = method->dataType->__anon1.__anon2.returnType->kind != 0;
-
-if(!hasReturnValue)
-{
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
-{
-hasReturnValue = 1;
-break;
-}
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " if(__ecereObject.CallVirtualMethod(%d, %s))\n", vid - _class->base->vTblSize, hasReturnValue ? "true" : "false");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " {\n");
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-if(param->kind == 8 && ((param->__anon1._class && param->__anon1._class->__anon1.registered && param->__anon1._class->__anon1.registered->type == 1) || !strcmp(param->__anon1._class->string, "String")) && !param->constant)
-{
-if(!strcmp(param->__anon1._class->string, "String"))
-{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize((StaticString)%s);\n", param->name);
-}
-else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize(%s);\n", param->name);
-}
+if(!strcmp(defModule->name, "i18n"))
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereCreateModuleInstances_i18n();\n");
}
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-if(method->dataType->__anon1.__anon2.returnType->kind == 8 && !strcmp(method->dataType->__anon1.__anon2.returnType->__anon1._class->string, "String"))
+if(i18n)
{
-DeclareClass(FindClass("StaticString"), "__ecereClass_StaticString");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize((StaticString)__ecereResult);\n");
-}
+if(isDynamicLibrary)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " LoadTranslatedStrings(\"%s\", \"%s\");\n", projectName, projectName);
else
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Unserialize(__ecereResult);\n");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " else\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ((%s)this).%s::%s(", _class->fullName, _class->fullName, method->name);
-for(param = method->dataType->__anon1.__anon2.params.first; param; param = param->next)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s", param->name);
-if(param->next)
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ", ");
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ");\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereObject.returnBuffer.Free();\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereMethod___ecereNameSpace__ecere__sys__Mutex_Release(__ecereObject.mutex);\n");
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " delete __ecereObject;\n");
-if(method->dataType->__anon1.__anon2.returnType->kind != 0)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " return __ecereResult;\n");
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " }\n");
-}
-}
-}
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
-}
-}
-}
-}
-
-static struct __ecereNameSpace__ecere__com__Class * __ecereClass_SymbolgenApp;
-
-extern int GetHostBits(void);
-
-extern void SetSymbolsDir(const char * s);
-
-extern int printf(const char * , ...);
-
-extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
-
-extern char * __ecereNameSpace__ecere__sys__GetExtension(const char * string, char * output);
-
-extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
-
-extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
-
-extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
-
-extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
-
-extern void SetGlobalContext(struct Context * context);
-
-extern void SetTopContext(struct Context * context);
-
-extern void SetCurrentContext(struct Context * context);
-
-extern void SetTargetPlatform(int platform);
-
-extern void SetTargetBits(int bits);
-
-extern void SetInSymbolGen(unsigned int b);
-
-extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
-
-extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__IteratorPointer;
-
-struct __ecereNameSpace__ecere__com__IteratorPointer;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__MapIterator;
-
-struct __ecereNameSpace__ecere__com__MapIterator
-{
-struct __ecereNameSpace__ecere__com__Instance * container;
-struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
-} __attribute__ ((gcc_struct));
-
-extern int __ecereNameSpace__ecere__sys__Tokenize(char * string, int maxTokens, char * tokens[], unsigned int esc);
-
-extern int strcasecmp(const char * , const char * );
-
-extern unsigned int LoadSymbols(const char * fileName, int importType, unsigned int loadDllOnly);
-
-extern void CheckDataRedefinitions(void);
-
-extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
-
-extern char * strstr(const char * , const char * );
-
-extern size_t strlen(const char * );
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ContextStringPair;
-
-struct ContextStringPair
-{
-char * string;
-char * context;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Iterator;
-
-struct __ecereNameSpace__ecere__com__Iterator
-{
-struct __ecereNameSpace__ecere__com__Instance * container;
-struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
-} __attribute__ ((gcc_struct));
-
-extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
-
-extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
-
-extern void FreeContext(struct Context * context);
-
-extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Definition;
-
-struct Definition;
-
-extern void FreeModuleDefine(struct Definition * def);
-
-extern void FreeModuleImport(struct ModuleImport * imp);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " LoadTranslatedStrings(null, \"%s\");\n", projectName);
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
+}
+if(!isDynamicLibrary && thisAppClass)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " _class = eSystem_FindClass(__currentModule, \"%s\");\n", thisAppClass->name);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " eInstance_Evolve((Instance *)&__currentModule, _class);\n");
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __thisModule = __currentModule;\n");
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void FreeIncludeFiles(void);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
+}
+if(modules.count)
+{
+for(defModule = modules.first; defModule; defModule = defModule->next)
+if(defModule->globalInstance)
+{
+char moduleName[1024];
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Map_TPL_ContextStringPair__ecere__com__List_TPL_String___;
+if(!strcmp(defModule->name, "i18n"))
+continue;
+strcpy(moduleName, defModule->name);
+FixModuleName(moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereCreateModuleInstances_%s();\n", moduleName);
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_String_;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
+}
+if(!isDynamicLibrary && thisAppClass)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ((void(*)(void *))(void *)__currentModule._vTbl[12])(__currentModule);\n");
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " return true;\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-struct __ecereNameSpace__ecere__com__Application
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
+if(isStaticLibrary)
{
-int argc;
-const char * * argv;
-int exitCode;
-unsigned int isGUIApp;
-struct __ecereNameSpace__ecere__sys__OldList allModules;
-char * parsedCommand;
-struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
-} __attribute__ ((gcc_struct));
-
-const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\nbool __ecereDll_Unload_%s(Module module)\n{\n", projectName);
+}
+else
+{
+if(targetPlatform == 1)
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __stdcall __ecereDll_Unload(Module module)\n{\n");
+else
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\ndllexport bool __ecereDll_Unload(Module module)\n{\n");
+}
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-struct __ecereNameSpace__ecere__com__Instance * __ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_map(struct __ecereNameSpace__ecere__com__MapIterator * this);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " {\n");
+}
+{
+unsigned int destroyI18n = 0;
-void __ecereProp___ecereNameSpace__ecere__com__MapIterator_Set_map(struct __ecereNameSpace__ecere__com__MapIterator * this, struct __ecereNameSpace__ecere__com__Instance * value);
+if(modules.count)
+{
+for(defModule = modules.first; defModule; defModule = defModule->next)
+if(defModule->globalInstance)
+{
+char moduleName[1024];
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__MapIterator_map;
+if(!strcmp(defModule->name, "i18n"))
+{
+destroyI18n = 1;
+continue;
+}
+strcpy(moduleName, defModule->name);
+FixModuleName(moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereDestroyModuleInstances_%s();\n", moduleName);
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+if(i18n)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " UnloadTranslatedStrings(\"%s\");\n", projectName);
+if(destroyI18n)
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereDestroyModuleInstances_i18n();\n");
+}
+if(isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }\n");
+if(isDynamicLibrary)
+{
+}
+if(modules.count)
+{
+for(defModule = modules.first; defModule; defModule = defModule->next)
+{
+char moduleName[1024];
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
+strcpy(moduleName, defModule->name);
+FixModuleName(moduleName);
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereUnregisterModule_%s(module);\n", moduleName);
+}
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
+}
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Index(struct __ecereNameSpace__ecere__com__Iterator * this, const uint64 index, unsigned int create);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__currentModule == module)\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-uint64 __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(struct __ecereNameSpace__ecere__com__Iterator * this);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __currentModule = (void *)0;\n");
+if(!isStaticLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-void __ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(struct __ecereNameSpace__ecere__com__Iterator * this, uint64 value);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " if(__thisModule == module)\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Iterator_data;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " __thisModule = (void *)0;\n");
+}
+}
+if(!isDynamicLibrary)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Next();
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n _class = eSystem_FindClass(__currentModule, \"ecere::com::Application\");\n exitCode = ((ecere::com::Application)__currentModule).exitCode;\n delete __currentModule;\n return exitCode;\n");
+}
+else
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-int __ecereVMethodID___ecereNameSpace__ecere__com__Container_RemoveAll;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " return true;\n");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
-int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Free;
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
+__ecereNameSpace__ecere__com__eInstance_Delete(f);
+}
+}
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__CustomAVLTree;
+struct __ecereNameSpace__ecere__com__SubModule;
-struct __ecereNameSpace__ecere__com__CustomAVLTree
+struct __ecereNameSpace__ecere__com__SubModule
{
-struct __ecereNameSpace__ecere__com__AVLNode * root;
-int count;
-} __attribute__ ((gcc_struct));
-
-const uint64 __ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_key(struct __ecereNameSpace__ecere__com__MapIterator * this);
-
-extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__MapIterator_key;
+struct __ecereNameSpace__ecere__com__SubModule * prev;
+struct __ecereNameSpace__ecere__com__SubModule * next;
+struct __ecereNameSpace__ecere__com__Instance * module;
+int importMode;
+} ecere_gcc_struct;
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Map;
+static struct __ecereNameSpace__ecere__com__Class * SearchAppClass_Module(struct __ecereNameSpace__ecere__com__Instance * module)
+{
+struct __ecereNameSpace__ecere__com__Class * appClass;
+struct __ecereNameSpace__ecere__com__SubModule * subModule;
-void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
+appClass = FindAppClass(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, 0);
+if(appClass)
+return appClass;
+appClass = FindAppClass(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace, 0);
+if(appClass)
+return appClass;
+for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
+{
+appClass = SearchAppClass_Module(subModule->module);
+if(appClass)
+return appClass;
+}
+return (((void *)0));
+}
void __ecereMethod_SymbolgenApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
{
disabledPooling = 0;
targetPlatform = __runtimePlatform;
targetBits = GetHostBits();
-for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
+for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
{
-const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
+const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
if(arg[0] == '-')
{
}
else if(!strcmp(arg + 1, "o"))
{
-if(!output && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
+if(!output && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
{
-output = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1];
+output = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1];
c++;
}
else
}
else if(!strcmp(arg, "-name"))
{
-if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
+if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
{
-strcpy(projectName, ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
+strcpy(projectName, ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
c++;
}
else
}
else if(!strcmp(arg, "-t"))
{
-if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
-targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c]);
+if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
+targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c]);
else
valid = 0;
}
}
else if(!strcmp(arg, "-symbols"))
{
-if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
+if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
{
-SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
+SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
c++;
}
else
valid = 0;
if(!valid)
{
-printf(__ecereNameSpace__ecere__GetTranslatedString("ecs", "Syntax:\n ecs [-t <target platform>] <input>[, <input>]* -o <output>\n", (((void *)0))));
+printf("%s", __ecereNameSpace__ecere__GetTranslatedString("ecs", "Syntax:\n ecs [-t <target platform>] <input>[, <input>]* -o <output>\n", (((void *)0))));
}
else
{
struct __ecereNameSpace__ecere__com__Instance * intlStrings = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__Map_TPL_ContextStringPair__ecere__com__List_TPL_String___);
struct __ecereNameSpace__ecere__com__MapIterator it = (it.container = (void *)0, it.pointer = (void *)0, __ecereProp___ecereNameSpace__ecere__com__MapIterator_Set_map(&it, intlStrings), it);
-for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
+for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
{
-const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
+const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
struct __ecereNameSpace__ecere__com__Instance * f = (((void *)0));
char line[16384];
int count = 0;
count = 0;
}
}
-for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
+for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
{
-const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
+const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
if(file[0] == '-')
{
c++;
}
}
-for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
+for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
{
-const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
+const char * file = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
struct __ecereNameSpace__ecere__com__Instance * f = (((void *)0));
char line[16384];
int count = 0;
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = comments;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(comments, (uint64)(__ecereNameSpace__ecere__sys__CopyString(line)));
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(comments, (uint64)(uintptr_t)(__ecereNameSpace__ecere__sys__CopyString(line)));
}
else if(strstr(line, "msgid \"") == line)
{
msgid = __ecereNameSpace__ecere__sys__CopyString(line + 7);
len = strlen(msgid);
if(len)
-msgid[len - 1] = (unsigned char)0;
+msgid[len - 1] = 0;
}
else if(strstr(line, "msgctxt \"") == line)
{
msgctxt = __ecereNameSpace__ecere__sys__CopyString(line + 9);
len = strlen(msgctxt);
if(len)
-msgctxt[len - 1] = (unsigned char)0;
+msgctxt[len - 1] = 0;
}
else if(strstr(line, "msgstr \"") == line)
{
msgstr = __ecereNameSpace__ecere__sys__CopyString(line + 8);
len = strlen(msgstr);
if(len)
-msgstr[len - 1] = (unsigned char)0;
+msgstr[len - 1] = 0;
}
if(msgid && msgstr)
{
};
i18n = 1;
-if(!__ecereMethod___ecereNameSpace__ecere__com__Iterator_Index((void *)&it, (uint64)(&pair), 0))
+if(!__ecereMethod___ecereNameSpace__ecere__com__Iterator_Index((void *)(&it), (uint64)(uintptr_t)(&pair), 0))
{
msgid = (((void *)0));
msgctxt = (((void *)0));
intlStrings, 0
};
-__ecereMethod___ecereNameSpace__ecere__com__Iterator_Index(&__internalIterator, ((uint64)(&pair)), 1);
-__ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(&__internalIterator, ((uint64)(comments)));
+__ecereMethod___ecereNameSpace__ecere__com__Iterator_Index(&__internalIterator, ((uint64)(uintptr_t)(&pair)), 1);
+__ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(&__internalIterator, ((uint64)((uintptr_t)(comments))));
});
comments = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__List_TPL_String_);
}
while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&s))
((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
-struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = ((struct __ecereNameSpace__ecere__com__Instance *)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&it)));
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = ((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&it)));
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(((struct __ecereNameSpace__ecere__com__Instance *)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&it))), __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&s));
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&it))), __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&s));
}
((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = comments;
thisAppClass = SearchAppClass_Module(privateModule);
}
WriteMain(output);
-if(outputPot && ((struct __ecereNameSpace__ecere__com__CustomAVLTree *)(((char *)intlStrings + structSize_Instance)))->count)
+if(outputPot && ((struct __ecereNameSpace__ecere__com__CustomAVLTree *)(((char *)intlStrings + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
{
struct __ecereNameSpace__ecere__com__Instance * potFile;
char potFileName[797];
while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next((void *)(&i)))
{
-struct ContextStringPair pair = (*(struct ContextStringPair *)__ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_key(&i));
-struct __ecereNameSpace__ecere__com__Instance * comments = ((struct __ecereNameSpace__ecere__com__Instance *)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&i)));
+struct ContextStringPair pair = (*(struct ContextStringPair *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_key(&i));
+struct __ecereNameSpace__ecere__com__Instance * comments = ((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data((void *)(&i)));
{
struct __ecereNameSpace__ecere__com__Iterator s =
while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&s))
{
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(potFile, ((char * )(__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&s))));
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(potFile, ((char * )((uintptr_t)(__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&s)))));
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = potFile;
SetSymbolsDir((((void *)0)));
}
-extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
-
-extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
-
-extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
-
void __ecereRegisterModule_ecs(struct __ecereNameSpace__ecere__com__Instance * module)
{
struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ModuleInfo", 0, sizeof(struct ModuleInfo), 0, (void *)0, (void *)0, module, 2, 1);
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
__ecereClass_ModuleInfo = class;
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "SymbolgenApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
__ecereClass_SymbolgenApp = class;
__ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_SymbolgenApp_Main, 1);
}
-void __ecereUnregisterModule_ecs(struct __ecereNameSpace__ecere__com__Instance * module)
-{
-
-}
-
-int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
-
-void __ecereCreateModuleInstances_ecs()
-{
-(globalData.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString);
-theGlobalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
-}
-
-void __ecereDestroyModuleInstances_ecs()
-{
-((theGlobalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)theGlobalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(theGlobalContext)) : 0), theGlobalContext = 0);
-}
-