Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

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(XalanMessages::EXSLTFunctionAcceptsOneArgument_1Param,theBuffer , "node-set()");
00071 
00072         return theBuffer;
00073     }
00074 
00075 
00076     virtual const XalanDOMString&
00077     getInvalidArgumentTypeError(XalanDOMString& theResult) const 
00078     {
00079          XalanMessageLoader::getMessage(XalanMessages::InvalidArgumentType_1Param,theResult,"node-set()");
00080          
00081          return theResult;
00082     }
00083 
00084 private:
00085 
00086     // Not implemented...
00087     XalanEXSLTFunctionNodeSet&
00088     operator=(const XalanEXSLTFunctionNodeSet&);
00089 
00090     bool
00091     operator==(const XalanEXSLTFunctionNodeSet&) const;
00092 };
00093 
00094 
00095 
00096 class XALAN_EXSLT_EXPORT XalanEXSLTFunctionObjectType : public Function
00097 {
00098 public:
00099 
00100     typedef Function    ParentType;
00101 
00102     XalanEXSLTFunctionObjectType(MemoryManagerType& theManager) :
00103         Function(),
00104         m_boolean(s_booleanString, theManager),
00105         m_external(s_externalString, theManager),
00106         m_nodeSet(s_nodeSetString, theManager),
00107         m_number(s_numberString, theManager),
00108         m_rtf(s_rtfString, theManager),
00109         m_string(s_stringString, theManager)
00110     {
00111     }
00112 
00113     // A dummy constructor for use internally.  Do not use this one!!!!
00114     XalanEXSLTFunctionObjectType(MemoryManagerType& theManager, int /* theDummy */) :
00115         Function(),
00116         m_boolean(theManager),
00117         m_external(theManager),
00118         m_nodeSet(theManager),
00119         m_number(theManager),
00120         m_rtf(theManager),
00121         m_string(theManager)
00122     {
00123     }
00124 
00125     virtual
00126     ~XalanEXSLTFunctionObjectType()
00127     {
00128     }
00129 
00130     // These methods are inherited from Function ...
00131 
00132     virtual XObjectPtr
00133     execute(
00134             XPathExecutionContext&          executionContext,
00135             XalanNode*                      context,
00136             const XObjectArgVectorType&     args,
00137             const LocatorType*              locator) const;
00138 
00139 #if !defined(XALAN_NO_USING_DECLARATION)
00140     using ParentType::execute;
00141 #endif
00142 
00143 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
00144     virtual Function*
00145 #else
00146     virtual XalanEXSLTFunctionObjectType*
00147 #endif
00148     clone(MemoryManagerType& theManager) const
00149     {
00150         typedef  XalanEXSLTFunctionObjectType Type;
00151 
00152         XalanMemMgrAutoPtr<Type, false> theGuard( theManager , (Type*)theManager.allocate(sizeof(Type)));
00153 
00154         Type* theResult = theGuard.get();
00155 
00156         new (theResult) Type(theManager);
00157 
00158          theGuard.release();
00159 
00160         return theResult;
00161     }
00162 
00163 protected:
00164 
00165 
00166 
00167     const XalanDOMString&
00168     getError(XalanDOMString& theResult) const;
00169 
00170 private:
00171 
00172     // Not implemented...
00173     XalanEXSLTFunctionObjectType(const XalanEXSLTFunctionObjectType&);
00174 
00175     XalanEXSLTFunctionObjectType&
00176     operator=(const XalanEXSLTFunctionObjectType&);
00177 
00178     bool
00179     operator==(const XalanEXSLTFunctionObjectType&) const;
00180 
00181 
00182     // Data members...
00183     const XalanDOMString    m_boolean;
00184     const XalanDOMString    m_external;
00185     const XalanDOMString    m_nodeSet;
00186     const XalanDOMString    m_number;
00187     const XalanDOMString    m_rtf;
00188     const XalanDOMString    m_string;
00189 
00190     static const XalanDOMChar   s_booleanString[];
00191     static const XalanDOMChar   s_externalString[];
00192     static const XalanDOMChar   s_nodeSetString[];
00193     static const XalanDOMChar   s_numberString[];
00194     static const XalanDOMChar   s_rtfString[];
00195     static const XalanDOMChar   s_stringString[];
00196 };
00197 
00198 
00199 
00200 XALAN_CPP_NAMESPACE_END
00201 
00202 
00203 
00204 #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.9
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.