~zorba-coders/zorba/bug-950621

« back to all changes in this revision

Viewing changes to src/functions/function.cpp

  • Committer: brantmat at ETHZ
  • Date: 2007-10-09 12:58:38 UTC
  • Revision ID: svn-v4:8046edc3-af21-0410-8661-ec7318497eea:trunk/zorba:904
commit of the new directory structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; indent-tabs-mode: nil; tab-width: 2 -*-
 
2
 *
 
3
 *  $Id: functions.cpp,v 1.1 2006/10/09 07:07:59 Paul Pedersen Exp $
 
4
 *
 
5
 *      Copyright 2006-2007 FLWOR Foundation.
 
6
 *  Author: John Cowan, Paul Pedersen
 
7
 *
 
8
 */
 
9
 
 
10
#include "function.h"
 
11
#include "signature.h"
 
12
#include "runtime/zorba.h"
 
13
#include "zorba/zorba_qname.h"
 
14
#include "types/sequence_type.h"
 
15
 
 
16
using namespace std;
 
17
using namespace xqp;
 
18
 
 
19
class testfun : public function
 
20
{
 
21
public:
 
22
        testfun(const signature& sig) : function(sig) {}
 
23
        ~testfun() {}
 
24
 
 
25
public:
 
26
        Iterator_t operator()(zorba*,vector<Iterator_t>&) const { return NULL; }
 
27
        sequence_type_t type_check(signature& sig) const { return xs_untypedValue; }
 
28
        bool validate_args(vector<Iterator_t>& arglist) const { return true; }
 
29
 
 
30
};
 
31
 
 
32
 
 
33
int main(int argc, char* argv[])
 
34
{
 
35
        qname* fname_p = new zorba_qname(0,"prefix","localname");
 
36
        cout << "fname = "; fname_p->put(NULL,cout) << endl;
 
37
        signature sig(fname_p,xs_string);
 
38
        testfun f(sig);
 
39
}
 
40