susantha    2003/06/29 20:59:44

  Modified:    c/src/common Param.h Param.cpp
  Log:
  Added few other basic types
  
  Revision  Changes    Path
  1.2       +3 -1      xml-axis/c/src/common/Param.h
  
  Index: Param.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/Param.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Param.h   25 Jun 2003 07:11:19 -0000      1.1
  +++ Param.h   30 Jun 2003 03:59:44 -0000      1.2
  @@ -87,9 +87,10 @@
   public:
        Param(){ m_Type = USER_TYPE;}; //if there is no attribute that says the type
        Param(Param& param);
  -     Param(string &str);
  +     Param(string &str, XSDTYPE type=XSD_STRING);
        Param(int nValue);
        Param(float fValue);
  +     Param(double dValue);
        virtual ~Param();
        void operator=(Param &param);
   
  @@ -98,6 +99,7 @@
        {
                int n;
                float f;
  +             double d;
                //all basic types should come here
                ArrayBean* a; //holds array types
                AccessBean* o; //this is used to hold user types 
  
  
  
  1.2       +15 -3     xml-axis/c/src/common/Param.cpp
  
  Index: Param.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/Param.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Param.cpp 25 Jun 2003 07:11:19 -0000      1.1
  +++ Param.cpp 30 Jun 2003 03:59:44 -0000      1.2
  @@ -105,11 +105,16 @@
        }
   }
   
  -Param::Param(string &str)
  +Param::Param(string &str, XSDTYPE type)
   {
  -     m_sName = "String";
        m_sValue = str;
  -     m_Type = XSD_STRING;
  +     m_Type = type;
  +     switch (type)
  +     {
  +     case XSD_STRING: m_sName = "String"; break;
  +     case XSD_BASE64BINARY: m_sName = "Base64BinaryString"; break;
  +     case XSD_HEXBINARY: m_sName = "HexBinaryString"; break;
  +     }
   }
   
   Param::Param(int nValue)
  @@ -124,6 +129,13 @@
        m_sName = "Float";
        m_Value.f = fValue;
        m_Type = XSD_FLOAT;
  +}
  +
  +Param::Param(double dValue)
  +{
  +     m_sName = "Double";
  +     m_Value.d = dValue;
  +     m_Type = XSD_DOUBLE;
   }
   
   Param::~Param()
  
  
  

Reply via email to