diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /kalyptus/kalyptusCxxToCSharp.pm | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'kalyptus/kalyptusCxxToCSharp.pm')
-rw-r--r-- | kalyptus/kalyptusCxxToCSharp.pm | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kalyptus/kalyptusCxxToCSharp.pm b/kalyptus/kalyptusCxxToCSharp.pm index 419c0bef..400611e2 100644 --- a/kalyptus/kalyptusCxxToCSharp.pm +++ b/kalyptus/kalyptusCxxToCSharp.pm @@ -31,7 +31,7 @@ no strict "subs"; use vars qw/ @clist $host $who $now $gentext %functionId $docTop $lib $rootnode $outputdir $opt $debug $typeprefix $eventHandlerCount - $pastaccess $pastname $pastreturn $pastparams $nullctor $constructorCount *CLASS *HEADER *QTCTYPES *KDETYPES /; + $pastaccess $pastname $pastreturn $pastparams $nullctor $constructorCount *CLASS *HEADER *TQTCTYPES *KDETYPES /; BEGIN { @@ -75,7 +75,7 @@ sub cplusplusToCSharp return "double[]"; } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /\s*short\s*\*/ ) { return "short[]"; - } elsif ( $cplusplusType =~ /QByteArray/ || $cplusplusType =~ /QBitArray/ ) { + } elsif ( $cplusplusType =~ /TQByteArray/ || $cplusplusType =~ /TQBitArray/ ) { return "byte[]"; } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /\s*char\s*\*\*/ ) { return "string[]"; @@ -95,27 +95,27 @@ sub cplusplusToCSharp return "string"; } elsif ( $cplusplusType =~ /^_NPStream/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QPtrCollection/ ) { + } elsif ( $cplusplusType =~ /^TQPtrCollection/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QStyleHintReturn/ ) { + } elsif ( $cplusplusType =~ /^TQStyleHintReturn/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^type/i ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^Key/ || $cplusplusType =~ /^key_type/ || $cplusplusType =~ /^K/) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QUnknownInterface/ ) { + } elsif ( $cplusplusType =~ /^TQUnknownInterface/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^GDHandle/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QTextParag/ ) { + } elsif ( $cplusplusType =~ /^TQTextParag/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QDiskFont/ ) { + } elsif ( $cplusplusType =~ /^TQDiskFont/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QDomNodePrivate/ ) { + } elsif ( $cplusplusType =~ /^TQDomNodePrivate/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^Display/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QUuid/ ) { + } elsif ( $cplusplusType =~ /^TQUuid/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^Q_REFCOUNT/ ) { return "IntPtr"; @@ -123,17 +123,17 @@ sub cplusplusToCSharp return "IntPtr"; } elsif ( $cplusplusType =~ /^MSG/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QWSEvent/ ) { + } elsif ( $cplusplusType =~ /^TQWSEvent/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^XEvent/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^CGContextRef/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QWSDecoration/ ) { + } elsif ( $cplusplusType =~ /^TQWSDecoration/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QTextFormat/ || $cplusplusType =~ /^QTextDocument/ || $cplusplusType =~ /^QTextCursor/ ) { + } elsif ( $cplusplusType =~ /^TQTextFormat/ || $cplusplusType =~ /^TQTextDocument/ || $cplusplusType =~ /^TQTextCursor/ ) { return "IntPtr"; - } elsif ( $cplusplusType =~ /^QSqlRecordPrivate/ ) { + } elsif ( $cplusplusType =~ /^TQSqlRecordPrivate/ ) { return "IntPtr"; } elsif ( $cplusplusType =~ /^Text/ ) { return "IntPtr"; @@ -181,7 +181,7 @@ sub cplusplusToPInvoke return "double[]"; } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /\s*short\s*\*/ ) { return "short[]"; - } elsif ( $cplusplusType =~ /QByteArray/ || $cplusplusType =~ /QBitArray/ ) { + } elsif ( $cplusplusType =~ /TQByteArray/ || $cplusplusType =~ /TQBitArray/ ) { return "byte[]"; } elsif ( kalyptusDataDict::ctypemap($cplusplusType) =~ /\s*char\s*\*\*/ ) { return "string[]"; @@ -201,27 +201,27 @@ sub cplusplusToPInvoke return "string"; } elsif ( $cplusplusType =~ /^_NPStream/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QPtrCollection/ ) { + } elsif ( $cplusplusType =~ /^TQPtrCollection/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QStyleHintReturn/ ) { + } elsif ( $cplusplusType =~ /^TQStyleHintReturn/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^type/i ) { return "RawObject"; } elsif ( $cplusplusType =~ /^Key/ || $cplusplusType =~ /^key_type/ || $cplusplusType =~ /^K/) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QUnknownInterface/ ) { + } elsif ( $cplusplusType =~ /^TQUnknownInterface/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^GDHandle/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QTextParag/ ) { + } elsif ( $cplusplusType =~ /^TQTextParag/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QDiskFont/ ) { + } elsif ( $cplusplusType =~ /^TQDiskFont/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QDomNodePrivate/ ) { + } elsif ( $cplusplusType =~ /^TQDomNodePrivate/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^Display/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QUuid/ ) { + } elsif ( $cplusplusType =~ /^TQUuid/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^Q_REFCOUNT/ ) { return "RawObject"; @@ -229,17 +229,17 @@ sub cplusplusToPInvoke return "RawObject"; } elsif ( $cplusplusType =~ /^MSG/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QWSEvent/ ) { + } elsif ( $cplusplusType =~ /^TQWSEvent/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^XEvent/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^CGContextRef/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QWSDecoration/ ) { + } elsif ( $cplusplusType =~ /^TQWSDecoration/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QTextFormat/ || $cplusplusType =~ /^QTextDocument/ || $cplusplusType =~ /^QTextCursor/ ) { + } elsif ( $cplusplusType =~ /^TQTextFormat/ || $cplusplusType =~ /^TQTextDocument/ || $cplusplusType =~ /^TQTextCursor/ ) { return "RawObject"; - } elsif ( $cplusplusType =~ /^QSqlRecordPrivate/ ) { + } elsif ( $cplusplusType =~ /^TQSqlRecordPrivate/ ) { return "RawObject"; } elsif ( $cplusplusType =~ /^Text/ ) { return "RawObject"; @@ -385,14 +385,14 @@ sub writeClassDoc foreach $ancestor ( @ancestors ) { if ( kalyptusDataDict::interfacemap($ancestor) eq () ) { if ( $ancestor eq ("Qt") ){ - print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : QNameSpace "; + print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : TQNameSpace "; } else { print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : $ancestor"; } last; } elsif ($ancestor eq @ancestors[$#ancestors] ) { if ( $ancestor eq ("Qt") ){ - print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : QNameSpace "; + print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : TQNameSpace "; } else { print CLASS "\n\n\tpublic class ", $node->{astNodeName}, " : "; } @@ -493,8 +493,8 @@ sub listMember if( $type eq "method" && $m->{Access} ne "private" && $m->{Access} ne "private_slots" && $m->{Access} ne "signals" ) { if ( $m->{ReturnType} =~ /[<>]/ || $m->{Params} =~ /[<>]/ || $m->{Params} =~ /\.\.\./ || $m->{Params} =~ /Impl/ - || $m->{ReturnType} =~ /QAuBucket/ || $m->{Params} =~ /QAuBucket/ - || $m->{ReturnType} =~ /QMember/ || $m->{Params} =~ /QMember/ ) { + || $m->{ReturnType} =~ /TQAuBucket/ || $m->{Params} =~ /TQAuBucket/ + || $m->{ReturnType} =~ /TQMember/ || $m->{Params} =~ /TQMember/ ) { return; } |