##// END OF EJS Templates
MultiComponent TS almost done, still blows up when built from python with empty data...
MultiComponent TS almost done, still blows up when built from python with empty data Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r57:0093c733b640
r76:9a080a34054c
Show More
CatalogWrappers.cpp
81 lines | 3.6 KiB | text/x-c | CppLexer
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 #include "pywrappers_common.h"
added catalog wrapper...
r48 #include <QDate>
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 #include <QString>
added catalog wrapper...
r48 #include <QTime>
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 #include <QUuid>
added catalog wrapper...
r48 #include <QVector>
#include <pybind11/operators.h>
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 #include <pybind11/pybind11.h>
#include <sstream>
#include <string>
added catalog wrapper...
r48
#include <Catalogue/CatalogueController.h>
Added TimeSeries library...
r57 //#include <DBCatalogue.h>
//#include <DBEvent.h>
//#include <DBEventProduct.h>
added catalog wrapper...
r48
namespace py = pybind11;
Added TimeSeries library...
r57 //std::ostream& operator<<(std::ostream& os, const DBEvent& e)
//{
// os << std::endl;
// return os;
//}
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 #define JAVA_LIKE_PROPERTY(name, className) \
.def_property("##name", &className::get##name, &className::set##name)
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 PYBIND11_MODULE(pysciqlopcatalogs, m)
{
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 // py::class_<DBEventProduct, std::shared_ptr<DBEventProduct>>(m,"DBEventProduct")
// JAVA_LIKE_PROPERTY(TStart, DBEventProduct)
// JAVA_LIKE_PROPERTY(TEnd, DBEventProduct)
// JAVA_LIKE_PROPERTY(ProductId, DBEventProduct)
// JAVA_LIKE_PROPERTY(CreationDateTime, DBEventProduct)
// JAVA_LIKE_PROPERTY(ModificationDateTime, DBEventProduct)
// JAVA_LIKE_PROPERTY(Event, DBEventProduct)
// ;
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 // py::class_<DBEvent, std::shared_ptr<DBEvent>>(m, "DBEvent")
// JAVA_LIKE_PROPERTY(Name,DBEvent)
// JAVA_LIKE_PROPERTY(UniqId,DBEvent)
// JAVA_LIKE_PROPERTY(Author,DBEvent)
// JAVA_LIKE_PROPERTY(Repository,DBEvent)
// JAVA_LIKE_PROPERTY(CreationDateTime,DBEvent)
// JAVA_LIKE_PROPERTY(ModificationDateTime,DBEvent)
// JAVA_LIKE_PROPERTY(EventProducts,DBEvent)
// .def_property_readonly("TStart", &DBEvent::getTStart)
// .def_property_readonly("TEnd", &DBEvent::getTEnd)
// .def("__repr__",__repr__<DBEvent>);
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 // py::class_<DBCatalogue, std::shared_ptr<DBCatalogue>>(m,"DBEventProduct")
// JAVA_LIKE_PROPERTY(CatalogueId, DBCatalogue)
// JAVA_LIKE_PROPERTY(UniqId, DBCatalogue)
// JAVA_LIKE_PROPERTY(Name, DBCatalogue)
// JAVA_LIKE_PROPERTY(Author, DBCatalogue)
// JAVA_LIKE_PROPERTY(Repository, DBCatalogue)
// JAVA_LIKE_PROPERTY(CreationDateTime, DBCatalogue)
// JAVA_LIKE_PROPERTY(ModificationDateTime, DBCatalogue)
// ;
added catalog wrapper...
r48
[Catalogues] Switch to new catalogues lib in progress, load/saves/query methods implemented for new...
r53 // py::class_<CatalogueController>(m, "CatalogueController")
// .def("addDB", &CatalogueController::addDB)
// .def("saveDB", &CatalogueController::saveDB)
// .def("addEvent", &CatalogueController::addEvent)
// .def("updateEvent", &CatalogueController::updateEvent)
// .def("updateEventProduct", &CatalogueController::updateEventProduct)
// .def("removeEvent", &CatalogueController::removeEvent)
// .def("saveEvent", &CatalogueController::saveEvent)
// .def("discardEvent", &CatalogueController::discardEvent)
// .def("eventHasChanges", &CatalogueController::eventHasChanges)
// .def("addCatalogue", &CatalogueController::addCatalogue)
// .def("updateCatalogue", &CatalogueController::updateCatalogue)
// .def("removeCatalogue", &CatalogueController::removeCatalogue)
// .def("saveCatalogue", &CatalogueController::saveCatalogue)
// .def("discardCatalogue", &CatalogueController::discardCatalogue)
// .def("saveAll", &CatalogueController::saveAll)
// .def("hasChanges", &CatalogueController::hasChanges)
// ;
added catalog wrapper...
r48 }