00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680) 00019 #define XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base header file. Must be first. 00024 #include <xalanc/XPath/XPathDefinitions.hpp> 00025 00026 00027 00028 // Base class header file... 00029 #include <xalanc/XPath/XalanQName.hpp> 00030 00031 00032 00033 XALAN_CPP_NAMESPACE_BEGIN 00034 00035 00036 00037 class XALAN_XPATH_EXPORT XalanQNameByReference : public XalanQName 00038 { 00039 public: 00040 00041 /** 00042 * Construct an empty XalanQNameByReference. 00043 */ 00044 explicit 00045 XalanQNameByReference(); 00046 00047 /** 00048 * Construct a XalanQNameByReference, with the supplied namespace and local part. 00049 * The instance keeps only a _reference_ to the string, to avoid making a 00050 * copy. 00051 * 00052 * @param theNamespace namespace string 00053 * @param theLocalPart local part string 00054 */ 00055 XalanQNameByReference( 00056 const XalanDOMString& theNamespace, 00057 const XalanDOMString& theLocalPart); 00058 00059 /** 00060 * Construct a XalanQNameByReference, with the supplied local part. 00061 * The instance keeps only a _reference_ to the string, to avoid making a 00062 * copy. 00063 * 00064 * @param theLocalPart local part string 00065 */ 00066 XalanQNameByReference(const XalanDOMString& theLocalPart); 00067 00068 /** 00069 * Construct a XalanQNameByReference, from the supplied XalanQName. The instance 00070 * keeps only a _reference_ to the string, to avoid making a copy. 00071 * 00072 * @param theQName The source QName 00073 */ 00074 XalanQNameByReference(const XalanQName& theQName); 00075 00076 virtual 00077 ~XalanQNameByReference(); 00078 00079 /** 00080 * Retrieve the local part of qualified name. 00081 * 00082 * @return local part string 00083 */ 00084 virtual const XalanDOMString& 00085 getLocalPart() const; 00086 00087 /** 00088 * Set the local part of qualified name. 00089 * 00090 * @param theLocalPart local part string 00091 */ 00092 void 00093 setLocalPart(const XalanDOMString& theLocalPart) 00094 { 00095 m_localpart = &theLocalPart; 00096 } 00097 00098 /** 00099 * Retrieve the namespace of qualified name. 00100 * 00101 * @return namespace string 00102 */ 00103 virtual const XalanDOMString& 00104 getNamespace() const; 00105 00106 /** 00107 * Set the Namespace URI of qualified name. 00108 * 00109 * @param theLocalPart local part string 00110 */ 00111 void 00112 setNamespace(const XalanDOMString& theNamespace) 00113 { 00114 m_namespace = &theNamespace; 00115 } 00116 00117 /** 00118 * Clear the instance. 00119 */ 00120 void 00121 clear() 00122 { 00123 m_namespace = &s_emptyString; 00124 m_localpart = &s_emptyString; 00125 } 00126 00127 private: 00128 00129 // OK, we said reference, but using pointers 00130 // allows for copy and assignment semantics. 00131 const XalanDOMString* m_namespace; 00132 00133 const XalanDOMString* m_localpart; 00134 }; 00135 00136 00137 00138 template<> 00139 struct XalanMapKeyTraits<XalanQNameByReference> : public XalanMapKeyTraits<XalanQName> 00140 { 00141 }; 00142 00143 00144 00145 XALAN_CPP_NAMESPACE_END 00146 00147 00148 00149 #endif // XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|