Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.9

Main Page | 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(MemoryManagerType&      theManager) :
00040         m_prefix(theManager),
00041         m_uri(theManager)
00042     {
00043     }
00044 
00052     XalanNamespace(
00053             const XalanDOMString&   thePrefix,
00054             const XalanDOMString&   theURI,
00055             MemoryManagerType&      theManager) :
00056         m_prefix(thePrefix,theManager),
00057         m_uri(theURI, theManager)
00058     {
00059     }
00060 
00061     XalanNamespace(
00062             const XalanNamespace&   other,
00063             MemoryManagerType&      theManager) :
00064         m_prefix(other.m_prefix,theManager),
00065         m_uri(other.m_uri, theManager)
00066     {
00067     }
00068 
00069     ~XalanNamespace()
00070     {
00071     }
00072 
00078     const XalanDOMString&
00079     getPrefix() const
00080     {
00081         return m_prefix;
00082     }
00083 
00089     void
00090     setPrefix(const XalanDOMString&     thePrefix)
00091     {
00092         m_prefix = thePrefix;
00093     }
00094 
00100     const XalanDOMString&
00101     getURI() const
00102     {
00103         return m_uri;
00104     }
00105 
00111     void
00112     setURI(const XalanDOMString&    theURI)
00113     {
00114         m_uri = theURI;
00115     }
00116 
00122     void
00123     setURI(const XalanDOMChar*  theURI)
00124     {
00125         assert(theURI != 0);
00126 
00127         m_uri = theURI;
00128     }
00129 
00136     void
00137     setURI(
00138             const XalanDOMChar*         theURI,
00139             XalanDOMString::size_type   len)
00140     {
00141         assert(theURI != 0);
00142 
00143         m_uri.assign(theURI, len);
00144     }
00145 
00146     bool
00147     empty() const
00148     {
00149         return m_prefix.empty() && m_uri.empty();
00150     }
00151 
00152     void
00153     clear()
00154     {
00155         m_prefix.clear();
00156 
00157         m_uri.clear();
00158     }
00159 
00165     bool
00166     operator==(const XalanNamespace&    theRHS) const
00167     {
00168         return equals(m_prefix, theRHS.m_prefix) &&
00169                equals(m_uri, theRHS.m_uri);
00170     }   
00171 
00172 private:
00173     //Not implemented
00174     XalanNamespace();
00175     XalanNamespace(const XalanNamespace&);
00176 
00177     XalanDOMString  m_prefix;
00178 
00179     XalanDOMString  m_uri;
00180 };
00181 
00182 XALAN_USES_MEMORY_MANAGER(XalanNamespace)
00183 
00184 XALAN_CPP_NAMESPACE_END
00185 
00186 
00187 
00188 #endif  // ALANNAMESPACE_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.9
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.