X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents.i;h=23ede34e49181625f2df4cf854573ee2bd10d9ec;hb=9270adddc12db9661c676544537b0e8eb78c1624;hp=aa09fbbee2c4db7980b22df440d9a19642c4346a;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/Events/Events.i b/src/Events/Events.i index aa09fbbee..23ede34e4 100644 --- a/src/Events/Events.i +++ b/src/Events/Events.i @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 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 @@ -18,11 +18,27 @@ // /* 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 %} @@ -32,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"