From 24e153658a4603a0a3a332f7e67bb23582edc0a1 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 21 Apr 2021 10:33:27 +0200 Subject: [PATCH] Split Axes.h from IUnitConverter.h class IUnitConverter no longer seen from GUI --- Base/Pixel/RectangularPixel.h | 6 +- Base/Pixel/SphericalPixel.h | 6 +- Core/Simulation/UnitConverterUtils.h | 1 + Device/Detector/IDetector.h | 3 +- Device/Unit/Axes.h | 27 ++ Device/Unit/AxisNames.h | 8 +- Device/Unit/IUnitConverter.cpp | 1 + Device/Unit/IUnitConverter.h | 15 +- .../AbstractDataLoaderResultModel.h | 6 +- .../AutomaticDataLoader1DResultModel.h | 6 +- GUI/coregui/DataLoaders/QREDataLoader.h | 6 +- .../DataLoaders/QREDataLoaderProperties.cpp | 2 +- .../DataLoaders/QREDataLoaderProperties.h | 8 +- .../DataLoaders/QREDataLoaderResultModel.h | 6 +- .../DataLoaders/UserDefinedDataLoader1D.h | 92 ++-- GUI/coregui/Models/DataViewUtils.cpp | 1 + GUI/coregui/Models/DataViewUtils.h | 1 - GUI/coregui/Models/JobItemUtils.h | 1 + GUI/coregui/Models/JobModelFunctions.cpp | 1 + .../CsvImportAssistant/CsvDataColumn.cpp | 1 + .../CsvImportAssistant/CsvDataColumn.h | 2 +- .../CsvImportAssistant/CsvImportAssistant.cpp | 1 + .../CsvImportAssistant/CsvImportTable.cpp | 1 + .../CsvImportAssistant/DataSelector.cpp | 1 + .../CsvImportAssistant/TableContextMenu.h | 1 - GUI/coregui/utils/ImportDataInfo.h | 2 +- Sample/Shapes/IShape3D.h | 6 +- auto/Wrap/doxygenBase.i | 71 ++- auto/Wrap/doxygenDevice.i | 82 +--- auto/Wrap/libBornAgainBase.py | 2 +- auto/Wrap/libBornAgainDevice.py | 47 -- auto/Wrap/libBornAgainDevice_wrap.cpp | 413 ++++++++---------- 32 files changed, 383 insertions(+), 444 deletions(-) create mode 100644 Device/Unit/Axes.h diff --git a/Base/Pixel/RectangularPixel.h b/Base/Pixel/RectangularPixel.h index 8f30399f0ef..dd0247eabbc 100644 --- a/Base/Pixel/RectangularPixel.h +++ b/Base/Pixel/RectangularPixel.h @@ -17,8 +17,8 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_DETECTOR_RECTANGULARPIXEL_H -#define BORNAGAIN_DEVICE_DETECTOR_RECTANGULARPIXEL_H +#ifndef BORNAGAIN_BASE_PIXEL_RECTANGULARPIXEL_H +#define BORNAGAIN_BASE_PIXEL_RECTANGULARPIXEL_H #include "Base/Pixel/IPixel.h" @@ -46,5 +46,5 @@ private: mutable double m_solid_angle; }; -#endif // BORNAGAIN_DEVICE_DETECTOR_RECTANGULARPIXEL_H +#endif // BORNAGAIN_BASE_PIXEL_RECTANGULARPIXEL_H #endif // USER_API diff --git a/Base/Pixel/SphericalPixel.h b/Base/Pixel/SphericalPixel.h index e1293227064..331a3dda150 100644 --- a/Base/Pixel/SphericalPixel.h +++ b/Base/Pixel/SphericalPixel.h @@ -17,8 +17,8 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_DEVICE_DETECTOR_SPHERICALPIXEL_H -#define BORNAGAIN_DEVICE_DETECTOR_SPHERICALPIXEL_H +#ifndef BORNAGAIN_BASE_PIXEL_SPHERICALPIXEL_H +#define BORNAGAIN_BASE_PIXEL_SPHERICALPIXEL_H #include "Base/Pixel/IPixel.h" @@ -44,5 +44,5 @@ private: mutable double m_solid_angle; }; -#endif // BORNAGAIN_DEVICE_DETECTOR_SPHERICALPIXEL_H +#endif // BORNAGAIN_BASE_PIXEL_SPHERICALPIXEL_H #endif // USER_API diff --git a/Core/Simulation/UnitConverterUtils.h b/Core/Simulation/UnitConverterUtils.h index 95a323b073c..e309463e5b0 100644 --- a/Core/Simulation/UnitConverterUtils.h +++ b/Core/Simulation/UnitConverterUtils.h @@ -39,6 +39,7 @@ std::unique_ptr<OutputData<double>> createOutputData(const IUnitConverter& conve std::unique_ptr<IUnitConverter> createConverterForGISAS(const Instrument& instrument); std::unique_ptr<IUnitConverter> createConverter(const ISimulation& simulation); + } // namespace UnitConverterUtils #endif // BORNAGAIN_CORE_SIMULATION_UNITCONVERTERUTILS_H diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h index 6c8ca27dd0f..045d97c5fcc 100644 --- a/Device/Detector/IDetector.h +++ b/Device/Detector/IDetector.h @@ -17,9 +17,10 @@ #define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H #include "Base/Types/CloneableVector.h" +#include "Base/Types/ICloneable.h" #include "Device/Detector/DetectionProperties.h" #include "Device/Detector/SimulationAreaIterator.h" -#include "Device/Unit/IUnitConverter.h" +#include "Device/Unit/Axes.h" class Beam; class DetectorMask; diff --git a/Device/Unit/Axes.h b/Device/Unit/Axes.h new file mode 100644 index 00000000000..369b18ee595 --- /dev/null +++ b/Device/Unit/Axes.h @@ -0,0 +1,27 @@ +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file Device/Unit/Axes.h +//! @brief Defines interface IUnitConverter and possible axis units. +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2018 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#ifndef BORNAGAIN_DEVICE_UNIT_AXES_H +#define BORNAGAIN_DEVICE_UNIT_AXES_H + +//! Wrapper for detector axes units, required for a better representation of +//! detector axes units in python +//! @ingroup detector + +class Axes { +public: + enum Units { DEFAULT, NBINS, RADIANS, DEGREES, MM, QSPACE, QXQY, RQ4 }; +}; + +#endif // BORNAGAIN_DEVICE_UNIT_AXES_H diff --git a/Device/Unit/AxisNames.h b/Device/Unit/AxisNames.h index e7159ffaedb..31fee6d91ad 100644 --- a/Device/Unit/AxisNames.h +++ b/Device/Unit/AxisNames.h @@ -20,8 +20,14 @@ #ifndef BORNAGAIN_DEVICE_UNIT_AXISNAMES_H #define BORNAGAIN_DEVICE_UNIT_AXISNAMES_H -#include "Device/Unit/IUnitConverter.h" +#include "Device/Unit/Axes.h" #include <map> +#include <string> + +const std::map<Axes::Units, const char*> axisUnitLabel = { + {Axes::Units::DEFAULT, "undefined"}, {Axes::Units::NBINS, "bin"}, {Axes::Units::RADIANS, "rad"}, + {Axes::Units::DEGREES, "deg"}, {Axes::Units::MM, "mm"}, {Axes::Units::QSPACE, "1/nm"}, + {Axes::Units::QXQY, "1/nm"}, {Axes::Units::RQ4, "nm^-4?"}}; //! Contains functions to create maps that give the right axis names for different //! detector types and units diff --git a/Device/Unit/IUnitConverter.cpp b/Device/Unit/IUnitConverter.cpp index 43fde2f70ff..a634ce41804 100644 --- a/Device/Unit/IUnitConverter.cpp +++ b/Device/Unit/IUnitConverter.cpp @@ -14,6 +14,7 @@ #include "Device/Unit/IUnitConverter.h" #include "Device/Data/OutputData.h" +#include "Device/Unit/AxisNames.h" IUnitConverter::~IUnitConverter() = default; diff --git a/Device/Unit/IUnitConverter.h b/Device/Unit/IUnitConverter.h index 86ef8cfbf5e..89099fc6fed 100644 --- a/Device/Unit/IUnitConverter.h +++ b/Device/Unit/IUnitConverter.h @@ -16,6 +16,7 @@ #define BORNAGAIN_DEVICE_UNIT_IUNITCONVERTER_H #include "Base/Types/ICloneable.h" +#include "Device/Unit/Axes.h" #include <map> #include <memory> #include <string> @@ -24,20 +25,6 @@ class IAxis; template <class T> class OutputData; -//! Wrapper for detector axes units, required for a better representation of -//! detector axes units in python -//! @ingroup detector - -class Axes { -public: - enum Units { DEFAULT, NBINS, RADIANS, DEGREES, MM, QSPACE, QXQY, RQ4 }; -}; - -const std::map<Axes::Units, const char*> axisUnitLabel = { - {Axes::Units::DEFAULT, "undefined"}, {Axes::Units::NBINS, "bin"}, {Axes::Units::RADIANS, "rad"}, - {Axes::Units::DEGREES, "deg"}, {Axes::Units::MM, "mm"}, {Axes::Units::QSPACE, "1/nm"}, - {Axes::Units::QXQY, "1/nm"}, {Axes::Units::RQ4, "nm^-4?"}}; - #ifndef USER_API //! Interface to provide axis translations to different units for simulation output diff --git a/GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h b/GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h index 8e73bc1ba44..f072e1c028a 100644 --- a/GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h +++ b/GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H -#define GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H #include <QAbstractItemModel> #include <QIcon> @@ -93,4 +93,4 @@ private: QIcon m_warningIcon; }; -#endif // GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H diff --git a/GUI/coregui/DataLoaders/AutomaticDataLoader1DResultModel.h b/GUI/coregui/DataLoaders/AutomaticDataLoader1DResultModel.h index 308bdc9bfc9..a41d0c0a236 100644 --- a/GUI/coregui/DataLoaders/AutomaticDataLoader1DResultModel.h +++ b/GUI/coregui/DataLoaders/AutomaticDataLoader1DResultModel.h @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H -#define GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H #include "GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h" @@ -40,4 +40,4 @@ private: RealDataItem* m_item; }; -#endif // GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H diff --git a/GUI/coregui/DataLoaders/QREDataLoader.h b/GUI/coregui/DataLoaders/QREDataLoader.h index 891a26c51d5..112dab4c05a 100644 --- a/GUI/coregui/DataLoaders/QREDataLoader.h +++ b/GUI/coregui/DataLoaders/QREDataLoader.h @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef GUI_COREGUI_DATALOADERS_QREDATALOADER_H -#define GUI_COREGUI_DATALOADERS_QREDATALOADER_H +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADER_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADER_H #include "GUI/coregui/DataLoaders/AbstractDataLoader1D.h" #include <QVector> @@ -137,4 +137,4 @@ private: QDataStream& operator<<(QDataStream& stream, const QREDataLoader::ImportSettings& s); QDataStream& operator>>(QDataStream& stream, QREDataLoader::ImportSettings& s); -#endif // GUI_COREGUI_DATALOADERS_QREDATALOADER_H +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADER_H diff --git a/GUI/coregui/DataLoaders/QREDataLoaderProperties.cpp b/GUI/coregui/DataLoaders/QREDataLoaderProperties.cpp index aa451e2e2af..242b35bb2d0 100644 --- a/GUI/coregui/DataLoaders/QREDataLoaderProperties.cpp +++ b/GUI/coregui/DataLoaders/QREDataLoaderProperties.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/coregui/DataLoaders/AutomaticMultiColumnDataLoader1DProperties.cpp +//! @file GUI/coregui/DataLoaders/QREDataLoaderProperties.cpp //! @brief Implements class AutomaticMultiColumnDataLoader1DProperties //! //! @homepage http://www.bornagainproject.org diff --git a/GUI/coregui/DataLoaders/QREDataLoaderProperties.h b/GUI/coregui/DataLoaders/QREDataLoaderProperties.h index 22d7dd983fb..a303e151815 100644 --- a/GUI/coregui/DataLoaders/QREDataLoaderProperties.h +++ b/GUI/coregui/DataLoaders/QREDataLoaderProperties.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file M:\BornAgain\GUI\coregui\DataLoaders/AutomaticMultiColumnDataLoader1DProperties.h +//! @file GUI/coregui/DataLoaders/QREDataLoaderProperties.h //! @brief Defines class AutomaticMultiColumnDataLoader1DProperties //! //! @homepage http://www.bornagainproject.org @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICMULTICOLUMNDATALOADER1DPROPERTIES_H -#define BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICMULTICOLUMNDATALOADER1DPROPERTIES_H +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERPROPERTIES_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERPROPERTIES_H #include <QWidget> @@ -62,4 +62,4 @@ private: static const int factorColumn = factorLabelColumn + 1; }; -#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_AUTOMATICMULTICOLUMNDATALOADER1DPROPERTIES_H +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERPROPERTIES_H diff --git a/GUI/coregui/DataLoaders/QREDataLoaderResultModel.h b/GUI/coregui/DataLoaders/QREDataLoaderResultModel.h index f48fd494707..61550189ff5 100644 --- a/GUI/coregui/DataLoaders/QREDataLoaderResultModel.h +++ b/GUI/coregui/DataLoaders/QREDataLoaderResultModel.h @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H -#define GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H #include "GUI/coregui/DataLoaders/AbstractDataLoaderResultModel.h" #include "GUI/coregui/DataLoaders/QREDataLoader.h" @@ -39,4 +39,4 @@ private: QREDataLoader::ImportResult* m_importResult; }; -#endif // GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_QREDATALOADERRESULTMODEL_H diff --git a/GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h b/GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h index 53f68313f9d..8997cd944f7 100644 --- a/GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h +++ b/GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h @@ -1,46 +1,46 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h -//! @brief Defines class UserDefinedDataLoader1D -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2021 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H -#define GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H - -#include "GUI/coregui/DataLoaders/AbstractDataLoader1D.h" - -//! A user defined data loader. This is a thin wrapper around the real loader implementation, -//! storing the relevant settings to make it user definable (namely name and import settings). - -class UserDefinedDataLoader1D : public AbstractDataLoader1D { -public: - UserDefinedDataLoader1D(AbstractDataLoader1D* wrappedLoader, const QString& name, - const QByteArray& defaultProperties); - - virtual QString name() const override; - virtual void populateImportSettingsWidget(QWidget* parent) override; - virtual void initWithDefaultImportSettings() override; - virtual QString persistentClassName() const override; - virtual QByteArray serialize() const override; - virtual void deserialize(const QByteArray& data) override; - virtual AbstractDataLoader* clone() const override; - virtual void setFileContents(const QByteArray& fileContent) override; - virtual void guessSettings() override; - virtual void processContents() override; - - // #baUserDefLoaders ++ implement all overloads! -private: - QString m_name; - AbstractDataLoader1D* m_wrappedLoader; - QByteArray m_defaultProperties; -}; - -#endif // GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file GUI/coregui/DataLoaders/UserDefinedDataLoader1D.h +//! @brief Defines class UserDefinedDataLoader1D +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2021 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#ifndef BORNAGAIN_GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H +#define BORNAGAIN_GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H + +#include "GUI/coregui/DataLoaders/AbstractDataLoader1D.h" + +//! A user defined data loader. This is a thin wrapper around the real loader implementation, +//! storing the relevant settings to make it user definable (namely name and import settings). + +class UserDefinedDataLoader1D : public AbstractDataLoader1D { +public: + UserDefinedDataLoader1D(AbstractDataLoader1D* wrappedLoader, const QString& name, + const QByteArray& defaultProperties); + + virtual QString name() const override; + virtual void populateImportSettingsWidget(QWidget* parent) override; + virtual void initWithDefaultImportSettings() override; + virtual QString persistentClassName() const override; + virtual QByteArray serialize() const override; + virtual void deserialize(const QByteArray& data) override; + virtual AbstractDataLoader* clone() const override; + virtual void setFileContents(const QByteArray& fileContent) override; + virtual void guessSettings() override; + virtual void processContents() override; + + // #baUserDefLoaders ++ implement all overloads! +private: + QString m_name; + AbstractDataLoader1D* m_wrappedLoader; + QByteArray m_defaultProperties; +}; + +#endif // BORNAGAIN_GUI_COREGUI_DATALOADERS_USERDEFINEDDATALOADER1D_H diff --git a/GUI/coregui/Models/DataViewUtils.cpp b/GUI/coregui/Models/DataViewUtils.cpp index a3663c60c09..d9db76fcee6 100644 --- a/GUI/coregui/Models/DataViewUtils.cpp +++ b/GUI/coregui/Models/DataViewUtils.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/coregui/Models/DataViewUtils.h" +#include "Device/Unit/Axes.h" #include "Core/Simulation/UnitConverterUtils.h" #include "GUI/coregui/Models/Data1DViewItem.h" #include "GUI/coregui/Models/DataItem.h" diff --git a/GUI/coregui/Models/DataViewUtils.h b/GUI/coregui/Models/DataViewUtils.h index 17e744714e3..0ae27bb0cc0 100644 --- a/GUI/coregui/Models/DataViewUtils.h +++ b/GUI/coregui/Models/DataViewUtils.h @@ -15,7 +15,6 @@ #ifndef BORNAGAIN_GUI_COREGUI_MODELS_DATAVIEWUTILS_H #define BORNAGAIN_GUI_COREGUI_MODELS_DATAVIEWUTILS_H -#include "Device/Unit/IUnitConverter.h" #include <QString> #include <memory> diff --git a/GUI/coregui/Models/JobItemUtils.h b/GUI/coregui/Models/JobItemUtils.h index 9912b8322ff..d2c9690eaa0 100644 --- a/GUI/coregui/Models/JobItemUtils.h +++ b/GUI/coregui/Models/JobItemUtils.h @@ -23,6 +23,7 @@ class DataItem; class InstrumentItem; class JobItem; class ISimulation; +class IUnitConverter; //! Contains set of convenience methods to set data to the IntensityDataItem from domain simulation. //! Used to modify OutputData's axes units as requested by IntensityDataItem. diff --git a/GUI/coregui/Models/JobModelFunctions.cpp b/GUI/coregui/Models/JobModelFunctions.cpp index 7d0954fb4bd..794d0cd693c 100644 --- a/GUI/coregui/Models/JobModelFunctions.cpp +++ b/GUI/coregui/Models/JobModelFunctions.cpp @@ -15,6 +15,7 @@ #include "GUI/coregui/Models/JobModelFunctions.h" #include "Device/Detector/IDetector2D.h" #include "Device/Instrument/Instrument.h" +#include "Device/Unit/IUnitConverter.h" #include "GUI/coregui/Models/Data1DViewItem.h" #include "GUI/coregui/Models/DataPropertyContainer.h" #include "GUI/coregui/Models/DepthProbeInstrumentItem.h" diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.cpp b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.cpp index 78e11f84b94..217c16fd558 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.cpp +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.h" +#include "Device/Unit/AxisNames.h" /*Csv Intensity Column*/ diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.h b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.h index 01b0ece34a9..3b5cd9ba3e0 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.h +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvDataColumn.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_CSVIMPORTASSISTANT_CSVDATACOLUMN_H #define BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_CSVIMPORTASSISTANT_CSVDATACOLUMN_H -#include "Device/Unit/IUnitConverter.h" +#include "Device/Unit/Axes.h" #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvNamespace.h" class CsvIntensityColumn { diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportAssistant.cpp b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportAssistant.cpp index 21062e42746..25f6fe5b98f 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportAssistant.cpp +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportAssistant.cpp @@ -14,6 +14,7 @@ #include "Device/InputOutput/DataFormatUtils.cpp" // TODO avoid importing a cpp file +#include "Device/Unit/AxisNames.h" #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.h" #include "GUI/coregui/mainwindow/mainwindow_constants.h" #include "GUI/coregui/utils/StyleUtils.h" diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportTable.cpp b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportTable.cpp index dd1e8b359e5..ad1e1bf7b6a 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportTable.cpp +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportTable.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvImportTable.h" +#include "Device/Unit/AxisNames.h" #include "GUI/coregui/Views/JobWidgets/ScientificSpinBox.h" namespace { diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.cpp b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.cpp index aba977f9bc7..9f77e942b7c 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.cpp +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/DataSelector.h" +#include "Device/Unit/AxisNames.h" #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/TableContextMenu.h" #include "GUI/coregui/mainwindow/mainwindow_constants.h" #include "GUI/coregui/utils/StyleUtils.h" diff --git a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/TableContextMenu.h b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/TableContextMenu.h index 0e39ef0fcbc..abf0f0c7af3 100644 --- a/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/TableContextMenu.h +++ b/GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/TableContextMenu.h @@ -15,7 +15,6 @@ #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_CSVIMPORTASSISTANT_TABLECONTEXTMENU_H #define BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_CSVIMPORTASSISTANT_TABLECONTEXTMENU_H -#include "Device/Unit/IUnitConverter.h" #include "GUI/coregui/Views/ImportDataWidgets/CsvImportAssistant/CsvNamespace.h" #include <QMenu> #include <QStringList> diff --git a/GUI/coregui/utils/ImportDataInfo.h b/GUI/coregui/utils/ImportDataInfo.h index a7d73efdf20..c2cab9935b4 100644 --- a/GUI/coregui/utils/ImportDataInfo.h +++ b/GUI/coregui/utils/ImportDataInfo.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_COREGUI_UTILS_IMPORTDATAINFO_H #define BORNAGAIN_GUI_COREGUI_UTILS_IMPORTDATAINFO_H -#include "Device/Unit/IUnitConverter.h" +#include "Device/Unit/Axes.h" #include <QString> #include <memory> diff --git a/Sample/Shapes/IShape3D.h b/Sample/Shapes/IShape3D.h index dd16bbabc04..4d8e43fc537 100644 --- a/Sample/Shapes/IShape3D.h +++ b/Sample/Shapes/IShape3D.h @@ -17,8 +17,8 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_SAMPLE_SHAPES_ISHAPE_H -#define BORNAGAIN_SAMPLE_SHAPES_ISHAPE_H +#ifndef BORNAGAIN_SAMPLE_SHAPES_ISHAPE3D_H +#define BORNAGAIN_SAMPLE_SHAPES_ISHAPE3D_H #include "Base/Vector/Vectors3D.h" #include <vector> @@ -52,5 +52,5 @@ std::vector<kvector_t> RectangleVertices(double length, double width, double z); //! Generate vertices of centered ellipse with given semi-axes at height z std::vector<kvector_t> EllipseVertices(double r_x, double r_y, double z); -#endif // BORNAGAIN_SAMPLE_SHAPES_ISHAPE_H +#endif // BORNAGAIN_SAMPLE_SHAPES_ISHAPE3D_H #endif // USER_API diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i index ff1cd6976b6..8488f294075 100644 --- a/auto/Wrap/doxygenBase.i +++ b/auto/Wrap/doxygenBase.i @@ -702,7 +702,7 @@ perform the actual integration over the ranges [min_array, max_array] // File: classIPixel.xml %feature("docstring") IPixel " -Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel. Abstract base class for SphericalPixel and RectangularPixel. +Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel. Abstract base class for SphericalPixel and RectangularPixel. C++ includes: IPixel.h "; @@ -884,6 +884,36 @@ C++ includes: IntegratorGK.h "; +// File: classRectangularPixel.xml +%feature("docstring") RectangularPixel " + +A pixel in a RectangularDetector. + +C++ includes: RectangularPixel.h +"; + +%feature("docstring") RectangularPixel::RectangularPixel "RectangularPixel::RectangularPixel(const kvector_t &corner_pos, const kvector_t &width, const kvector_t &height) +"; + +%feature("docstring") RectangularPixel::clone "RectangularPixel * RectangularPixel::clone() const override +"; + +%feature("docstring") RectangularPixel::createZeroSizePixel "RectangularPixel * RectangularPixel::createZeroSizePixel(double x, double y) const override +"; + +%feature("docstring") RectangularPixel::getK "kvector_t RectangularPixel::getK(double x, double y, double wavelength) const override +"; + +%feature("docstring") RectangularPixel::getPosition "kvector_t RectangularPixel::getPosition(double x, double y) const +"; + +%feature("docstring") RectangularPixel::integrationFactor "double RectangularPixel::integrationFactor(double x, double y) const override +"; + +%feature("docstring") RectangularPixel::solidAngle "double RectangularPixel::solidAngle() const override +"; + + // File: classSafePointerVector.xml %feature("docstring") SafePointerVector " @@ -1026,6 +1056,33 @@ Tells if simulation element corresponds to a specular peak. "; +// File: classSphericalPixel.xml +%feature("docstring") SphericalPixel " + +A pixel in a SphericalDetector. + +C++ includes: SphericalPixel.h +"; + +%feature("docstring") SphericalPixel::SphericalPixel "SphericalPixel::SphericalPixel(const Bin1D &alpha_bin, const Bin1D &phi_bin) +"; + +%feature("docstring") SphericalPixel::clone "SphericalPixel * SphericalPixel::clone() const override +"; + +%feature("docstring") SphericalPixel::createZeroSizePixel "SphericalPixel * SphericalPixel::createZeroSizePixel(double x, double y) const override +"; + +%feature("docstring") SphericalPixel::getK "kvector_t SphericalPixel::getK(double x, double y, double wavelength) const override +"; + +%feature("docstring") SphericalPixel::integrationFactor "double SphericalPixel::integrationFactor(double x, double y) const override +"; + +%feature("docstring") SphericalPixel::solidAngle "double SphericalPixel::solidAngle() const override +"; + + // File: structThreadInfo.xml %feature("docstring") ThreadInfo " @@ -1650,12 +1707,24 @@ Template function to create an integrator object // File: PolarizationHandler_8h.xml +// File: RectangularPixel_8cpp.xml + + +// File: RectangularPixel_8h.xml + + // File: SimulationElement_8cpp.xml // File: SimulationElement_8h.xml +// File: SphericalPixel_8cpp.xml + + +// File: SphericalPixel_8h.xml + + // File: DelayedProgressCounter_8cpp.xml diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 0001c5949d3..bfa220a5336 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -6,7 +6,7 @@ Wrapper for detector axes units, required for a better representation of detector axes units in python -C++ includes: IUnitConverter.h +C++ includes: Axes.h "; @@ -2264,36 +2264,6 @@ return default axes units "; -// File: classRectangularPixel.xml -%feature("docstring") RectangularPixel " - -A pixel in a RectangularDetector. - -C++ includes: RectangularPixel.h -"; - -%feature("docstring") RectangularPixel::RectangularPixel "RectangularPixel::RectangularPixel(const kvector_t &corner_pos, const kvector_t &width, const kvector_t &height) -"; - -%feature("docstring") RectangularPixel::clone "RectangularPixel * RectangularPixel::clone() const override -"; - -%feature("docstring") RectangularPixel::createZeroSizePixel "RectangularPixel * RectangularPixel::createZeroSizePixel(double x, double y) const override -"; - -%feature("docstring") RectangularPixel::getK "kvector_t RectangularPixel::getK(double x, double y, double wavelength) const override -"; - -%feature("docstring") RectangularPixel::getPosition "kvector_t RectangularPixel::getPosition(double x, double y) const -"; - -%feature("docstring") RectangularPixel::integrationFactor "double RectangularPixel::integrationFactor(double x, double y) const override -"; - -%feature("docstring") RectangularPixel::solidAngle "double RectangularPixel::solidAngle() const override -"; - - // File: classRegionOfInterest.xml %feature("docstring") RegionOfInterest " @@ -2709,33 +2679,6 @@ return default axes units "; -// File: classSphericalPixel.xml -%feature("docstring") SphericalPixel " - -A pixel in a SphericalDetector. - -C++ includes: SphericalPixel.h -"; - -%feature("docstring") SphericalPixel::SphericalPixel "SphericalPixel::SphericalPixel(const Bin1D &alpha_bin, const Bin1D &phi_bin) -"; - -%feature("docstring") SphericalPixel::clone "SphericalPixel * SphericalPixel::clone() const override -"; - -%feature("docstring") SphericalPixel::createZeroSizePixel "SphericalPixel * SphericalPixel::createZeroSizePixel(double x, double y) const override -"; - -%feature("docstring") SphericalPixel::getK "kvector_t SphericalPixel::getK(double x, double y, double wavelength) const override -"; - -%feature("docstring") SphericalPixel::integrationFactor "double SphericalPixel::integrationFactor(double x, double y) const override -"; - -%feature("docstring") SphericalPixel::solidAngle "double SphericalPixel::solidAngle() const override -"; - - // File: classUnitConverterSimple.xml %feature("docstring") UnitConverterSimple " @@ -2811,16 +2754,16 @@ Returns true if area defined by two bins is inside or on border of polygon (more // File: namespace_0d11.xml -// File: namespace_0d38.xml +// File: namespace_0d36.xml -// File: namespace_0d63.xml +// File: namespace_0d59.xml -// File: namespace_0d71.xml +// File: namespace_0d67.xml -// File: namespace_0d96.xml +// File: namespace_0d92.xml // File: namespaceArrayUtils.xml @@ -3141,12 +3084,6 @@ make Swappable // File: RectangularDetector_8h.xml -// File: RectangularPixel_8cpp.xml - - -// File: RectangularPixel_8h.xml - - // File: RegionOfInterest_8cpp.xml @@ -3183,12 +3120,6 @@ make Swappable // File: SphericalDetector_8h.xml -// File: SphericalPixel_8cpp.xml - - -// File: SphericalPixel_8h.xml - - // File: Histogram1D_8cpp.xml @@ -3333,6 +3264,9 @@ make Swappable // File: ScanResolution_8h.xml +// File: Axes_8h.xml + + // File: AxisNames_8cpp.xml diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py index a0648b328a1..74cd5262818 100644 --- a/auto/Wrap/libBornAgainBase.py +++ b/auto/Wrap/libBornAgainBase.py @@ -2584,7 +2584,7 @@ class IPixel(object): r""" - Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel. Abstract base class for SphericalPixel and RectangularPixel. + Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel. Abstract base class for SphericalPixel and RectangularPixel. C++ includes: IPixel.h diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 3637bb1b6e5..496107992c9 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -3675,51 +3675,6 @@ def ScanResolution_scanAbsoluteResolution(*args): """ return _libBornAgainDevice.ScanResolution_scanAbsoluteResolution(*args) -class Axes(object): - r""" - - - Wrapper for detector axes units, required for a better representation of detector axes units in python - - C++ includes: IUnitConverter.h - - """ - - thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - __repr__ = _swig_repr - DEFAULT = _libBornAgainDevice.Axes_DEFAULT - - NBINS = _libBornAgainDevice.Axes_NBINS - - RADIANS = _libBornAgainDevice.Axes_RADIANS - - DEGREES = _libBornAgainDevice.Axes_DEGREES - - MM = _libBornAgainDevice.Axes_MM - - QSPACE = _libBornAgainDevice.Axes_QSPACE - - QXQY = _libBornAgainDevice.Axes_QXQY - - RQ4 = _libBornAgainDevice.Axes_RQ4 - - - def __init__(self): - r""" - __init__(Axes self) -> Axes - - - Wrapper for detector axes units, required for a better representation of detector axes units in python - - C++ includes: IUnitConverter.h - - """ - _libBornAgainDevice.Axes_swiginit(self, _libBornAgainDevice.new_Axes()) - __swig_destroy__ = _libBornAgainDevice.delete_Axes - -# Register Axes in _libBornAgainDevice: -_libBornAgainDevice.Axes_swigregister(Axes) - class IUnitConverter(libBornAgainBase.ICloneable): r""" @@ -3816,8 +3771,6 @@ class IUnitConverter(libBornAgainBase.ICloneable): # Register IUnitConverter in _libBornAgainDevice: _libBornAgainDevice.IUnitConverter_swigregister(IUnitConverter) -cvar = _libBornAgainDevice.cvar -axisUnitLabel = cvar.axisUnitLabel class DetectorMask(object): r""" diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 62d2997dc0a..1f823f14522 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -3097,7 +3097,7 @@ namespace Swig { /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_Axes swig_types[0] +#define SWIGTYPE_p_Axes__Units swig_types[0] #define SWIGTYPE_p_AxisInfo swig_types[1] #define SWIGTYPE_p_BasicVector3DT_double_t swig_types[2] #define SWIGTYPE_p_BasicVector3DT_int_t swig_types[3] @@ -3184,33 +3184,32 @@ namespace Swig { #define SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t swig_types[84] #define SWIGTYPE_p_std__invalid_argument swig_types[85] #define SWIGTYPE_p_std__lessT_std__string_t swig_types[86] -#define SWIGTYPE_p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t swig_types[87] -#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[88] -#define SWIGTYPE_p_std__pairT_double_double_t swig_types[89] -#define SWIGTYPE_p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t swig_types[90] -#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[91] -#define SWIGTYPE_p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t swig_types[92] -#define SWIGTYPE_p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t swig_types[93] -#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[94] -#define SWIGTYPE_p_std__vectorT_SimulationElement_std__allocatorT_SimulationElement_t_t swig_types[95] -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[96] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[97] -#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[98] -#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[99] -#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[100] -#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[101] -#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[102] -#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[103] -#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[104] -#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[105] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[106] -#define SWIGTYPE_p_unsigned_char swig_types[107] -#define SWIGTYPE_p_unsigned_int swig_types[108] -#define SWIGTYPE_p_unsigned_long_long swig_types[109] -#define SWIGTYPE_p_unsigned_short swig_types[110] -#define SWIGTYPE_p_value_type swig_types[111] -static swig_type_info *swig_types[113]; -static swig_module_info swig_module = {swig_types, 112, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[87] +#define SWIGTYPE_p_std__pairT_double_double_t swig_types[88] +#define SWIGTYPE_p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t swig_types[89] +#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[90] +#define SWIGTYPE_p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t swig_types[91] +#define SWIGTYPE_p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t swig_types[92] +#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[93] +#define SWIGTYPE_p_std__vectorT_SimulationElement_std__allocatorT_SimulationElement_t_t swig_types[94] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[95] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[96] +#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[97] +#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[98] +#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[99] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[100] +#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[101] +#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[102] +#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[103] +#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[104] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[105] +#define SWIGTYPE_p_unsigned_char swig_types[106] +#define SWIGTYPE_p_unsigned_int swig_types[107] +#define SWIGTYPE_p_unsigned_long_long swig_types[108] +#define SWIGTYPE_p_unsigned_short swig_types[109] +#define SWIGTYPE_p_value_type swig_types[110] +static swig_type_info *swig_types[112]; +static swig_module_info swig_module = {swig_types, 111, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -34852,66 +34851,6 @@ SWIGINTERN PyObject *ScanResolution_swigregister(PyObject *SWIGUNUSEDPARM(self), return SWIG_Py_Void(); } -SWIGINTERN PyObject *_wrap_new_Axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Axes *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "new_Axes", 0, 0, 0)) SWIG_fail; - result = (Axes *)new Axes(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Axes, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Axes *arg1 = (Axes *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Axes, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Axes" "', argument " "1"" of type '" "Axes *""'"); - } - arg1 = reinterpret_cast< Axes * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Axes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Axes, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Axes_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_axisUnitLabel_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable axisUnitLabel is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_axisUnitLabel_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&axisUnitLabel), SWIGTYPE_p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t, 0 ); - return pyobj; -} - - SWIGINTERN PyObject *_wrap_delete_IUnitConverter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IUnitConverter *arg1 = (IUnitConverter *) 0 ; @@ -34989,8 +34928,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_calculateMin(PyObject *SWIGUNUSEDPARM( int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; + void *argp3 ; + int res3 = 0 ; PyObject *swig_obj[3] ; double result; @@ -35005,11 +34944,19 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_calculateMin(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IUnitConverter_calculateMin" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IUnitConverter_calculateMin" "', argument " "3"" of type '" "Axes::Units""'"); - } - arg3 = static_cast< Axes::Units >(val3); + { + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IUnitConverter_calculateMin" "', argument " "3"" of type '" "Axes::Units""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IUnitConverter_calculateMin" "', argument " "3"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } result = (double)((IUnitConverter const *)arg1)->calculateMin(arg2,arg3); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; @@ -35027,8 +34974,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_calculateMax(PyObject *SWIGUNUSEDPARM( int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; + void *argp3 ; + int res3 = 0 ; PyObject *swig_obj[3] ; double result; @@ -35043,11 +34990,19 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_calculateMax(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IUnitConverter_calculateMax" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IUnitConverter_calculateMax" "', argument " "3"" of type '" "Axes::Units""'"); - } - arg3 = static_cast< Axes::Units >(val3); + { + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IUnitConverter_calculateMax" "', argument " "3"" of type '" "Axes::Units""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IUnitConverter_calculateMax" "', argument " "3"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } result = (double)((IUnitConverter const *)arg1)->calculateMax(arg2,arg3); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; @@ -35095,9 +35050,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_axisName__SWIG_0(PyObject *SWIGUNUSEDP int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 ; - Axes::Units temp3 ; + void *argp3 = 0 ; + int res3 = 0 ; std::string result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; @@ -35111,13 +35065,14 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_axisName__SWIG_0(PyObject *SWIGUNUSEDP SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IUnitConverter_axisName" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - ecode3 = SWIG_AsVal_int (swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IUnitConverter_axisName" "', argument " "3"" of type '" "Axes::Units const &""'"); - } else { - temp3 = static_cast< Axes::Units >(val3); - arg3 = &temp3; + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IUnitConverter_axisName" "', argument " "3"" of type '" "Axes::Units const &""'"); } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IUnitConverter_axisName" "', argument " "3"" of type '" "Axes::Units const &""'"); + } + arg3 = reinterpret_cast< Axes::Units * >(argp3); result = ((IUnitConverter const *)arg1)->axisName(arg2,(Axes::Units const &)*arg3); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; @@ -35189,10 +35144,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_axisName(PyObject *self, PyObject *arg _v = SWIG_CheckState(res); } if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_IUnitConverter_axisName__SWIG_0(self, argc, argv); } @@ -35215,7 +35168,7 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_availableUnits(PyObject *SWIGUNUSEDPAR void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - SwigValueWrapper< std::vector< enum Axes::Units,std::allocator< enum Axes::Units > > > result; + SwigValueWrapper< std::vector< Axes::Units,std::allocator< Axes::Units > > > result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -35247,8 +35200,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_defaultUnits(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IUnitConverter_defaultUnits" "', argument " "1"" of type '" "IUnitConverter const *""'"); } arg1 = reinterpret_cast< IUnitConverter * >(argp1); - result = (Axes::Units)((IUnitConverter const *)arg1)->defaultUnits(); - resultobj = SWIG_From_int(static_cast< int >(result)); + result = ((IUnitConverter const *)arg1)->defaultUnits(); + resultobj = SWIG_NewPointerObj((new Axes::Units(static_cast< const Axes::Units& >(result))), SWIGTYPE_p_Axes__Units, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -35261,8 +35214,8 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_substituteDefaultUnits(PyObject *SWIGU Axes::Units arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 ; + int res2 = 0 ; PyObject *swig_obj[2] ; Axes::Units result; @@ -35272,13 +35225,21 @@ SWIGINTERN PyObject *_wrap_IUnitConverter_substituteDefaultUnits(PyObject *SWIGU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IUnitConverter_substituteDefaultUnits" "', argument " "1"" of type '" "IUnitConverter const *""'"); } arg1 = reinterpret_cast< IUnitConverter * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IUnitConverter_substituteDefaultUnits" "', argument " "2"" of type '" "Axes::Units""'"); - } - arg2 = static_cast< Axes::Units >(val2); - result = (Axes::Units)((IUnitConverter const *)arg1)->substituteDefaultUnits(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IUnitConverter_substituteDefaultUnits" "', argument " "2"" of type '" "Axes::Units""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IUnitConverter_substituteDefaultUnits" "', argument " "2"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + result = ((IUnitConverter const *)arg1)->substituteDefaultUnits(arg2); + resultobj = SWIG_NewPointerObj((new Axes::Units(static_cast< const Axes::Units& >(result))), SWIGTYPE_p_Axes__Units, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -36384,8 +36345,8 @@ SWIGINTERN PyObject *_wrap_IDetector_defaultAxesUnits(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_defaultAxesUnits" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (Axes::Units)((IDetector const *)arg1)->defaultAxesUnits(); - resultobj = SWIG_From_int(static_cast< int >(result)); + result = ((IDetector const *)arg1)->defaultAxesUnits(); + resultobj = SWIG_NewPointerObj((new Axes::Units(static_cast< const Axes::Units& >(result))), SWIGTYPE_p_Axes__Units, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -37944,8 +37905,8 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_defaultAxesUnits(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_defaultAxesUnits" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (Axes::Units)((RectangularDetector const *)arg1)->defaultAxesUnits(); - resultobj = SWIG_From_int(static_cast< int >(result)); + result = ((RectangularDetector const *)arg1)->defaultAxesUnits(); + resultobj = SWIG_NewPointerObj((new Axes::Units(static_cast< const Axes::Units& >(result))), SWIGTYPE_p_Axes__Units, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -38317,8 +38278,8 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_defaultAxesUnits(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SphericalDetector_defaultAxesUnits" "', argument " "1"" of type '" "SphericalDetector const *""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - result = (Axes::Units)((SphericalDetector const *)arg1)->defaultAxesUnits(); - resultobj = SWIG_From_int(static_cast< int >(result)); + result = ((SphericalDetector const *)arg1)->defaultAxesUnits(); + resultobj = SWIG_NewPointerObj((new Axes::Units(static_cast< const Axes::Units& >(result))), SWIGTYPE_p_Axes__Units, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -43133,8 +43094,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_histogram2d__SWIG_0(PyObject *SWIGUN Axes::Units arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 ; + int res2 = 0 ; Histogram2D *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; @@ -43143,11 +43104,19 @@ SWIGINTERN PyObject *_wrap_SimulationResult_histogram2d__SWIG_0(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_histogram2d" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_histogram2d" "', argument " "2"" of type '" "Axes::Units""'"); - } - arg2 = static_cast< Axes::Units >(val2); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulationResult_histogram2d" "', argument " "2"" of type '" "Axes::Units""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_histogram2d" "', argument " "2"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } result = (Histogram2D *)((SimulationResult const *)arg1)->histogram2d(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram2D, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -43200,10 +43169,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_histogram2d(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_SimulationResult_histogram2d__SWIG_0(self, argc, argv); } @@ -43225,8 +43192,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axisInfo__SWIG_0(PyObject *SWIGUNUSE Axes::Units arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 ; + int res2 = 0 ; SwigValueWrapper< std::vector< AxisInfo,std::allocator< AxisInfo > > > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; @@ -43235,11 +43202,19 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axisInfo__SWIG_0(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_axisInfo" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_axisInfo" "', argument " "2"" of type '" "Axes::Units""'"); - } - arg2 = static_cast< Axes::Units >(val2); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulationResult_axisInfo" "', argument " "2"" of type '" "Axes::Units""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_axisInfo" "', argument " "2"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } result = ((SimulationResult const *)arg1)->axisInfo(arg2); resultobj = SWIG_NewPointerObj((new std::vector< AxisInfo,std::allocator< AxisInfo > >(static_cast< const std::vector< AxisInfo,std::allocator< AxisInfo > >& >(result))), SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -43292,10 +43267,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axisInfo(PyObject *self, PyObject *a int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_SimulationResult_axisInfo__SWIG_0(self, argc, argv); } @@ -43409,8 +43382,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_array__SWIG_0(PyObject *SWIGUNUSEDPA Axes::Units arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 ; + int res2 = 0 ; PyObject *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; @@ -43419,11 +43392,19 @@ SWIGINTERN PyObject *_wrap_SimulationResult_array__SWIG_0(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_array" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_array" "', argument " "2"" of type '" "Axes::Units""'"); - } - arg2 = static_cast< Axes::Units >(val2); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulationResult_array" "', argument " "2"" of type '" "Axes::Units""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_array" "', argument " "2"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } result = (PyObject *)((SimulationResult const *)arg1)->array(arg2); resultobj = result; return resultobj; @@ -43476,10 +43457,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_array(PyObject *self, PyObject *args int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_SimulationResult_array__SWIG_0(self, argc, argv); } @@ -43501,8 +43480,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis__SWIG_0(PyObject *SWIGUNUSEDPAR Axes::Units arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 ; + int res2 = 0 ; std::vector< double,std::allocator< double > > result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; @@ -43511,11 +43490,19 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis__SWIG_0(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_axis" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_axis" "', argument " "2"" of type '" "Axes::Units""'"); - } - arg2 = static_cast< Axes::Units >(val2); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulationResult_axis" "', argument " "2"" of type '" "Axes::Units""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_axis" "', argument " "2"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } result = ((SimulationResult const *)arg1)->axis(arg2); resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; @@ -43554,8 +43541,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis__SWIG_2(PyObject *SWIGUNUSEDPAR int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; + void *argp3 ; + int res3 = 0 ; std::vector< double,std::allocator< double > > result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; @@ -43569,11 +43556,19 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis__SWIG_2(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimulationResult_axis" "', argument " "3"" of type '" "Axes::Units""'"); - } - arg3 = static_cast< Axes::Units >(val3); + { + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Axes__Units, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SimulationResult_axis" "', argument " "3"" of type '" "Axes::Units""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimulationResult_axis" "', argument " "3"" of type '" "Axes::Units""'"); + } else { + Axes::Units * temp = reinterpret_cast< Axes::Units * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } result = ((SimulationResult const *)arg1)->axis(arg2,arg3); resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; @@ -43634,10 +43629,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_SimulationResult_axis__SWIG_0(self, argc, argv); } @@ -43669,10 +43662,8 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axis(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Axes__Units, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); if (_v) { return _wrap_SimulationResult_axis__SWIG_2(self, argc, argv); } @@ -45417,18 +45408,6 @@ static PyMethodDef SwigMethods[] = { "ScanResolution_scanAbsoluteResolution(IRangedDistribution const & distr, vdouble1d_t stddevs) -> ScanResolution\n" ""}, { "ScanResolution_swigregister", ScanResolution_swigregister, METH_O, NULL}, - { "new_Axes", _wrap_new_Axes, METH_NOARGS, "\n" - "new_Axes() -> Axes\n" - "\n" - "\n" - "Wrapper for detector axes units, required for a better representation of detector axes units in python\n" - "\n" - "C++ includes: IUnitConverter.h\n" - "\n" - ""}, - { "delete_Axes", _wrap_delete_Axes, METH_O, "delete_Axes(Axes self)"}, - { "Axes_swigregister", Axes_swigregister, METH_O, NULL}, - { "Axes_swiginit", Axes_swiginit, METH_VARARGS, NULL}, { "delete_IUnitConverter", _wrap_delete_IUnitConverter, METH_O, "\n" "delete_IUnitConverter(IUnitConverter self)\n" "IUnitConverter::~IUnitConverter()\n" @@ -46797,7 +46776,7 @@ static void *_p_IResolutionFunction2DTo_p_ICloneable(void *x, int *SWIGUNUSEDPAR static void *_p_LineTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (IShape2D *) ((Line *) x)); } -static swig_type_info _swigt__p_Axes = {"_p_Axes", "Axes *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Axes__Units = {"_p_Axes__Units", "Axes::Units *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_AxisInfo = {"_p_AxisInfo", "AxisInfo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BasicVector3DT_double_t = {"_p_BasicVector3DT_double_t", "std::vector< BasicVector3D< double > >::value_type *|kvector_t *|BasicVector3D< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BasicVector3DT_int_t = {"_p_BasicVector3DT_int_t", "ivector_t *|BasicVector3D< int > *", 0, 0, (void*)0, 0}; @@ -46884,10 +46863,9 @@ static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_doub static swig_type_info _swigt__p_std__functionT_void_fSimulationAreaIterator_const_RF_t = {"_p_std__functionT_void_fSimulationAreaIterator_const_RF_t", "std::function< void (IDetector::const_iterator) > *|std::function< void (SimulationAreaIterator const &) > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t = {"_p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t", "std::map< Axes::Units,char const *,std::less< Axes::Units >,std::allocator< std::pair< Axes::Units const,char const * > > > *|std::map< enum Axes::Units,char const *,std::less< enum Axes::Units >,std::allocator< std::pair< enum Axes::Units const,char const * > > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t = {"_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t", "std::map< std::string,double,std::less< std::string >,std::allocator< std::pair< std::string const,double > > > *|std::map< std::string,double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_double_double_t = {"_p_std__pairT_double_double_t", "std::pair< double,double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t = {"_p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t", "std::vector< Axes::Units,std::allocator< Axes::Units > > *|std::vector< enum Axes::Units,std::allocator< enum Axes::Units > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t = {"_p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t", "std::vector< Axes::Units,std::allocator< Axes::Units > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t = {"_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t", "std::vector< AxisInfo,std::allocator< AxisInfo > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t = {"_p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t", "std::vector< BasicVector3D< double > > *|std::vector< BasicVector3D< double >,std::allocator< BasicVector3D< double > > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t = {"_p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t", "std::vector< BasicVector3D< std::complex< double > > > *|std::vector< BasicVector3D< std::complex< double > >,std::allocator< BasicVector3D< std::complex< double > > > > *", 0, 0, (void*)0, 0}; @@ -46911,7 +46889,7 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { - &_swigt__p_Axes, + &_swigt__p_Axes__Units, &_swigt__p_AxisInfo, &_swigt__p_BasicVector3DT_double_t, &_swigt__p_BasicVector3DT_int_t, @@ -46998,7 +46976,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_std__functionT_void_fSimulationAreaIterator_const_RF_t, &_swigt__p_std__invalid_argument, &_swigt__p_std__lessT_std__string_t, - &_swigt__p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t, &_swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t, &_swigt__p_std__pairT_double_double_t, &_swigt__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t, @@ -47025,7 +47002,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_value_type, }; -static swig_cast_info _swigc__p_Axes[] = { {&_swigt__p_Axes, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Axes__Units[] = { {&_swigt__p_Axes__Units, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_AxisInfo[] = { {&_swigt__p_AxisInfo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BasicVector3DT_double_t[] = { {&_swigt__p_BasicVector3DT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BasicVector3DT_int_t[] = { {&_swigt__p_BasicVector3DT_int_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -47112,7 +47089,6 @@ static swig_cast_info _swigc__p_std__complexT_double_t[] = { {&_swigt__p_std__c static swig_cast_info _swigc__p_std__functionT_void_fSimulationAreaIterator_const_RF_t[] = { {&_swigt__p_std__functionT_void_fSimulationAreaIterator_const_RF_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__lessT_std__string_t[] = { {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t[] = { {&_swigt__p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t[] = { {&_swigt__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_double_double_t[] = { {&_swigt__p_std__pairT_double_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t[] = { {&_swigt__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -47139,7 +47115,7 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { - _swigc__p_Axes, + _swigc__p_Axes__Units, _swigc__p_AxisInfo, _swigc__p_BasicVector3DT_double_t, _swigc__p_BasicVector3DT_int_t, @@ -47226,7 +47202,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_std__functionT_void_fSimulationAreaIterator_const_RF_t, _swigc__p_std__invalid_argument, _swigc__p_std__lessT_std__string_t, - _swigc__p_std__mapT_Axes__Units_char_const_p_std__lessT_Axes__Units_t_std__allocatorT_std__pairT_Axes__Units_const_char_const_p_t_t_t, _swigc__p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t, _swigc__p_std__pairT_double_double_t, _swigc__p_std__vectorT_Axes__Units_std__allocatorT_Axes__Units_t_t, @@ -47994,26 +47969,6 @@ SWIG_init(void) { // thread safe initialization swig::container_owner_attribute(); - SWIG_Python_SetConstant(d, "Axes_DEFAULT",SWIG_From_int(static_cast< int >(Axes::DEFAULT))); - SWIG_Python_SetConstant(d, "Axes_NBINS",SWIG_From_int(static_cast< int >(Axes::NBINS))); - SWIG_Python_SetConstant(d, "Axes_RADIANS",SWIG_From_int(static_cast< int >(Axes::RADIANS))); - SWIG_Python_SetConstant(d, "Axes_DEGREES",SWIG_From_int(static_cast< int >(Axes::DEGREES))); - SWIG_Python_SetConstant(d, "Axes_MM",SWIG_From_int(static_cast< int >(Axes::MM))); - SWIG_Python_SetConstant(d, "Axes_QSPACE",SWIG_From_int(static_cast< int >(Axes::QSPACE))); - SWIG_Python_SetConstant(d, "Axes_QXQY",SWIG_From_int(static_cast< int >(Axes::QXQY))); - SWIG_Python_SetConstant(d, "Axes_RQ4",SWIG_From_int(static_cast< int >(Axes::RQ4))); - globals = SWIG_globals(); - if (!globals) { - PyErr_SetString(PyExc_TypeError, "Failure to create SWIG globals."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - PyDict_SetItemString(md, "cvar", globals); - Py_DECREF(globals); - SWIG_addvarlink(globals, "axisUnitLabel", Swig_var_axisUnitLabel_get, Swig_var_axisUnitLabel_set); SWIG_Python_SetConstant(d, "RectangularDetector_GENERIC",SWIG_From_int(static_cast< int >(RectangularDetector::GENERIC))); SWIG_Python_SetConstant(d, "RectangularDetector_PERPENDICULAR_TO_SAMPLE",SWIG_From_int(static_cast< int >(RectangularDetector::PERPENDICULAR_TO_SAMPLE))); SWIG_Python_SetConstant(d, "RectangularDetector_PERPENDICULAR_TO_DIRECT_BEAM",SWIG_From_int(static_cast< int >(RectangularDetector::PERPENDICULAR_TO_DIRECT_BEAM))); -- GitLab