List Info

Thread: branches/work/kdebindings-smoke2




branches/work/kdebindings-smoke2
user name
2008-01-20 15:59:43
SVN commit 764058 by arnorehn:

* Fixed: Virtual methods of base classes that were in
another module
  weren't correctly added to their descendants in the
x_*.cpp files.
  (Fixes problem with KPageModel)

CCMAIL: kde-bindingskde.org



 M  +2 -0      ChangeLog  
 M  +17 -5     kalyptus/kalyptusCxxToSmoke.pm  


--- branches/work/kdebindings-smoke2/ChangeLog
#764057:764058
 -6,6
+6,8 
 	  fail. If you remove KPageModel from the classlist, it
builds all fine.
 	  Still investigating, what that is, but it seems like an
error in kalyptus
 	  itself, not in the smoke generator.
+          Edit: Fixed. Virtual methods of base classes that
were in another module
+          weren't correctly added to their descendants in
the x_*.cpp files.
 	* Added kalyptusCxxToClasslist module for classlist
generation. Might come
 	  in handy when writing classlists for new modules.
 	* Added kde_smoke.h
---
branches/work/kdebindings-smoke2/kalyptus/kalyptusCxxToSmoke
.pm #764057:764058
 -2259,17
+2259,16 
     Iter::LocalCompounds( $rootnode, sub {
 	my $classNode = shift;
 	my $className = join( "::",
kdocAstUtil::heritage($classNode) );
-	return if defined($excludeClasses{$className}); # return
if the class is handled in another module
 	print STDERR "writeSmokeDataFile: arglist: looking at
$classNamen" if ($debug);
 
 	Iter::MembersByType ( $classNode, undef,
 		sub {	my ($classNode, $m ) = _;
 
 	my $methName = $m->;
-	print "method: $methNamen" if $className eq
"KPageModel";
 	# For destructors, get a proper signature that includes
the '~'
 	if ( $m-> eq '~' )
 	{
+	    return if defined($excludeClasses{$className}); #
return if the class is handled in another module
 	    $methName = '~' . $methName ;
 	    # Let's even store that change, otherwise we have to
do it many times
 	    $m-> = $methName;
 -2277,15
+2276,21 
 	
 	if( $m-> eq "enum" ) {
 
+	    return if defined($excludeClasses{$className}); #
return if the class is handled in another module
 	    foreach my $enum ( {$m->} ) {
 		my $enumName = $enum->;
 	        $methods{$enumName}++;
 	    }
 
 	} elsif ( $m-> eq 'var' ) {
+		return if defined($excludeClasses{$className}); # return
if the class is handled in another module
 		$methods{$m->}++;
 	} elsif( $m-> eq "method" ) {
 
+	    return if (defined($excludeClasses{$className})
&& !isAncestorOfModuleClass($className));
+	    if (defined($excludeClasses{$className}) &&
isAncestorOfModuleClass($className)) {
+		return if (!($m-> =~ "v" ||
$m-> =~ "p"));
+	    }
 	    $methods{$methName}++;
 	    my protos;
 	    makeprotos(%classidx, $m, protos);
 -2372,7
+2377,6 
     Iter::LocalCompounds( $rootnode, sub {
 	my $classNode = shift;
 	my $className = join( "::",
kdocAstUtil::heritage($classNode) );
-	return if defined($excludeClasses{$className}); # return
if the class is handled in another module
 	
 	my $classIndex = $moduleclassidx{$className};
 	print STDERR "writeSmokeDataFile: methods: looking at
$classNamen" if ($debug);
 -2382,6
+2386,7 
 
 	if( $m-> eq "enum" ) {
 
+	    return if defined($excludeClasses{$className}); #
return if the class is handled in another module
 	    foreach my $enum ( {$m->} ) {
 		my $enumName = $enum->;
 		my $fullEnumName = "$className::$enumName";
 -2406,6
+2411,7 
 
 	} elsif( $m-> eq 'var' ) {
 
+	    return if defined($excludeClasses{$className}); #
return if the class is handled in another module
 	    my $name = $m->;
 	    my $fullName = "$className::$name";
 	    my $sig = "$fullName()";
 -2445,10
+2451,16 
 	    # No switch code for destructors if we didn't derive
from the class (e.g. it has private ctors only)
     	    return if ( $m-> eq '~' &&
! ( $classNode-> and
$classNode->) );
 
+
+	    my $methName = $m->;
+	    return if (defined($excludeClasses{$className})
&& !isAncestorOfModuleClass($className));
+	    if (defined($excludeClasses{$className}) &&
isAncestorOfModuleClass($className)) {
+	    	# only process (pure) virtual methods, not
constructors, of ancestor classes, if this class is in
another module
+		return if (!($m-> =~ "v" ||
$m-> =~ "p") || $methName eq
$className);
+	    }
             # Is this sorting really important?
 	    #for my $m (sort {$a-> cmp $b->}
{
$self->{$c} }) {
 
-	    my $methName = $m->;
 	    my $def = $m->;
 	    $def = scalar({ $m-> }) unless defined
$def;
 	    my $last = scalar({ $m-> }) -
1;
 -2464,7
+2476,7 
 		#die "$methodSig" if !defined $methodIndex;
 
 		my $methodIndex = $methodidx{$methName};
-		die "$methName" if !defined $methodIndex;
+		die "$className :: $methName" if !defined
$methodIndex;
 		my $case = $classNode->{$sig};
 		my $typeEntry = findTypeEntry( $m-> );
 		my $retTypeIndex = defined $typeEntry ?
$typeEntry-> : 0;
_______________________________________________
Kde-bindings mailing list
Kde-bindingskde.org
ht
tps://mail.kde.org/mailman/listinfo/kde-bindings

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )