## Xalan-C++ API Documentation

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

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  * The Apache Software License, Version 1.1
    00003  *
    00004  *
    00005  * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
    00006  * reserved.
    00007  *
    00008  * Redistribution and use in source and binary forms, with or without
    00009  * modification, are permitted provided that the following conditions
    00010  * are met:
    00011  *
    00012  * 1. Redistributions of source code must retain the above copyright
    00013  *    notice, this list of conditions and the following disclaimer.
    00014  *
    00015  * 2. Redistributions in binary form must reproduce the above copyright
    00016  *    notice, this list of conditions and the following disclaimer in
    00017  *    the documentation and/or other materials provided with the
    00018  *    distribution.
    00019  *
    00020  * 3. The end-user documentation included with the redistribution,
    00021  *    if any, must include the following acknowledgment:
    00022  *       "This product includes software developed by the
    00023  *        Apache Software Foundation (http://www.apache.org/)."
    00024  *    Alternately, this acknowledgment may appear in the software itself,
    00025  *    if and wherever such third-party acknowledgments normally appear.
    00026  *
    00027  * 4. The names "Xalan" and "Apache Software Foundation" must
    00028  *    not be used to endorse or promote products derived from this
    00029  *    software without prior written permission. For written
    00030  *    permission, please contact apache@apache.org.
    00031  *
    00032  * 5. Products derived from this software may not be called "Apache",
    00033  *    nor may "Apache" appear in their name, without prior written
    00034  *    permission of the Apache Software Foundation.
    00035  *
    00036  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    00037  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00038  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    00039  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
    00040  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00041  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00042  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    00043  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00044  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    00045  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    00046  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    00047  * SUCH DAMAGE.
    00048  * ====================================================================
    00049  *
    00050  * This software consists of voluntary contributions made by many
    00051  * individuals on behalf of the Apache Software Foundation and was
    00052  * originally based on software copyright (c) 1999, International
    00053  * Business Machines, Inc., http://www.ibm.com.  For more
    00054  * information on the Apache Software Foundation, please see
    00055  * <http://www.apache.org/>.
    00056  */
    00057 #if !defined(EXSLT_COMMONIMPL_HEADER_GUARD_1357924680)
    00058 #define EXSLT_COMMONIMPL_HEADER_GUARD_1357924680
    00059
    00060
    00061
    00062 #include <XalanEXSLT/XalanEXSLTDefinitions.hpp>
    00063
    00064
    00065
    00066 #include <XPath/Function.hpp>
    00067
    00068
    00069
    00070 #include <XalanExtensions/FunctionNodeSet.hpp>
    00071
    00072
    00073
    00074 XALAN_CPP_NAMESPACE_BEGIN
    00075
    00076
    00077
    00078 class XALAN_EXSLT_EXPORT XalanEXSLTFunctionNodeSet : public FunctionNodeSet
    00079 {
    00080 public:
    00081
    00082     XalanEXSLTFunctionNodeSet() :
    00083         FunctionNodeSet(true)
    00084     {
    00085     }
    00086
    00087     virtual
    00088     ~XalanEXSLTFunctionNodeSet()
    00089     {
    00090     }
    00091
    00092 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
    00093     virtual Function*
    00094 #else
    00095     virtual XalanEXSLTFunctionNodeSet*
    00096 #endif
    00097     clone() const
    00098     {
    00099         return new XalanEXSLTFunctionNodeSet(*this);
    00100     }
    00101
    00102 protected:
    00103
    00104     virtual const XalanDOMString
    00105     getError() const
    00106     {
    00107         return StaticStringToDOMString(XALAN_STATIC_UCODE_STRING("The EXSLT function node-set() accepts one argument"));
    00108     }
    00109
    00110     virtual const XalanDOMString
    00111     getInvalidArgumentTypeError() const
    00112     {
    00113         return StaticStringToDOMString(XALAN_STATIC_UCODE_STRING("Invalid argument type in EXSLT function node-set()"));
    00114     }
    00115
    00116 private:
    00117
    00118     // Not implemented...
    00119     XalanEXSLTFunctionNodeSet&
    00120     operator=(const XalanEXSLTFunctionNodeSet&);
    00121
    00122     bool
    00123     operator==(const XalanEXSLTFunctionNodeSet&) const;
    00124 };
    00125
    00126
    00127
    00128 class XALAN_EXSLT_EXPORT XalanEXSLTFunctionObjectType : public Function
    00129 {
    00130 public:
    00131
    00132     typedef Function    ParentType;
    00133
    00134     XalanEXSLTFunctionObjectType() :
    00135         Function(),
    00136         m_boolean(s_booleanString),
    00137         m_external(s_externalString),
    00138         m_nodeSet(s_nodeSetString),
    00139         m_number(s_numberString),
    00140         m_rtf(s_rtfString),
    00141         m_string(s_stringString)
    00142     {
    00143     }
    00144
    00145     // A dummy constructor for use internally.  Do not use this one!!!!
    00146     XalanEXSLTFunctionObjectType(int    /* theDummy */) :
    00147         Function(),
    00148         m_boolean(),
    00149         m_external(),
    00150         m_nodeSet(),
    00151         m_number(),
    00152         m_rtf(),
    00153         m_string()
    00154     {
    00155     }
    00156
    00157     virtual
    00158     ~XalanEXSLTFunctionObjectType()
    00159     {
    00160     }
    00161
    00162     // These methods are inherited from Function ...
    00163
    00164     virtual XObjectPtr
    00165     execute(
    00166             XPathExecutionContext&          executionContext,
    00167             XalanNode*                      context,
    00168             const XObjectArgVectorType&     args,
    00169             const LocatorType*              locator) const;
    00170
    00171 #if !defined(XALAN_NO_USING_DECLARATION)
    00172     using ParentType::execute;
    00173 #endif
    00174
    00175 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
    00176     virtual Function*
    00177 #else
    00178     virtual XalanEXSLTFunctionObjectType*
    00179 #endif
    00180     clone() const
    00181     {
    00182         return new XalanEXSLTFunctionObjectType;
    00183     }
    00184
    00185 protected:
    00186
    00187     const XalanDOMString
    00188     getError() const;
    00189
    00190 private:
    00191
    00192     // Not implemented...
    00193     XalanEXSLTFunctionObjectType(const XalanEXSLTFunctionObjectType&);
    00194
    00195     XalanEXSLTFunctionObjectType&
    00196     operator=(const XalanEXSLTFunctionObjectType&);
    00197
    00198     bool
    00199     operator==(const XalanEXSLTFunctionObjectType&) const;
    00200
    00201
    00202     // Data members...
    00203     const XalanDOMString    m_boolean;
    00204     const XalanDOMString    m_external;
    00205     const XalanDOMString    m_nodeSet;
    00206     const XalanDOMString    m_number;
    00207     const XalanDOMString    m_rtf;
    00208     const XalanDOMString    m_string;
    00209
    00210     static const XalanDOMChar   s_booleanString[];
    00211     static const XalanDOMChar   s_externalString[];
    00212     static const XalanDOMChar   s_nodeSetString[];
    00213     static const XalanDOMChar   s_numberString[];
    00214     static const XalanDOMChar   s_rtfString[];
    00215     static const XalanDOMChar   s_stringString[];
    00216 };
    00217
    00218
    00219
    00220 XALAN_CPP_NAMESPACE_END
    00221
    00222
    00223
    00224 #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.5 Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.