## 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

# ExtensionFunctionHandler.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
    00017 #if !defined(XALAN_EXTENSIONFUNCTIONHANDLER_HEADER_GUARD)
    00018 #define XALAN_EXTENSIONFUNCTIONHANDLER_HEADER_GUARD
    00019
    00020
    00021
    00022 // Base include file.   Must be first.
    00023 #include <xalanc/XSLT/XSLTDefinitions.hpp>
    00024
    00025
    00026
    00027 #include <xalanc/XalanDOM/XalanDOMString.hpp>
    00028
    00029
    00030
    00031 #include <xalanc/Include/XalanVector.hpp>
    00032 #include <xalanc/Include/XalanSet.hpp>
    00033
    00034
    00035
    00036 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
    00037
    00038
    00039
    00040 #include <xalanc/XPath/XObject.hpp>
    00041
    00042
    00043
    00044 XALAN_CPP_NAMESPACE_BEGIN
    00045
    00046
    00047
    00048 class XObjectPtr;
    00049
    00050
    00051
    00058 class XALAN_XSLT_EXPORT ExtensionFunctionHandler
    00059 {
    00060
    00061 public:
    00062
    00069     ExtensionFunctionHandler(const XalanDOMString&  namespaceUri,
    00070                             MemoryManagerType& theManager);
    00071
    00084     ExtensionFunctionHandler(
    00085             MemoryManagerType& theManager,
    00086             const XalanDOMString&   namespaceUri,
    00087             const XalanDOMString&   funcNames,
    00088             const XalanDOMString&   lang,
    00089             const XalanDOMString&   srcURL,
    00090             const XalanDOMString&   scriptSrc);
    00091
    00092
    00093     virtual
    00094     ~ExtensionFunctionHandler();
    00095
    00096     MemoryManagerType&
    00097     getMemoryManager()
    00098     {
    00099         return m_namespaceUri.getMemoryManager();
    00100     }
    00101
    00108     virtual void
    00109     setFunctions(const XalanDOMString&  funcNames);
    00110
    00124     virtual void
    00125     setScript(
    00126             const XalanDOMString&   lang,
    00127             const XalanDOMString&   srcURL,
    00128             const XalanDOMString&   scriptSrc);
    00129
    00136     virtual bool
    00137     isFunctionAvailable(const XalanDOMString&   function) const;
    00138
    00140     typedef XalanVector<void*>                          ArgVectorType;
    00141
    00142     typedef XalanSet<XalanDOMString>    StringSetType;
    00143
    00159
    00160     virtual XObjectPtr
    00161     callFunction(
    00162             const XalanDOMString&   funcName,
    00163             const ArgVectorType&    args);
    00164
    00165 protected:
    00166
    00167     XalanDOMString  m_namespaceUri;  // uri of the extension namespace
    00168     XalanDOMString  m_scriptLang;    // scripting language of implementation
    00169     XalanDOMString  m_scriptSrc;     // script source to run (if any)
    00170     XalanDOMString  m_scriptSrcURL;  // URL of source of script (if any)
    00171
    00172     void* m_javaObject;         // object for javaclass engine
    00173
    00174     StringSetType   m_functions; // functions of namespace
    00175
    00176     //  BSFManager mgr = new BSFManager (); // mgr used to run scripts
    00177
    00178     bool            m_componentStarted; // true when the scripts in a
    00179
    00180     // component description (if any) have been run
    00181
    00189     virtual void
    00190     startupComponent();
    00191
    00192     static const XalanDOMChar   s_tokenDelimiterCharacters[];
    00193 };
    00194
    00195
    00196
    00197 XALAN_CPP_NAMESPACE_END
    00198
    00199
    00200
    00201 #endif  // XALAN_EXTENSIONFUNCTIONHANDLER_HEADER_GUARD

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.