dbertoni    02/04/11 21:54:22

  Modified:    c/src/XSLT XSLTInputSource.cpp XSLTInputSource.hpp
  Log:
  Added copy constructor and assignment operator.
  
  Revision  Changes    Path
  1.15      +51 -3     xml-xalan/c/src/XSLT/XSLTInputSource.cpp
  
  Index: XSLTInputSource.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTInputSource.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XSLTInputSource.cpp       2 Apr 2002 06:13:16 -0000       1.14
  +++ XSLTInputSource.cpp       12 Apr 2002 04:54:22 -0000      1.15
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -85,12 +85,18 @@
   
   
   
  -#if defined(XALAN_IMPLICIT_CONSTRUCTION_REQUIRES_COPY_CONSTRUCTOR)
  -XSLTInputSource::XSLTInputSource(const XSLTInputSource&              
theSource) :
  +// $$$ ToDo:  Xerces' InputSource class does not yet have a copy
  +// constructor or assignment operator.  See bug #7944.
  +XSLTInputSource::XSLTInputSource(const XSLTInputSource&      theSource) :
  +#if 1
        InputSource(),
  +#else
  +     InputSource(theSource)
  +#endif
        m_stream(theSource.m_stream),
        m_node(theSource.m_node)
   {
  +#if 1
        setIssueFatalErrorIfNotFound(theSource.getIssueFatalErrorIfNotFound());
   
        const XMLCh*    theValue = theSource.getSystemId();
  @@ -113,8 +119,50 @@
        {
                setEncoding(theValue);
        }
  +#endif
   }
  +
  +
  +
  +XSLTInputSource&
  +XSLTInputSource::operator=(const XSLTInputSource&    theRHS)
  +{
  +     if (this != &theRHS)
  +     {
  +             m_stream = theRHS.m_stream;
  +             m_node = theRHS.m_node;
  +#if 1
  +             
setIssueFatalErrorIfNotFound(theRHS.getIssueFatalErrorIfNotFound());
  +
  +             const XMLCh*    theValue = theRHS.getSystemId();
  +
  +             if (theValue != 0)
  +             {
  +                     setSystemId(theValue);
  +             }
  +
  +             theValue = theRHS.getPublicId();
  +
  +             if (theValue != 0)
  +             {
  +                     setPublicId(theValue);
  +             }
  +
  +             theValue = theRHS.getEncoding();
  +
  +             if (theValue != 0)
  +             {
  +                     setEncoding(theValue);
  +             }
   #endif
  +     }
  +
  +#if 1
  +     return *this;
  +#else
  +     return InputSource::operator=(theRHS);
  +#endif
  +}
   
   
   
  
  
  
  1.14      +11 -12    xml-xalan/c/src/XSLT/XSLTInputSource.hpp
  
  Index: XSLTInputSource.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTInputSource.hpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XSLTInputSource.hpp       23 Feb 2002 04:23:17 -0000      1.13
  +++ XSLTInputSource.hpp       12 Apr 2002 04:54:22 -0000      1.14
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -93,9 +93,16 @@
        explicit
        XSLTInputSource();
   
  -#if defined(XALAN_IMPLICIT_CONSTRUCTION_REQUIRES_COPY_CONSTRUCTOR)
  -     XSLTInputSource(const XSLTInputSource&);
  -#endif
  +     /**
  +      * Copy constructor.
  +      */
  +     XSLTInputSource(const XSLTInputSource&  theSource);
  +
  +     /**
  +      * Assignment operator.
  +      */
  +     XSLTInputSource&
  +     operator=(const XSLTInputSource&        theRHS);
   
        /**
         * Create a new input source with a system identifier.
  @@ -229,14 +236,6 @@
        }
   
   private:
  -
  -#if !defined(XALAN_IMPLICIT_CONSTRUCTION_REQUIRES_COPY_CONSTRUCTOR)
  -     // Not implemented...
  -     XSLTInputSource(const XSLTInputSource&);
  -#endif
  -
  -     void
  -     operator=(const XSLTInputSource&);
   
   #if defined(XALAN_NO_NAMESPACES)
        istream*                m_stream;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to