利用SWIG封装多点结构和C++相关函数到Python的问题

2024-06-10 20:59:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我在包{^ }中有一个问题,涉及到函数的结构,从SW++到C++到Python。 标题如下:

/*example.hpp*/    
typedef struct {
    unsigned x;
    unsigned y;
    unsigned z;
    string  accession;
    unsigned cluster;
    unsigned raw_score;
    unsigned ix;
    unsigned iy;
    bool is_specfic;

} cdsearchinfo;

void foo(string& filename, multimap<unsigned, cdsearchinfo>& cdsearchmap, set<unsigned>& gi_set);

我应该如何为此编写.i文件?你知道吗


Tags: 函数标题stringrawexamplesw结构struct