X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents.i;h=23ede34e49181625f2df4cf854573ee2bd10d9ec;hb=7ad94f3cf928e9abe353fe20fa1becfe2574b857;hp=61ad50d538aa73e230c6b00f0a22d8427f7a5772;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/Events/Events.i b/src/Events/Events.i index 61ad50d53..23ede34e4 100644 --- a/src/Events/Events.i +++ b/src/Events/Events.i @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,18 +12,33 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // /* Events.i */ -%module EventsAPI +%module(directors="1") EventsAPI +%feature("director:except") { + if ($error != NULL) { + PyErr_Print(); + std::cerr << std::endl; + throw Swig::DirectorMethodException(); + } +} + %{ #include "Events.h" #include "Events_InfoMessage.h" + #include "Events_Listener.h" + #include "Events_Loop.h" #include "Events_Message.h" + #include "Events_MessageGroup.h" + + #ifdef _MSC_VER + # pragma warning(disable: 4456) // declaration of variable hides previous local declaration + # pragma warning(disable: 4459) // declaration of variable hides global declaration + #endif %} @@ -33,7 +48,14 @@ // standard definitions %include "typemaps.i" %include "std_string.i" +%include "std_wstring.i" + +// directors +%feature("director") Events_Listener; // all supported interfaces %include "Events_Message.h" %include "Events_InfoMessage.h" +%include "Events_Listener.h" +%include "Events_Loop.h" +%include "Events_MessageGroup.h"