You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/01/25 17:49:52 UTC

cvs commit: ws-axis/c/src/soap/xsd NegativeInteger.cpp NegativeInteger.hpp

dicka       2005/01/25 08:49:52

  Modified:    c/src/soap Makefile.am
               c/vc     AxisClientDLL.dsp AxisServerDLL.dsp
  Added:       c/src/soap/xsd NegativeInteger.cpp NegativeInteger.hpp
  Log:
  Add NegativeInteger type to Simple types OO model.
  
  Submitted by: Adrian Dick
  
  Revision  Changes    Path
  1.30      +1 -0      ws-axis/c/src/soap/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/Makefile.am,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Makefile.am	25 Jan 2005 16:18:15 -0000	1.29
  +++ Makefile.am	25 Jan 2005 16:49:52 -0000	1.30
  @@ -48,6 +48,7 @@
           xsd/UnsignedByte.cpp \
           xsd/PositiveInteger.cpp \
           xsd/NonPositiveInteger.cpp \
  +        xsd/NegativeInteger.cpp \
           xsd/constraints/IConstrainingFacet.cpp \
           xsd/constraints/WhiteSpace.cpp \
           xsd/constraints/Pattern.cpp \
  
  
  
  1.40      +4 -0      ws-axis/c/vc/AxisClientDLL.dsp
  
  Index: AxisClientDLL.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/AxisClientDLL.dsp,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- AxisClientDLL.dsp	25 Jan 2005 16:18:15 -0000	1.39
  +++ AxisClientDLL.dsp	25 Jan 2005 16:49:52 -0000	1.40
  @@ -330,6 +330,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\src\soap\xsd\NegativeInteger.cpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\src\soap\xsd\NonNegativeInteger.cpp
   # End Source File
   # Begin Source File
  
  
  
  1.39      +4 -0      ws-axis/c/vc/AxisServerDLL.dsp
  
  Index: AxisServerDLL.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/AxisServerDLL.dsp,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- AxisServerDLL.dsp	25 Jan 2005 16:18:15 -0000	1.38
  +++ AxisServerDLL.dsp	25 Jan 2005 16:49:52 -0000	1.39
  @@ -326,6 +326,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\src\soap\xsd\NegativeInteger.cpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\src\soap\xsd\NonNegativeInteger.cpp
   # End Source File
   # Begin Source File
  
  
  
  1.1                  ws-axis/c/src/soap/xsd/NegativeInteger.cpp
  
  Index: NegativeInteger.cpp
  ===================================================================
  #include "NegativeInteger.hpp"
  
  AXIS_CPP_NAMESPACE_START
  
  unsigned LONGLONG* NegativeInteger::deserializeNegativeInteger(const AxisChar* valueAsChar) throw (AxisSoapException)
  {
      return (unsigned LONGLONG*) deserialize(valueAsChar);
  }
  
  MaxInclusive* NegativeInteger::getMaxInclusive()
  {   
      return new MaxInclusive((unsigned LONGLONG) 1);
      /* 
       * Note: 
       * Due to use of unsigned values all values are actually negative
       */
  }
  
  AXIS_CPP_NAMESPACE_END
  
  
  
  1.1                  ws-axis/c/src/soap/xsd/NegativeInteger.hpp
  
  Index: NegativeInteger.hpp
  ===================================================================
  /* -*- C++ -*- */
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   *
   * @author Adrian Dick (adrian.dick@uk.ibm.com)
   *
   */
  
  #if !defined(_NEGATIVEINTEGER_HPP____OF_AXIS_INCLUDED_)
  #define _NEGATIVEINTEGER_HPP____OF_AXIS_INCLUDED_
  
  #include "NonPositiveInteger.hpp"
  
  AXIS_CPP_NAMESPACE_START
  
  using namespace std;
  
  class NegativeInteger : public NonPositiveInteger {
  public:
  
    /**
     * Deserialized NegativeInteger value from it's on-the-wire string form.
     * @param valueAsChar Serialized form of NegativeInteger value.
     * @return Deserialized NegativeInteger value.
     */
      unsigned LONGLONG* deserializeNegativeInteger(const AxisChar* valueAsChar) throw (AxisSoapException);
  
  protected:
  
      /**
       * Creates a MaxInclusive object.  For the NegativeInteger type this is
       * defined as -1.  
       * @return MaxInclusive object
       */
      virtual MaxInclusive* getMaxInclusive();
  };
  
  AXIS_CPP_NAMESPACE_END
  
  #endif