diff options
Diffstat (limited to 'kode/kwsdl/tests/google/serializer.cpp')
-rw-r--r-- | kode/kwsdl/tests/google/serializer.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/kode/kwsdl/tests/google/serializer.cpp b/kode/kwsdl/tests/google/serializer.cpp index 281f3269a..5416b7073 100644 --- a/kode/kwsdl/tests/google/serializer.cpp +++ b/kode/kwsdl/tests/google/serializer.cpp @@ -41,12 +41,12 @@ void Serializer::demarshalValue( const TQString &str, TQString *value ) *value = str; } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const TQString* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQString* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:string" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, TQString* value ) @@ -64,12 +64,12 @@ void Serializer::demarshalValue( const TQString &str, bool *value ) *value = (str.lower() == "true" ? true : false); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const bool* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const bool* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:boolean" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, bool* value ) @@ -87,12 +87,12 @@ void Serializer::demarshalValue( const TQString &str, float *value ) *value = str.toFloat(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const float* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const float* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:TODO" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, float* value ) @@ -110,12 +110,12 @@ void Serializer::demarshalValue( const TQString &str, int *value ) *value = str.toInt(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const int* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const int* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:int" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, int* value ) @@ -133,12 +133,12 @@ void Serializer::demarshalValue( const TQString &str, unsigned int *value ) *value = str.toUInt(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const unsigned int* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned int* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:unsignedByte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, unsigned int* value ) @@ -156,12 +156,12 @@ void Serializer::demarshalValue( const TQString &str, double *value ) *value = str.toDouble(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const double* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const double* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:double" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, double* value ) @@ -179,12 +179,12 @@ void Serializer::demarshalValue( const TQString &str, char *value ) *value = str[ 0 ].latin1(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const char* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const char* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:byte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, char* value ) @@ -202,12 +202,12 @@ void Serializer::demarshalValue( const TQString &str, unsigned char *value ) *value = str[ 0 ].latin1(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const unsigned char* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned char* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:unsignedByte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, unsigned char* value ) @@ -225,12 +225,12 @@ void Serializer::demarshalValue( const TQString &str, short *value ) *value = str.toShort(); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const short* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const short* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:short" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, short* value ) @@ -248,12 +248,12 @@ void Serializer::demarshalValue( const TQString &str, TQByteArray *value ) *value = KCodecs::base64Decode( str.utf8() ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const TQByteArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQByteArray* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:base64Binary" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, TQByteArray* value ) @@ -271,12 +271,12 @@ void Serializer::demarshalValue( const TQString &str, TQDateTime *value ) *value = TQDateTime::fromString( str, TQt::ISODate ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const TQDateTime* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDateTime* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:dateTime" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, TQDateTime* value ) @@ -294,12 +294,12 @@ void Serializer::demarshalValue( const TQString &str, TQDate *value ) *value = TQDate::fromString( str, TQt::ISODate ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const TQDate* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDate* value ) { TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:date" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); - tqparent.appendChild( element ); + parent.appendChild( element ); } void Serializer::demarshal( const TQDomElement &element, TQDate* value ) @@ -307,11 +307,11 @@ void Serializer::demarshal( const TQDomElement &element, TQDate* value ) Serializer::demarshalValue( element.text(), value ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const ResultElementArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElementArray* value ) { TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:ResultElementArray" ); - tqparent.appendChild( root ); + parent.appendChild( root ); if ( value->items() ) { const TQPtrList<ResultElement>* list = value->items(); @@ -319,7 +319,7 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" ); element.setAttribute( "xsi:type", "ns1:Array" ); element.setAttribute( "ns1:arrayType", "ns1:ResultElement[" + TQString::number( list->count() ) + "]" ); - tqparent.appendChild( element ); + parent.appendChild( element ); TQPtrListIterator<ResultElement> it( *list ); while ( it.current() != 0 ) { @@ -329,11 +329,11 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt } } -void Serializer::demarshal( const TQDomElement &tqparent, ResultElementArray* value ) +void Serializer::demarshal( const TQDomElement &parent, ResultElementArray* value ) { TQPtrList<ResultElement>* itemsList = new TQPtrList<ResultElement>(); itemsList->setAutoDelete( true ); - TQDomNode node = tqparent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { TQDomElement element = node.toElement(); if ( !element.isNull() ) { @@ -349,11 +349,11 @@ void Serializer::demarshal( const TQDomElement &tqparent, ResultElementArray* va value->setItems( itemsList ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const DirectoryCategoryArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategoryArray* value ) { TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:DirectoryCategoryArray" ); - tqparent.appendChild( root ); + parent.appendChild( root ); if ( value->items() ) { const TQPtrList<DirectoryCategory>* list = value->items(); @@ -361,7 +361,7 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" ); element.setAttribute( "xsi:type", "ns1:Array" ); element.setAttribute( "ns1:arrayType", "ns1:DirectoryCategory[" + TQString::number( list->count() ) + "]" ); - tqparent.appendChild( element ); + parent.appendChild( element ); TQPtrListIterator<DirectoryCategory> it( *list ); while ( it.current() != 0 ) { @@ -371,11 +371,11 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt } } -void Serializer::demarshal( const TQDomElement &tqparent, DirectoryCategoryArray* value ) +void Serializer::demarshal( const TQDomElement &parent, DirectoryCategoryArray* value ) { TQPtrList<DirectoryCategory>* itemsList = new TQPtrList<DirectoryCategory>(); itemsList->setAutoDelete( true ); - TQDomNode node = tqparent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { TQDomElement element = node.toElement(); if ( !element.isNull() ) { @@ -391,11 +391,11 @@ void Serializer::demarshal( const TQDomElement &tqparent, DirectoryCategoryArray value->setItems( itemsList ); } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const GoogleSearchResult* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const GoogleSearchResult* value ) { TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:GoogleSearchResult" ); - tqparent.appendChild( root ); + parent.appendChild( root ); if ( value->documentFiltering() ) { Serializer::marshal( doc, root, "documentFiltering", value->documentFiltering() ); } @@ -431,9 +431,9 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt } } -void Serializer::demarshal( const TQDomElement &tqparent, GoogleSearchResult* value ) +void Serializer::demarshal( const TQDomElement &parent, GoogleSearchResult* value ) { - TQDomNode node = tqparent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { TQDomElement element = node.toElement(); if ( !element.isNull() ) { @@ -498,11 +498,11 @@ void Serializer::demarshal( const TQDomElement &tqparent, GoogleSearchResult* va } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const DirectoryCategory* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategory* value ) { TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:DirectoryCategory" ); - tqparent.appendChild( root ); + parent.appendChild( root ); if ( value->fullViewableName() ) { Serializer::marshal( doc, root, "fullViewableName", value->fullViewableName() ); } @@ -511,9 +511,9 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt } } -void Serializer::demarshal( const TQDomElement &tqparent, DirectoryCategory* value ) +void Serializer::demarshal( const TQDomElement &parent, DirectoryCategory* value ) { - TQDomNode node = tqparent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { TQDomElement element = node.toElement(); if ( !element.isNull() ) { @@ -533,11 +533,11 @@ void Serializer::demarshal( const TQDomElement &tqparent, DirectoryCategory* val } -void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQString &name, const ResultElement* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElement* value ) { TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:ResultElement" ); - tqparent.appendChild( root ); + parent.appendChild( root ); if ( value->summary() ) { Serializer::marshal( doc, root, "summary", value->summary() ); } @@ -567,9 +567,9 @@ void Serializer::marshal( TQDomDocument &doc, TQDomElement &tqparent, const TQSt } } -void Serializer::demarshal( const TQDomElement &tqparent, ResultElement* value ) +void Serializer::demarshal( const TQDomElement &parent, ResultElement* value ) { - TQDomNode node = tqparent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { TQDomElement element = node.toElement(); if ( !element.isNull() ) { |