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

NameSpace.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(NAMESPACE_HEADER_GUARD_1357924680)
00017 #define NAMESPACE_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base header file.  Must be first.
00022 #include <xalanc/XPath/XPathDefinitions.hpp>
00023 
00024 
00025 
00026 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00027 
00028 
00029 
00030 XALAN_CPP_NAMESPACE_BEGIN
00031 
00032 
00033 
00038 class XALAN_XPATH_EXPORT NameSpace
00039 {
00040 public:
00041 
00042     explicit
00043     NameSpace() :
00044         m_prefix(),
00045         m_uri()
00046     {
00047     }
00048 
00056     NameSpace(
00057             const XalanDOMString&   prefix,
00058             const XalanDOMString&   uri) :
00059         m_prefix(prefix),
00060         m_uri(uri)
00061     {
00062     }
00063 
00064     ~NameSpace()
00065     {
00066     }
00067 
00073     const XalanDOMString&
00074     getPrefix() const
00075     {
00076         return m_prefix;
00077     }
00078 
00084     void
00085     setPrefix(const XalanDOMString&     prefix)
00086     {
00087         m_prefix = prefix;
00088     }
00089 
00095     const XalanDOMString&
00096     getURI() const
00097     {
00098         return m_uri;
00099     }
00100 
00106     void
00107     setURI(const XalanDOMString&    uri)
00108     {
00109         m_uri = uri;
00110     }
00111 
00117     void
00118     setURI(const XalanDOMChar*  uri)
00119     {
00120         assert(uri != 0);
00121 
00122         m_uri = uri;
00123     }
00124 
00131     void
00132     setURI(
00133             const XalanDOMChar*         uri,
00134             XalanDOMString::size_type   len)
00135     {
00136         assert(uri != 0);
00137 
00138         m_uri.assign(uri, len);
00139     }
00140 
00141     bool
00142     empty() const
00143     {
00144         return m_prefix.empty() && m_uri.empty();
00145     }
00146 
00147     void
00148     clear()
00149     {
00150         m_prefix.clear();
00151 
00152         m_uri.clear();
00153     }
00154 
00160     bool
00161     operator==(const NameSpace&     theRHS) const
00162     {
00163         return equals(m_prefix, theRHS.m_prefix) &&
00164                equals(m_uri, theRHS.m_uri);
00165     }   
00166 
00167 private:
00168 
00169     XalanDOMString  m_prefix;
00170 
00171     XalanDOMString  m_uri;
00172 };
00173 
00174 
00175 
00176 XALAN_CPP_NAMESPACE_END
00177 
00178 
00179 
00180 #endif  // NAMESPACE_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.