File tree 2 files changed +18
-1
lines changed 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ PYBIND11_MODULE(mobase, m)
29
29
30
30
// exceptions
31
31
//
32
- py::register_exception<Exception>(m, " Exception " );
32
+ py::register_exception<Exception>(m, " MO2Exception " );
33
33
py::register_exception<InvalidNXMLinkException>(m, " InvalidNXMLinkException" );
34
34
py::register_exception<IncompatibilityException>(m, " IncompatibilityException" );
35
35
py::register_exception<InvalidVersionException>(m, " InvalidVersionException" );
Original file line number Diff line number Diff line change @@ -360,6 +360,22 @@ namespace mo2::python {
360
360
py::implicitly_convertible<QString, GuessedValue<QString>>();
361
361
}
362
362
363
+ void add_iextensionlist_classes (py::module_ m)
364
+ {
365
+ // TODO: add all bindings here
366
+
367
+ py::class_<IExtension>(m, " Extension" );
368
+
369
+ py::class_<IExtensionList>(m, " IExtensionList" )
370
+ .def (" installed" , &IExtensionList::installed, " identifier" _a)
371
+ .def (
372
+ " enabled" ,
373
+ py::overload_cast<const QString&>(&IExtensionList::enabled, py::const_),
374
+ " identifier" _a)
375
+ .def (" __getitem__" , &IExtensionList::at, py::return_value_policy::reference)
376
+ .def (" __len__" , &IExtensionList::size);
377
+ }
378
+
363
379
void add_ipluginlist_classes (py::module_ m)
364
380
{
365
381
py::enum_<IPluginList::PluginState>(m, " PluginState" , py::arithmetic ())
@@ -887,6 +903,7 @@ namespace mo2::python {
887
903
})
888
904
.def (" absoluteIniFilePath" , &IProfile::absoluteIniFilePath, " inifile" _a);
889
905
906
+ add_iextensionlist_classes (m);
890
907
add_ipluginlist_classes (m);
891
908
add_imodlist_classes (m);
892
909
add_idownload_manager_classes (m);
You can’t perform that action at this time.
0 commit comments