summaryrefslogtreecommitdiffstats
path: root/dcopjava/dcopidl2java/stubimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcopjava/dcopidl2java/stubimpl.cpp')
-rw-r--r--dcopjava/dcopidl2java/stubimpl.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/dcopjava/dcopidl2java/stubimpl.cpp b/dcopjava/dcopidl2java/stubimpl.cpp
index 55e474c9..dbb84a93 100644
--- a/dcopjava/dcopidl2java/stubimpl.cpp
+++ b/dcopjava/dcopidl2java/stubimpl.cpp
@@ -33,15 +33,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main.h"
-TQString javaType(TQString type)
+TTQString javaType(TTQString type)
{
if (type == "bool")
return "boolean";
- if (type == "TQString")
+ if (type == "TTQString")
return "String";
- if (type == "TQCString")
+ if (type == "TTQCString")
return "String";
- if (type == "TQStringList")
+ if (type == "TTQStringList")
return "String[]";
if (type == "short int")
return "short";
@@ -52,50 +52,50 @@ TQString javaType(TQString type)
}
-TQString javaRightAttribute(TQString attr)
+TTQString javaRightAttribute(TTQString attr)
{
if (attr == "&")
- return TQString::null;
+ return TTQString::null;
return "!!!NOT IMPLEMENTED: " + attr;
}
-TQString javaLeftAttribute(TQString attr)
+TTQString javaLeftAttribute(TTQString attr)
{
if (attr == "const")
- return TQString::null;
+ return TTQString::null;
return "!!!NOT IMPLEMENTED: " + attr;
}
-TQString javaQualifier(TQString qual)
+TTQString javaQualifier(TTQString qual)
{
if (qual == "const")
- return TQString::null;
+ return TTQString::null;
return "!!!NOT IMPLEMENTED: " + qual;
}
-TQString underscore(TQString in)
+TTQString underscore(TTQString in)
{
- return in.replace(TQRegExp(" "), "_");
+ return in.replace(TTQRegExp(" "), "_");
}
-TQString defValue(TQString type)
+TTQString defValue(TTQString type)
{
if (type == "bool")
return "false";
- if (type == "TQString")
+ if (type == "TTQString")
return "null";
- if (type == "TQStringList")
+ if (type == "TTQStringList")
return "null";
if (type == "DCOPRef")
return "null";
- if (type == "TQCString")
+ if (type == "TTQCString")
return "null";
return "0";
@@ -105,13 +105,13 @@ TQString defValue(TQString type)
/**
* Writes the stub implementation
*/
-void generateStubImpl( const TQString& idl, const TQString& package, const TQString& filename, TQDomElement de )
+void generateStubImpl( const TTQString& idl, const TTQString& package, const TTQString& filename, TTQDomElement de )
{
- TQFile impl( filename );
+ TTQFile impl( filename );
if ( !impl.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.latin1() );
- TQTextStream str( &impl );
+ TTQTextStream str( &impl );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -129,16 +129,16 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
str << "import org.kde.DCOP.*;" << endl;
str << endl << endl;
- TQDomElement e = de.firstChild().toElement();
+ TTQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() == "CLASS" ) {
- TQDomElement n = e.firstChild().toElement();
+ TTQDomElement n = e.firstChild().toElement();
ASSERT( n.tagName() == "NAME" );
- TQString className = n.firstChild().toText().data() + "_stub";
+ TTQString className = n.firstChild().toText().data() + "_stub";
// find dcop parent ( rightmost super class )
- TQString DCOPParent;
- TQDomElement s = n.nextSibling().toElement();
+ TTQString DCOPParent;
+ TTQDomElement s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "SUPER" )
DCOPParent = s.firstChild().toText().data();
@@ -163,9 +163,9 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
s = e.firstChild().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "FUNC" ) {
- TQDomElement r = s.firstChild().toElement();
+ TTQDomElement r = s.firstChild().toElement();
ASSERT( r.tagName() == "TYPE" );
- TQString result = r.firstChild().toText().data();
+ TTQString result = r.firstChild().toText().data();
str << " public ";
bool async = result == "ASYNC";
if ( async)
@@ -180,11 +180,11 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
r = r.nextSibling().toElement();
ASSERT ( r.tagName() == "NAME" );
- TQString funcName = r.firstChild().toText().data();
+ TTQString funcName = r.firstChild().toText().data();
str << funcName << "(";
- TQStringList args;
- TQStringList argtypes;
+ TTQStringList args;
+ TTQStringList argtypes;
bool first = TRUE;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -192,7 +192,7 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
str << ", ";
first = FALSE;
ASSERT( r.tagName() == "ARG" );
- TQDomElement a = r.firstChild().toElement();
+ TTQDomElement a = r.firstChild().toElement();
ASSERT( a.tagName() == "TYPE" );
if ( a.hasAttribute( "qleft" ) )
str << javaLeftAttribute(a.attribute("qleft")) << " ";
@@ -202,7 +202,7 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
str << javaRightAttribute(a.attribute("qright")) << " ";
else
str << " ";
- args.append(TQString("arg") + TQString::number(args.count())) ;
+ args.append(TTQString("arg") + TTQString::number(args.count())) ;
str << args.last();
}
str << ")";
@@ -215,7 +215,7 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
funcName += "(";
first = TRUE;
- for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TTQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = FALSE;
@@ -230,7 +230,7 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
str << " try" << endl;
str << " {" << endl;
- TQStringList::Iterator itt, ita;
+ TTQStringList::Iterator itt, ita;
for (itt = argtypes.begin(), ita = args.begin(); itt != argtypes.end(); ++itt, ++ita)
str << " write_" << *itt << "(os, " << *ita << ");" << endl;
}
@@ -256,7 +256,7 @@ void generateStubImpl( const TQString& idl, const TQString& package, const TQStr
str << " try" << endl;
str << " {" << endl;
- TQStringList::Iterator itt, ita;
+ TTQStringList::Iterator itt, ita;
for (itt = argtypes.begin(), ita = args.begin(); itt != argtypes.end(); ++itt, ++ita)
str << " write_" << underscore(*itt) << "(os, " << *ita << ");" << endl;