Xalan-C++ API Reference 1.12.0
TopLevelArg.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
19#if !defined(XALAN_TOPLEVELARG_HEADER_GUARD)
20#define XALAN_TOPLEVELARG_HEADER_GUARD
21
22
23
24
25// Base include file. Must be first.
27
28
29
31
32
33
36
37
38
39namespace XALAN_CPP_NAMESPACE {
40
41
42
43class XObjectPtr;
44
45
46
47/**
48 * This class holds an instance of an argument on the stack.
49 */
51{
52public:
53
54 /**
55 * Construct an argument object from a string expression
56 *
57 * @param name name of argument
58 * @param expr expression argument represents
59 */
61 MemoryManager& theManager,
62 const XalanQName& name,
63 const XalanDOMString& expr);
64
65 static TopLevelArg*
67 MemoryManager& theManager,
68 const XalanQName& name,
69 const XalanDOMString& expr);
70 /**
71 * Construct an argument object from an XObject instance.
72 *
73 * @param name name of argument
74 * @param variable the XObject instance.
75 */
77 MemoryManager& theManager,
78 const XalanQName& name,
79 const XObjectPtr variable = XObjectPtr());
80
81 static TopLevelArg*
83 MemoryManager& theManager,
84 const XalanQName& name,
85 const XObjectPtr variable = XObjectPtr());
86 /**
87 * Copy constructor
88 *
89 * @param theSource the TopLevelArg to copy.
90 */
93 MemoryManager& theManager);
94
95
96 /**
97 * Destructor
98 */
100
101 /**
102 * Retrieve object name
103 *
104 * @return qualified name of object
105 */
106 const XalanQName&
107 getName() const
108 {
109 return m_qname;
110 }
111
112 /**
113 * Retrieve object's expression
114 *
115 * @return string representation of expression
116 */
117 const XalanDOMString&
119 {
120 return m_expression;
121 };
122
123 /**
124 * Retrieve object's XObject variable.
125 *
126 * @return pointer to the XObject instance
127 */
128 const XObjectPtr
130 {
131 return m_xobject;
132 }
133
134 /**
135 * Assignment operator
136 */
139 {
140 if (&theRHS != this)
141 {
142 m_qname = theRHS.m_qname;
143
144 m_expression = theRHS.m_expression;
145 }
146
147 return *this;
148 }
149
150private:
151 // not implemented
153
154 XalanQNameByValue m_qname;
155
156 XalanDOMString m_expression;
157
158 const XObjectPtr m_xobject;
159};
160
161XALAN_USES_MEMORY_MANAGER(TopLevelArg)
162
163}
164
165
166
167#endif // XALAN_TOPLEVELARG_HEADER_GUARD
#define XALAN_XSLT_EXPORT
#define XALAN_USES_MEMORY_MANAGER(Type)
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
This class holds an instance of an argument on the stack.
TopLevelArg(const TopLevelArg &theSource, MemoryManager &theManager)
Copy constructor.
const XObjectPtr getXObject() const
Retrieve object's XObject variable.
~TopLevelArg()
Destructor.
static TopLevelArg * create(MemoryManager &theManager, const XalanQName &name, const XObjectPtr variable=XObjectPtr())
TopLevelArg & operator=(const TopLevelArg &theRHS)
Assignment operator.
const XalanDOMString & getExpression() const
Retrieve object's expression.
const XalanQName & getName() const
Retrieve object name.
static TopLevelArg * create(MemoryManager &theManager, const XalanQName &name, const XalanDOMString &expr)
TopLevelArg(MemoryManager &theManager, const XalanQName &name, const XalanDOMString &expr)
Construct an argument object from a string expression.
TopLevelArg(MemoryManager &theManager, const XalanQName &name, const XObjectPtr variable=XObjectPtr())
Construct an argument object from an XObject instance.
Class to hold XObjectPtr return types.
Definition XObject.hpp:884
Class to represent a qualified name.