File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 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)
2929
3030 // exceptions
3131 //
32- py::register_exception<Exception>(m, " Exception " );
32+ py::register_exception<Exception>(m, " MO2Exception " );
3333 py::register_exception<InvalidNXMLinkException>(m, " InvalidNXMLinkException" );
3434 py::register_exception<IncompatibilityException>(m, " IncompatibilityException" );
3535 py::register_exception<InvalidVersionException>(m, " InvalidVersionException" );
Original file line number Diff line number Diff line change @@ -360,6 +360,22 @@ namespace mo2::python {
360360 py::implicitly_convertible<QString, GuessedValue<QString>>();
361361 }
362362
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+
363379 void add_ipluginlist_classes (py::module_ m)
364380 {
365381 py::enum_<IPluginList::PluginState>(m, " PluginState" , py::arithmetic ())
@@ -887,6 +903,7 @@ namespace mo2::python {
887903 })
888904 .def (" absoluteIniFilePath" , &IProfile::absoluteIniFilePath, " inifile" _a);
889905
906+ add_iextensionlist_classes (m);
890907 add_ipluginlist_classes (m);
891908 add_imodlist_classes (m);
892909 add_idownload_manager_classes (m);
You can’t perform that action at this time.
0 commit comments