## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.10

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XalanEXSLTCommonImpl.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(EXSLT_COMMONIMPL_HEADER_GUARD_1357924680)
    00017 #define EXSLT_COMMONIMPL_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 #include "XalanEXSLTDefinitions.hpp"
    00022
    00023
    00024
    00025 #include <xalanc/PlatformSupport/XalanMessageLoader.hpp>
    00026
    00027
    00028
    00029 #include <xalanc/XPath/Function.hpp>
    00030
    00031
    00032
    00033 #include <xalanc/XalanExtensions/FunctionNodeSet.hpp>
    00034
    00035
    00036
    00037 XALAN_CPP_NAMESPACE_BEGIN
    00038
    00039
    00040
    00041 class XALAN_EXSLT_EXPORT XalanEXSLTFunctionNodeSet : public FunctionNodeSet
    00042 {
    00043 public:
    00044
    00045     XalanEXSLTFunctionNodeSet() :
    00046         FunctionNodeSet(true)
    00047     {
    00048     }
    00049
    00050     virtual
    00051     ~XalanEXSLTFunctionNodeSet()
    00052     {
    00053     }
    00054
    00055 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
    00056     virtual Function*
    00057 #else
    00058     virtual XalanEXSLTFunctionNodeSet*
    00059 #endif
    00060     clone(MemoryManagerType& theManager) const
    00061     {
    00062         return XalanCopyConstruct(theManager, *this);
    00063     }
    00064
    00065 protected:
    00066
    00067     virtual const XalanDOMString&
    00068     getError(XalanDOMString&    theBuffer) const
    00069     {
    00070         XalanMessageLoader::getMessage(
    00071             theBuffer,
    00072             XalanMessages::EXSLTFunctionAcceptsOneArgument_1Param,
    00073             "node-set()");
    00074
    00075         return theBuffer;
    00076     }
    00077
    00078
    00079     virtual const XalanDOMString&
    00080     getInvalidArgumentTypeError(XalanDOMString& theResult) const
    00081     {
    00082          XalanMessageLoader::getMessage(
    00083              theResult,
    00084              XalanMessages::InvalidArgumentType_1Param,
    00085              "node-set()");
    00086
    00087          return theResult;
    00088     }
    00089
    00090 private:
    00091
    00092     // Not implemented...
    00093     XalanEXSLTFunctionNodeSet&
    00094     operator=(const XalanEXSLTFunctionNodeSet&);
    00095
    00096     bool
    00097     operator==(const XalanEXSLTFunctionNodeSet&) const;
    00098 };
    00099
    00100
    00101
    00102 class XALAN_EXSLT_EXPORT XalanEXSLTFunctionObjectType : public Function
    00103 {
    00104 public:
    00105
    00106     typedef Function    ParentType;
    00107
    00108     XalanEXSLTFunctionObjectType(MemoryManagerType& theManager) :
    00109         Function(),
    00110         m_boolean(s_booleanString, theManager),
    00111         m_external(s_externalString, theManager),
    00112         m_nodeSet(s_nodeSetString, theManager),
    00113         m_number(s_numberString, theManager),
    00114         m_rtf(s_rtfString, theManager),
    00115         m_string(s_stringString, theManager)
    00116     {
    00117     }
    00118
    00119     // A dummy constructor for use internally.  Do not use this one!!!!
    00120     XalanEXSLTFunctionObjectType(MemoryManagerType& theManager, int /* theDummy */) :
    00121         Function(),
    00122         m_boolean(theManager),
    00123         m_external(theManager),
    00124         m_nodeSet(theManager),
    00125         m_number(theManager),
    00126         m_rtf(theManager),
    00127         m_string(theManager)
    00128     {
    00129     }
    00130
    00131     virtual
    00132     ~XalanEXSLTFunctionObjectType()
    00133     {
    00134     }
    00135
    00136     // These methods are inherited from Function ...
    00137
    00138     virtual XObjectPtr
    00139     execute(
    00140             XPathExecutionContext&          executionContext,
    00141             XalanNode*                      context,
    00142             const XObjectArgVectorType&     args,
    00143             const LocatorType*              locator) const;
    00144
    00145 #if !defined(XALAN_NO_USING_DECLARATION)
    00146     using ParentType::execute;
    00147 #endif
    00148
    00149 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
    00150     virtual Function*
    00151 #else
    00152     virtual XalanEXSLTFunctionObjectType*
    00153 #endif
    00154     clone(MemoryManagerType& theManager) const
    00155     {
    00156         typedef  XalanEXSLTFunctionObjectType Type;
    00157
    00158         XalanMemMgrAutoPtr<Type, false> theGuard( theManager , (Type*)theManager.allocate(sizeof(Type)));
    00159
    00160         Type* theResult = theGuard.get();
    00161
    00162         new (theResult) Type(theManager);
    00163
    00164          theGuard.release();
    00165
    00166         return theResult;
    00167     }
    00168
    00169 protected:
    00170
    00171
    00172
    00173     const XalanDOMString&
    00174     getError(XalanDOMString& theResult) const;
    00175
    00176 private:
    00177
    00178     // Not implemented...
    00179     XalanEXSLTFunctionObjectType(const XalanEXSLTFunctionObjectType&);
    00180
    00181     XalanEXSLTFunctionObjectType&
    00182     operator=(const XalanEXSLTFunctionObjectType&);
    00183
    00184     bool
    00185     operator==(const XalanEXSLTFunctionObjectType&) const;
    00186
    00187
    00188     // Data members...
    00189     const XalanDOMString    m_boolean;
    00190     const XalanDOMString    m_external;
    00191     const XalanDOMString    m_nodeSet;
    00192     const XalanDOMString    m_number;
    00193     const XalanDOMString    m_rtf;
    00194     const XalanDOMString    m_string;
    00195
    00196     static const XalanDOMChar   s_booleanString[];
    00197     static const XalanDOMChar   s_externalString[];
    00198     static const XalanDOMChar   s_nodeSetString[];
    00199     static const XalanDOMChar   s_numberString[];
    00200     static const XalanDOMChar   s_rtfString[];
    00201     static const XalanDOMChar   s_stringString[];
    00202 };
    00203
    00204
    00205
    00206 XALAN_CPP_NAMESPACE_END
    00207
    00208
    00209
    00210 #endif  // EXSLT_COMMONIMPL_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.10 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.