roshan      2003/07/15 00:50:53

  Modified:    c/src/soap Attribute.h Attribute.cpp
  Log:
  added code
  
  Revision  Changes    Path
  1.3       +5 -3      xml-axis/c/src/soap/Attribute.h
  
  Index: Attribute.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/soap/Attribute.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Attribute.h       27 Jun 2003 04:52:58 -0000      1.2
  +++ Attribute.h       15 Jul 2003 07:50:53 -0000      1.3
  @@ -74,6 +74,8 @@
   
   #include <string>
   
  +class SoapSerializer;
  +
   using namespace std;
   
   class Attribute  
  @@ -85,9 +87,9 @@
        string m_uri;
        string m_value;
        //string m_strAttrSerialized;
  -public:      
  -     //string& serialize();
  -     int serialize(string&);
  +public:              
  +     int serialize(SoapSerializer& pSZ);
  +     //int serialize(string&);
        Attribute();    
        Attribute(const string &localname, const string &prefix, const string &uri, 
const string &value);
        virtual ~Attribute();
  
  
  
  1.3       +20 -13    xml-axis/c/src/soap/Attribute.cpp
  
  Index: Attribute.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/soap/Attribute.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Attribute.cpp     27 Jun 2003 04:52:58 -0000      1.2
  +++ Attribute.cpp     15 Jul 2003 07:50:53 -0000      1.3
  @@ -67,6 +67,7 @@
   
   #include "Attribute.h"
   #include "../common/GDefine.h"
  +#include "../soap/SoapSerializer.h"
   #include <iostream>
   
   //////////////////////////////////////////////////////////////////////
  @@ -114,19 +115,18 @@
   /*
    *
    */
  -int Attribute::serialize(string& sSerialized)
  +int Attribute::serialize(SoapSerializer& pSZ)
   {    
        int intStatus= FAIL;
   
  -     if (isSerializable()) {
  -             sSerialized+= " ";
  +     if (isSerializable()) {         
  +             pSZ<< " ";
   
  -             if(!m_prefix.empty()) {
  -                     sSerialized= sSerialized+ m_prefix+ ":";
  +             if(!m_prefix.empty()) {                 
  +                     pSZ << m_prefix.c_str() << ":";
                }
   
  -             sSerialized= sSerialized + m_localname +
  -                     "=\""+ m_value+ "\"";
  +             pSZ<< m_localname.c_str() << "=\"" << m_value.c_str() << "\"";
   
                intStatus= SUCCESS;
        }
  @@ -134,21 +134,28 @@
        return intStatus;       
   }
   
  -/*string& Attribute::serialize()
  +/*
  +commented on 10Jul2003 3.30 pm
  +int Attribute::serialize(string& sSerialized)
   {    
  -     m_strAttrSerialized="";
  +     int intStatus= FAIL;
   
        if (isSerializable()) {
  +             sSerialized+= " ";
  +
                if(!m_prefix.empty()) {
  -                     m_strAttrSerialized= m_prefix+ ":";
  +                     sSerialized= sSerialized+ m_prefix+ ":";
                }
   
  -             m_strAttrSerialized= m_strAttrSerialized + m_localname +
  +             sSerialized= sSerialized + m_localname +
                        "=\""+ m_value+ "\"";
  +
  +             intStatus= SUCCESS;
        }
   
  -     return m_strAttrSerialized;     
  -}*/
  +     return intStatus;       
  +}
  +*/
   
   bool Attribute::isSerializable()
   {
  
  
  

Reply via email to