Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

dtkCore.i 1.42 KB
Newer Older
1 2 3
// Version: $Id$
//
//
4

5 6 7
// Commentary:
//
//
8

9 10 11
// Change Log:
//
//
12

13
// Code:
14

NICLAUSSE Nicolas's avatar
NICLAUSSE Nicolas committed
15
%module(directors="1") dtkcore
16

Julien Wintz's avatar
Julien Wintz committed
17 18
%include <dtk_base.i>
%include <qrunnable.i>
19 20 21 22

%{

#include <dtkCore/dtkCorePlugin.h>
NICLAUSSE Nicolas's avatar
NICLAUSSE Nicolas committed
23
#include <dtkCore/dtkCorePluginBase.h>
24 25
#include <dtkCore/dtkCorePluginManager.h>
#include <dtkCore/dtkCorePluginFactory.h>
26
#include <dtkCore/dtkObjectManager.h>
27
#include <dtkCore/dtkArray.h>
28 29 30

%}

NICLAUSSE Nicolas's avatar
NICLAUSSE Nicolas committed
31 32
%feature("director");

33 34 35 36 37 38 39
// /////////////////////////////////////////////////////////////////
// Macro undefinition
// /////////////////////////////////////////////////////////////////

#undef  DTKCORE_EXPORT
#define DTKCORE_EXPORT

40 41 42 43 44 45 46 47 48 49 50 51
%pythonappend dtkObjectManager::value(const QString &key) const  %{
#       print "convert variant to embedded object type"
       method_name = "to" + val.typeName().strip("*")
       try:
          method = getattr(val, method_name)
          return method()
       except:
          print "can't convert to real type, return a QVariant"
          return val

%}

52 53 54 55
// /////////////////////////////////////////////////////////////////
// Wrapper input
// /////////////////////////////////////////////////////////////////

NICLAUSSE Nicolas's avatar
NICLAUSSE Nicolas committed
56
%include <dtkCore/dtkCorePluginBase.h>
57 58
%include <dtkCore/dtkCorePluginManager.h>
%include <dtkCore/dtkCorePluginFactory.h>
59
%include <dtkCore/dtkArray.h>
60
%include <dtkCore/dtkObjectManager.h>
61

62
%template(dtkArrayInt)    dtkArray<long long>;
63
%template(dtkArrayDouble) dtkArray<double>;
64

65 66
//
// dtkCore.i ends here