Project

Profile

Help

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

he / src / main / c / Saxon.C.API / XdmFunctionItem.h @ 9e416749

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 "XdmAtomicValue.h"
14
#include "XdmNode.h"
15
#include <string>
16

    
17
#include <stdlib.h>
18
#include <string.h>
19

    
20
class XdmFunctionItem : public XdmItem {
21
    
22
public:
23

    
24
    XdmFunctionItem();
25

    
26
    XdmFunctionItem(jobject obj);
27

    
28
    XdmFunctionItem(const XdmFunctionItem &d);
29

    
30

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

    
38
    const char* getName();
39

    
40
    virtual int getArity();
41

    
42
    static XdmFunctionItem * getSystemFunction(SaxonProcessor * processor, const char * name, int arity);
43

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

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

    
60
    SaxonProcessor * cpp_processor;
61
    std::string fname;
62
    int arity;
63

    
64
};
65

    
66

    
67

    
68

    
69
#endif
(28-28/55)