newDef = MkClassDefFunction(func);
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
after = newDef;
-decl = MkDeclaratorFunction(propertyDef->declarator, (((void *)0)));
+decl = PlugDeclarator(propertyDef->declarator, MkDeclaratorFunction((((void *)0)), (((void *)0))));
func->type = ProcessType(propertyDef->specifiers, decl);
-decl->declarator = (((void *)0));
FreeDeclarator(decl);
if(func->type->__anon1.__anon2.returnType->kind == 8 && func->type->__anon1.__anon2.returnType->__anon1._class && func->type->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && func->type->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
func->type->__anon1.__anon2.returnType->byReference = 0x1;
+func->type->__anon1.__anon2.returnType->passAsTemplate = 0x1;
if(inCompiler)
propertyDef->getStmt = (((void *)0));
else
extern struct Type * ProcessTemplateParameterType(struct TemplateParameter * param);
+extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+
extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
extern void DeclareStruct(const char * name, unsigned int skipNoHead);
extern struct Expression * CopyExpContents(struct Expression * exp);
-extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
-
extern struct Specifier * CopySpecifier(struct Specifier * spec);
extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
{
struct Identifier * id = exp->__anon1.member.member;
struct Expression * classExp = exp->__anon1.member.exp;
+struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
-exp->type = 7;
-exp->__anon1.call.exp = MkExpIdentifier(MkIdentifier("ecere::com::eClass_GetProperty"));
-exp->__anon1.call.arguments = MkList();
-ListAdd(exp->__anon1.call.arguments, classExp);
+exp->type = 11;
+if(exp->expType)
+{
+char typeString[2048];
+struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
+struct Declarator * decl;
+
+typeString[0] = (char)0;
+PrintType(exp->expType, typeString, 0x0, 0x0);
+decl = SpecDeclFromString(typeString, specs, (((void *)0)));
+exp->__anon1.cast.typeName = MkTypeName(specs, decl);
+}
+else
+exp->__anon1.cast.typeName = QMkType("uint64", (((void *)0)));
+exp->__anon1.cast.exp = MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eClass_GetProperty")), args);
+ListAdd(args, classExp);
{
char * s = QMkString(id->string);
-ListAdd(exp->__anon1.call.arguments, MkExpString(s));
+ListAdd(args, MkExpString(s));
(__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
}
FreeIdentifier(id);
definitions.Insert(after, newDef);
after = newDef;
- decl = MkDeclaratorFunction(propertyDef.declarator, null);
+ decl = PlugDeclarator(propertyDef.declarator, MkDeclaratorFunction(null , null));
func.type = ProcessType(propertyDef.specifiers, decl);
- decl.declarator = null;
FreeDeclarator(decl);
if(func.type.returnType.kind == TypeKind::classType && func.type.returnType._class && func.type.returnType._class.registered && func.type.returnType._class.registered.type == structClass)
func.type.returnType.byReference = true;
+ // Leverage the fact that templated types are also boxed in a 64 bit integer
+ func.type.returnType.passAsTemplate = true;
+
if(inCompiler)
propertyDef.getStmt = null;
else
{
Identifier id = exp.member.member;
Expression classExp = exp.member.exp;
+ OldList * args = MkList();
+ exp.type = castExp;
// Class Property
- exp.type = callExp;
- exp.call.exp = MkExpIdentifier(MkIdentifier("ecere::com::eClass_GetProperty"));
- exp.call.arguments = MkList();
- ListAdd(exp.call.arguments, classExp);
+ if(exp.expType)
+ {
+ char typeString[2048];
+ OldList * specs = MkList();
+ Declarator decl;
+ typeString[0] = 0;
+ PrintType(exp.expType, typeString, false, false);
+ decl = SpecDeclFromString(typeString, specs, null);
+ exp.cast.typeName = MkTypeName(specs, decl);
+ }
+ else
+ exp.cast.typeName = QMkType("uint64", null);
+ exp.cast.exp = MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eClass_GetProperty")), args);
+
+ ListAdd(args, classExp);
{
char * s = QMkString(id.string);
- ListAdd(exp.call.arguments, MkExpString(s));
+ ListAdd(args, MkExpString(s));
delete s;
}
FreeIdentifier(id);