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 00019 #if !defined(XALAN_TOPLEVELARG_HEADER_GUARD) 00020 #define XALAN_TOPLEVELARG_HEADER_GUARD 00021 00022 00023 00024 00025 // Base include file. Must be first. 00026 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00027 00028 00029 00030 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00031 00032 00033 00034 #include <xalanc/XPath/XalanQNameByValue.hpp> 00035 #include <xalanc/XPath/XObject.hpp> 00036 00037 00038 00039 XALAN_CPP_NAMESPACE_BEGIN 00040 00041 00042 00043 class XObjectPtr; 00044 00045 00046 00047 /** 00048 * This class holds an instance of an argument on the stack. 00049 */ 00050 class XALAN_XSLT_EXPORT TopLevelArg 00051 { 00052 public: 00053 00054 /** 00055 * Construct an argument object from a string expression 00056 * 00057 * @param name name of argument 00058 * @param expr expression argument represents 00059 */ 00060 TopLevelArg( 00061 MemoryManager& theManager, 00062 const XalanQName& name, 00063 const XalanDOMString& expr); 00064 00065 static TopLevelArg* 00066 create( 00067 MemoryManager& theManager, 00068 const XalanQName& name, 00069 const XalanDOMString& expr); 00070 /** 00071 * Construct an argument object from an XObject instance. 00072 * 00073 * @param name name of argument 00074 * @param variable the XObject instance. 00075 */ 00076 TopLevelArg( 00077 MemoryManager& theManager, 00078 const XalanQName& name, 00079 const XObjectPtr variable = XObjectPtr()); 00080 00081 static TopLevelArg* 00082 create( 00083 MemoryManager& theManager, 00084 const XalanQName& name, 00085 const XObjectPtr variable = XObjectPtr()); 00086 /** 00087 * Copy constructor 00088 * 00089 * @param theSource the TopLevelArg to copy. 00090 */ 00091 TopLevelArg( 00092 const TopLevelArg& theSource, 00093 MemoryManager& theManager); 00094 00095 00096 /** 00097 * Destructor 00098 */ 00099 ~TopLevelArg(); 00100 00101 /** 00102 * Retrieve object name 00103 * 00104 * @return qualified name of object 00105 */ 00106 const XalanQName& 00107 getName() const 00108 { 00109 return m_qname; 00110 } 00111 00112 /** 00113 * Retrieve object's expression 00114 * 00115 * @return string representation of expression 00116 */ 00117 const XalanDOMString& 00118 getExpression() const 00119 { 00120 return m_expression; 00121 }; 00122 00123 /** 00124 * Retrieve object's XObject variable. 00125 * 00126 * @return pointer to the XObject instance 00127 */ 00128 const XObjectPtr 00129 getXObject() const 00130 { 00131 return m_xobject; 00132 } 00133 00134 /** 00135 * Assignment operator 00136 */ 00137 TopLevelArg& 00138 operator=(const TopLevelArg& theRHS) 00139 { 00140 if (&theRHS != this) 00141 { 00142 m_qname = theRHS.m_qname; 00143 00144 m_expression = theRHS.m_expression; 00145 } 00146 00147 return *this; 00148 } 00149 00150 private: 00151 // not implemented 00152 TopLevelArg(const TopLevelArg& theSource); 00153 00154 XalanQNameByValue m_qname; 00155 00156 XalanDOMString m_expression; 00157 00158 const XObjectPtr m_xobject; 00159 }; 00160 00161 XALAN_USES_MEMORY_MANAGER(TopLevelArg) 00162 00163 XALAN_CPP_NAMESPACE_END 00164 00165 00166 00167 #endif // XALAN_TOPLEVELARG_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|