Zorba
The XQuery Processor
Documentation
Live Demo
Modules
Download
Tools
Blog
Code
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
include
zorba
external_function_parameter.h
Go to the documentation of this file.
1
/*
2
* Copyright 2006-2008 The FLWOR Foundation.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef ZORBA_EXTERNAL_FUNCTION_PARAM_API_H
17
#define ZORBA_EXTERNAL_FUNCTION_PARAM_API_H
18
19
namespace
zorba {
20
21
/**
22
* Instances of subclasses of this abstract class may
23
* be used as parameters to the DynamicContext::addExternalFunctionParameter
24
* function. This is useful in the implementation of
25
* external modules/functions in order to store information
26
* between several invocations of the same function.
27
*
28
* The destroy method is called by Zorba at the end
29
* of the execution of an XQuery program, when the corresponding
30
* DynamicContext is destroyed.
31
*
32
*/
33
class
ExternalFunctionParameter
34
{
35
public
:
36
/**
37
* This function is invoked by Zorba when the DynamicContext
38
* that contains the instance is destroyed. This allows
39
* the user to release resources. In the simplest case,
40
* an implementation might simply call "delete this" to
41
* destroy the object.
42
*/
43
virtual
void
destroy
()
throw
() = 0;
44
45
/**
46
* Virtual destructor with an empty implementation
47
*/
48
virtual
~ExternalFunctionParameter
() {}
49
};
50
51
}
52
53
#endif
Please enable JavaScript to view the
comments powered by Disqus.
blog comments powered by
Disqus