You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ga...@apache.org on 2002/11/21 16:42:39 UTC

cvs commit: xml-xerces/c/src/xercesc/util XMLUri.cpp XMLUri.hpp

gareth      2002/11/21 07:42:39

  Modified:    c/src/xercesc/util XMLUri.cpp XMLUri.hpp
  Log:
  Implemented copy constructor and operator =. Patch by Jennifer Schachter.
  
  Revision  Changes    Path
  1.8       +28 -1     xml-xerces/c/src/xercesc/util/XMLUri.cpp
  
  Index: XMLUri.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLUri.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLUri.cpp	14 Nov 2002 22:16:04 -0000	1.7
  +++ XMLUri.cpp	21 Nov 2002 15:42:39 -0000	1.8
  @@ -283,6 +283,33 @@
       }
   }
   
  +//Copy constructor
  +XMLUri::XMLUri(const XMLUri& toCopy)
  +{
  +    try {
  +        initialize(toCopy);
  +    }
  +    catch (...)
  +    {
  +        cleanUp();
  +        throw;
  +    }
  +
  +}
  +
  +XMLUri& XMLUri::operator=(const XMLUri& toAssign)
  +{
  +    try {
  +        initialize(toAssign);
  +    }
  +    catch (...)
  +    {
  +        cleanUp();
  +        throw;
  +    }
  +    return *this;
  +}  
  +
   XMLUri::~XMLUri()
   {
       cleanUp();
  
  
  
  1.6       +10 -7     xml-xerces/c/src/xercesc/util/XMLUri.hpp
  
  Index: XMLUri.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLUri.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLUri.hpp	4 Nov 2002 15:22:05 -0000	1.5
  +++ XMLUri.hpp	21 Nov 2002 15:42:39 -0000	1.6
  @@ -57,6 +57,9 @@
   /*
    * $Id$
    * $Log$
  + * Revision 1.6  2002/11/21 15:42:39  gareth
  + * Implemented copy constructor and operator =. Patch by Jennifer Schachter.
  + *
    * Revision 1.5  2002/11/04 15:22:05  tng
    * C++ Namespace Support.
    *
  @@ -153,6 +156,12 @@
       XMLUri(const XMLUri* const     baseURI
            , const XMLCh* const      uriSpec);
   
  +    /**
  +     * Copy constructor
  +     */
  +    XMLUri(const XMLUri& toCopy);
  +    XMLUri& operator=(const XMLUri& toAssign);
  +
       virtual ~XMLUri();
   
       // -----------------------------------------------------------------------
  @@ -317,12 +326,6 @@
   
       //helper method for getUriText
       void buildFullText();
  -
  -    /**
  -     * Unimplemented copy ctor
  -     */
  -    XMLUri(const XMLUri& toCopy);
  -    XMLUri& operator=(const XMLUri& toAssign);
   
       // -----------------------------------------------------------------------
       //  Private helper methods
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org