dbertoni    00/08/27 18:16:17

  Modified:    c/src/XPath NameSpace.hpp
  Log:
  Removed unused member.  Add set accessors.
  
  Revision  Changes    Path
  1.5       +25 -31    xml-xalan/c/src/XPath/NameSpace.hpp
  
  Index: NameSpace.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/NameSpace.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NameSpace.hpp     2000/08/22 20:20:45     1.4
  +++ NameSpace.hpp     2000/08/28 01:16:16     1.5
  @@ -64,7 +64,7 @@
   
   
   
  -#include <XalanDOM/XalanDOMString.hpp>
  +#include <PlatformSupport/DOMStringHelper.hpp>
   
   
   
  @@ -87,8 +87,7 @@
                        const XalanDOMString&   prefix = XalanDOMString(),
                        const XalanDOMString&   uri = XalanDOMString()) :
       m_prefix(prefix),
  -    m_uri(uri),
  -     m_resultCandidate(true)
  +    m_uri(uri)
        {
        }
   
  @@ -104,61 +103,56 @@
        }
   
        /**
  -      * Retrieve the URI for namespace
  +      * Set the prefix for namespace
         * 
  -      * @return URI string
  +      * @param prefix The new prefix value
         */
  -     const XalanDOMString&
  -     getURI() const
  +     void
  +     setPrefix(const XalanDOMString&         prefix)
        {
  -             return m_uri;
  +             m_prefix = prefix;
        }
   
        /**
  -      * Whether the namespace is a candidate for result namespace.
  +      * Retrieve the URI for namespace
         * 
  -      * @return true if it is a candidate
  +      * @return URI string
         */
  -     bool
  -     getResultCandidate() const
  +     const XalanDOMString&
  +     getURI() const
        {
  -             return m_resultCandidate;
  +             return m_uri;
        }
   
        /**
  -      * Set whether the namespace is a candidate for result namespace.
  +      * Set the URI for namespace
         * 
  -      * @param fResultCandidate true to set namespace as candidate
  +      * @param uri The new uri value
         */
        void
  -     setResultCandidate(bool         fResultCandidate)
  +     setURI(const XalanDOMString&    uri)
        {
  -             m_resultCandidate = fResultCandidate;
  +             m_uri = uri;
        }
   
        /**
  -      * Assignment operator, required for STL vector.
  -      * 
  -      * @param theRHS namespace to assign
  +      * Equality operator, necessary because DOMString::==()
  +      * has screwy semantics.
  +      *
  +      * @param theRHS namespace to compare
         */
  -     NameSpace&
  -     operator=(const NameSpace&      theRHS)
  +     bool
  +     operator==(const NameSpace&             theRHS) const
        {
  -             if (&theRHS != this)
  -             {
  -                     m_prefix = theRHS.m_prefix;
  -                     m_uri = theRHS.m_uri;
  -                     m_resultCandidate = theRHS.m_resultCandidate;
  -             }
  -
  -             return *this;
  +             return equals(m_prefix, theRHS.m_prefix) &&
  +                        equals(m_uri, theRHS.m_uri);
        }       
   
   private:
   
        XalanDOMString  m_prefix;
  +
        XalanDOMString  m_uri; // if length is 0, then Element namespace is 
empty.
  -     bool                    m_resultCandidate;
   };
   
   
  
  
  

Reply via email to