Add Suffix
This commit is contained in:
parent
92bb2b8191
commit
5e2934a399
@ -31,7 +31,7 @@ export class Method {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate Variable Definition
|
// Generate Variable Definition
|
||||||
generateDefinition() {
|
generateDefinition(nameSuffix?: string) {
|
||||||
return `${this.getType()} ${this.getName()};\n`;
|
return `${this.getType()} ${this.getName()}${nameSuffix !== undefined ? nameSuffix : ''};\n`;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -117,7 +117,7 @@ export class VTable implements Property {
|
|||||||
if (info) {
|
if (info) {
|
||||||
const type = `${info.getType()} *`;
|
const type = `${info.getType()} *`;
|
||||||
out += `extern ${type}${info.getName()}_vtable_addr;\n`;
|
out += `extern ${type}${info.getName()}_vtable_addr;\n`;
|
||||||
out += `extern ${info.generateDefinition()}`;
|
out += `extern ${info.generateDefinition('_non_virtual')}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ export class VTable implements Property {
|
|||||||
const type = `${info.getType()} *`;
|
const type = `${info.getType()} *`;
|
||||||
init += `${INDENT}${info.getName()}_vtable_addr = (${type}) ${vtableAddress};\n`;
|
init += `${INDENT}${info.getName()}_vtable_addr = (${type}) ${vtableAddress};\n`;
|
||||||
declarations += `${type}${info.getName()}_vtable_addr;\n`;
|
declarations += `${type}${info.getName()}_vtable_addr;\n`;
|
||||||
init += `${INDENT}${info.getName()} = *${info.getName()}_vtable_addr;\n`;
|
init += `${INDENT}${info.getName()}_non_virtual = *${info.getName()}_vtable_addr;\n`;
|
||||||
declarations += info.generateDefinition();
|
declarations += info.generateDefinition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user