2001-11-09 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Use the @ctors list to determine if a class is abstract. There is an abstract indicator in the new defs format description, but it doesn't appear in the defs files currently. This method should be reliable though, even in the long term. Use the same check to determine if ctor(IntPtr obj) should be gen'd. svn path=/trunk/gtk-sharp/; revision=1315
This commit is contained in:
parent
200f01ad2d
commit
c9a40e80bc
2 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2001-11-09 Mike Kestner <mkestner@speakeasy.net>
|
||||||
|
|
||||||
|
* codegen/defs-parse.pl : Use the @ctors list to determine if a class
|
||||||
|
is abstract. There is an abstract indicator in the new defs format
|
||||||
|
description, but it doesn't appear in the defs files currently. This
|
||||||
|
method should be reliable though, even in the long term. Use the same
|
||||||
|
check to determine if ctor(IntPtr obj) should be gen'd.
|
||||||
|
|
||||||
2001-11-09 Mike Kestner <mkestner@speakeasy.net>
|
2001-11-09 Mike Kestner <mkestner@speakeasy.net>
|
||||||
|
|
||||||
* codegen/defs-parse.pl : Now genning Window, AccelGroup, Bin, and
|
* codegen/defs-parse.pl : Now genning Window, AccelGroup, Bin, and
|
||||||
|
|
|
@ -253,17 +253,22 @@ sub gen_object
|
||||||
print OUTFILE "\t/// <remarks>\n\t///\t FIXME: Generate docs\n";
|
print OUTFILE "\t/// <remarks>\n\t///\t FIXME: Generate docs\n";
|
||||||
print OUTFILE "\t/// </remarks>\n\n";
|
print OUTFILE "\t/// </remarks>\n\n";
|
||||||
print OUTFILE "\tpublic ";
|
print OUTFILE "\tpublic ";
|
||||||
if ($abstract) {
|
if (@ctors == 0) {
|
||||||
print OUTFILE "abstract ";
|
print OUTFILE "abstract ";
|
||||||
}
|
}
|
||||||
print OUTFILE "class $typename : $parent {\n\n";
|
print OUTFILE "class $typename : $parent {\n\n";
|
||||||
|
|
||||||
print OUTFILE "\t\t/// <summary> $typename Constructor </summary>\n";
|
# Only generate the wrapper ctor if other ctors exist
|
||||||
print OUTFILE "\t\t/// <remarks>\n";
|
if (@ctors) {
|
||||||
print OUTFILE "\t\t///\tWraps a raw GObject reference.\n";
|
print OUTFILE "\t\t/// <summary>\n";
|
||||||
print OUTFILE "\t\t/// </remarks>\n\n";
|
print OUTFILE "\t\t///\t$typename Constructor\n";
|
||||||
print OUTFILE "\t\tpublic $typename (IntPtr o)\n\t\t{\n";
|
print OUTFILE "\t\t/// </summary>\n";
|
||||||
print OUTFILE "\t\t\tRawObject = o;\n\t\t}\n\n";
|
print OUTFILE "\t\t/// <remarks>\n";
|
||||||
|
print OUTFILE "\t\t///\tWraps a raw GObject reference.\n";
|
||||||
|
print OUTFILE "\t\t/// </remarks>\n\n";
|
||||||
|
print OUTFILE "\t\tpublic $typename (IntPtr o)\n\t\t{\n";
|
||||||
|
print OUTFILE "\t\t\tRawObject = o;\n\t\t}\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
foreach $ctor (@ctors) {
|
foreach $ctor (@ctors) {
|
||||||
print OUTFILE gen_ctor ($ctor, "gtk-1.3.dll");
|
print OUTFILE gen_ctor ($ctor, "gtk-1.3.dll");
|
||||||
|
|
Loading…
Reference in a new issue