Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

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

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 <set>
00028 #include <vector>
00029 
00030 
00031 
00032 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00033 
00034 
00035 
00036 #include <xalanc/XPath/XObject.hpp>
00037 
00038 
00039 
00040 XALAN_CPP_NAMESPACE_BEGIN
00041 
00042 
00043 
00044 class XObjectPtr;
00045 
00046 
00047 
00054 class XALAN_XSLT_EXPORT ExtensionFunctionHandler 
00055 {
00056 
00057 public:
00058 
00065     ExtensionFunctionHandler(const XalanDOMString&  namespaceUri);
00066 
00079     ExtensionFunctionHandler(
00080             const XalanDOMString&   namespaceUri,
00081             const XalanDOMString&   funcNames,
00082             const XalanDOMString&   lang,
00083             const XalanDOMString&   srcURL,
00084             const XalanDOMString&   scriptSrc);
00085 
00086 
00087     virtual
00088     ~ExtensionFunctionHandler();
00089 
00096     virtual void
00097     setFunctions(const XalanDOMString&  funcNames);
00098 
00112     virtual void
00113     setScript(
00114             const XalanDOMString&   lang,
00115             const XalanDOMString&   srcURL,
00116             const XalanDOMString&   scriptSrc);
00117 
00124     virtual bool
00125     isFunctionAvailable(const XalanDOMString&   function) const;
00126 
00128 #if defined(XALAN_NO_STD_NAMESPACE)
00129     typedef vector<void*>                               ArgVectorType;
00130     typedef set<XalanDOMString, less<XalanDOMString> >  StringSetType;
00131 #else
00132     typedef std::vector<void*>          ArgVectorType;
00133     typedef std::set<XalanDOMString>    StringSetType;
00134 #endif
00135 
00152     virtual XObjectPtr
00153     callFunction(
00154             const XalanDOMString&   funcName,
00155             const ArgVectorType&    args);
00156 
00157 protected:
00158 
00159     XalanDOMString  m_namespaceUri;  // uri of the extension namespace
00160     XalanDOMString  m_scriptLang;    // scripting language of implementation
00161     XalanDOMString  m_scriptSrc;     // script source to run (if any)
00162     XalanDOMString  m_scriptSrcURL;  // URL of source of script (if any)
00163 
00164     void* m_javaObject;         // object for javaclass engine
00165 
00166     StringSetType   m_functions; // functions of namespace
00167 
00168     //  BSFManager mgr = new BSFManager (); // mgr used to run scripts
00169 
00170     bool            m_componentStarted; // true when the scripts in a
00171 
00172     // component description (if any) have been run
00173 
00181     virtual void
00182     startupComponent();
00183 
00184     static const XalanDOMChar   s_tokenDelimiterCharacters[];
00185 };
00186 
00187 
00188 
00189 XALAN_CPP_NAMESPACE_END
00190  
00191 
00192 
00193 #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.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.