[Python-de] swig und vector<xxx*>
Julian Rath
julian.rath at gmail.com
Die Jul 19 10:21:51 CEST 2005
Hier ein Swig Interface, Aber das mit den vector<Item*> funktioniert
nicht, aber villeicht könnt ihr mir helfen, ich bekomme unter python
nämlich immer ein leeres object.
danke
Julian
%module CPC
%include <std_wstring.i>
%include <std_vector.i>
%{
#include "Server.h"
//#include "Item.h"
#include <objbase.h>
%}
%init%{
CoInitialize(NULL);
%}
class Exception
{
public:
Exception(wchar_t* pFile, int line, wchar_t* pMessage);
std::wstring mMessage;
};
namespace Cpc
{
namespace Co
{
class Item;
class Item
{
public:
Item(Ire*& Server);
bool IsBranch();
bool IsLeaf();
std::vector<Item*>& GetChilds() throw(Exception);
std::wstring& GetItemId() throw(Exception);
};
class Server
{
public:
Server(std::wstring id, std::wstring host="");
void Connect() throw(Exception);
Item& GetRootItem() throw(Exception);
};
};
};