Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

XalanNamespace.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #if !defined(XALANNAMESPACE_HEADER_GUARD_1357924680)
00017 #define XALANNAMESPACE_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base header file.  Must be first.
00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00027 
00028 
00029 
00030 XALAN_CPP_NAMESPACE_BEGIN
00031 
00032 
00033 
00034 class XalanNamespace
00035 {
00036 public:
00037 
00038     explicit
00039     XalanNamespace() :
00040         m_prefix(),
00041         m_uri()
00042     {
00043     }
00044 
00052     XalanNamespace(
00053             const XalanDOMString&   thePrefix,
00054             const XalanDOMString&   theURI) :
00055         m_prefix(thePrefix),
00056         m_uri(theURI)
00057     {
00058     }
00059 
00060     ~XalanNamespace()
00061     {
00062     }
00063 
00069     const XalanDOMString&
00070     getPrefix() const
00071     {
00072         return m_prefix;
00073     }
00074 
00080     void
00081     setPrefix(const XalanDOMString&     thePrefix)
00082     {
00083         m_prefix = thePrefix;
00084     }
00085 
00091     const XalanDOMString&
00092     getURI() const
00093     {
00094         return m_uri;
00095     }
00096 
00102     void
00103     setURI(const XalanDOMString&    theURI)
00104     {
00105         m_uri = theURI;
00106     }
00107 
00113     void
00114     setURI(const XalanDOMChar*  theURI)
00115     {
00116         assert(theURI != 0);
00117 
00118         m_uri = theURI;
00119     }
00120 
00127     void
00128     setURI(
00129             const XalanDOMChar*         theURI,
00130             XalanDOMString::size_type   len)
00131     {
00132         assert(theURI != 0);
00133 
00134         m_uri.assign(theURI, len);
00135     }
00136 
00137     bool
00138     empty() const
00139     {
00140         return m_prefix.empty() && m_uri.empty();
00141     }
00142 
00143     void
00144     clear()
00145     {
00146         m_prefix.clear();
00147 
00148         m_uri.clear();
00149     }
00150 
00156     bool
00157     operator==(const XalanNamespace&    theRHS) const
00158     {
00159         return equals(m_prefix, theRHS.m_prefix) &&
00160                equals(m_uri, theRHS.m_uri);
00161     }   
00162 
00163 private:
00164 
00165     XalanDOMString  m_prefix;
00166 
00167     XalanDOMString  m_uri;
00168 };
00169 
00170 
00171 
00172 XALAN_CPP_NAMESPACE_END
00173 
00174 
00175 
00176 #endif  // XALANNAMESPACE_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.