Xalan-C++ API Reference 1.12.0
XalanQNameByReference.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680)
19#define XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680
20
21
22
23// Base header file. Must be first.
25
26
27
28// Base class header file...
30
31
32
33namespace XALAN_CPP_NAMESPACE {
34
35
36
38{
39public:
40
41 /**
42 * Construct an empty XalanQNameByReference.
43 */
44 explicit
46
47 /**
48 * Construct a XalanQNameByReference, with the supplied namespace and local part.
49 * The instance keeps only a _reference_ to the string, to avoid making a
50 * copy.
51 *
52 * @param theNamespace namespace string
53 * @param theLocalPart local part string
54 */
58
59 /**
60 * Construct a XalanQNameByReference, with the supplied local part.
61 * The instance keeps only a _reference_ to the string, to avoid making a
62 * copy.
63 *
64 * @param theLocalPart local part string
65 */
67
68 /**
69 * Construct a XalanQNameByReference, from the supplied XalanQName. The instance
70 * keeps only a _reference_ to the string, to avoid making a copy.
71 *
72 * @param theQName The source QName
73 */
75
76 virtual
78
79 /**
80 * Retrieve the local part of qualified name.
81 *
82 * @return local part string
83 */
84 virtual const XalanDOMString&
85 getLocalPart() const;
86
87 /**
88 * Set the local part of qualified name.
89 *
90 * @param theLocalPart local part string
91 */
92 void
94 {
95 m_localpart = &theLocalPart;
96 }
97
98 /**
99 * Retrieve the namespace of qualified name.
100 *
101 * @return namespace string
102 */
103 virtual const XalanDOMString&
105
106 /**
107 * Set the Namespace URI of qualified name.
108 *
109 * @param theLocalPart local part string
110 */
111 void
113 {
114 m_namespace = &theNamespace;
115 }
116
117 /**
118 * Clear the instance.
119 */
120 void
122 {
123 m_namespace = &s_emptyString;
124 m_localpart = &s_emptyString;
125 }
126
127private:
128
129 // OK, we said reference, but using pointers
130 // allows for copy and assignment semantics.
131 const XalanDOMString* m_namespace;
132
133 const XalanDOMString* m_localpart;
134};
135
136
137
138template<>
140{
141};
142
143
144
145}
146
147
148
149#endif // XALANQNAMEBYREFERENCE_HEADER_GUARD_1357924680
#define XALAN_XPATH_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
void setNamespace(const XalanDOMString &theNamespace)
Set the Namespace URI of qualified name.
virtual const XalanDOMString & getLocalPart() const
Retrieve the local part of qualified name.
XalanQNameByReference(const XalanDOMString &theNamespace, const XalanDOMString &theLocalPart)
Construct a XalanQNameByReference, with the supplied namespace and local part.
virtual const XalanDOMString & getNamespace() const
Retrieve the namespace of qualified name.
XalanQNameByReference(const XalanDOMString &theLocalPart)
Construct a XalanQNameByReference, with the supplied local part.
XalanQNameByReference(const XalanQName &theQName)
Construct a XalanQNameByReference, from the supplied XalanQName.
void setLocalPart(const XalanDOMString &theLocalPart)
Set the local part of qualified name.
XalanQNameByReference()
Construct an empty XalanQNameByReference.
Class to represent a qualified name.