Project

Profile

Help

How to connect?
Download (1.49 KB) Statistics
| Branch: | Tag: | Revision:

he / latest10 / hec / Saxon.C.API / XdmFunctionItem.h @ 6304fb8b

1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright (c) 2019 Saxonica Limited.
3
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7

    
8
#ifndef SAXON_XDMFUNCTIONITEM_h
9
#define SAXON_XDMFUNCTIONITEM_h
10

    
11

    
12
#include "XdmItem.h"
13
#include <string>
14

    
15
#include <stdlib.h>
16
#include <string.h>
17

    
18
class XdmFunctionItem : public XdmItem {
19
    
20
public:
21

    
22
    XdmFunctionItem();
23

    
24
    XdmFunctionItem(jobject obj);
25

    
26
    XdmFunctionItem(const XdmFunctionItem &d);
27

    
28

    
29
    virtual ~XdmFunctionItem(){
30
        //std::cerr<<"destructor called fpr XdmFunctionItem"<<std::endl;
31
        if(!fname.empty()) {
32
                        fname.clear();
33
                }
34
    }
35

    
36
    const char* getName();
37

    
38
    virtual int getArity();
39

    
40
    static XdmFunctionItem * getSystemFunction(SaxonProcessor * processor, const char * name, int arity);
41

    
42
    XdmValue * call(XdmValue ** arguments, int argument_length);
43
    
44
    bool isAtomic(){
45
        return false;
46
    }
47

    
48
        /**
49
        * Get the type of the object
50
        */
51
        XDM_TYPE getType() {
52
                return XDM_FUNCTION_ITEM;
53
        }
54
    
55
    
56
private:
57
     
58

    
59
    std::string fname;
60
    int arity;
61

    
62
};
63

    
64

    
65

    
66

    
67
#endif
(24-24/49)