Build Packages / Unit tests (push) Successful in 1h20m0s
Build Packages / build:windows:cuda (push) Successful in 17m33s
Build Packages / build:viewer-tgz:cpu (push) Successful in 6m32s
Build Packages / build:viewer-tgz:cuda (push) Successful in 7m16s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m25s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m26s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m9s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m21s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m28s
Build Packages / build:rpm (rocky8) (push) Successful in 10m35s
Build Packages / build:rpm (rocky9) (push) Successful in 11m29s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m56s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m13s
Build Packages / DIALS test (push) Successful in 14m16s
Build Packages / XDS test (durin plugin) (push) Successful in 8m8s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m26s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m18s
Build Packages / Generate python client (push) Successful in 20s
Build Packages / Build documentation (push) Successful in 1m10s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 10m31s
Build Packages / Unit tests (pull_request) Successful in 1h5m58s
Build Packages / build:windows:nocuda (pull_request) Successful in 15m10s
Build Packages / build:viewer-tgz:cpu (pull_request) Successful in 7m36s
Build Packages / build:viewer-tgz:cuda (pull_request) Successful in 7m27s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m47s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 10m9s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 9m15s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 9m21s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m42s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m38s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 10m56s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m27s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 9m49s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m35s
Build Packages / DIALS test (pull_request) Successful in 10m40s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 7m20s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m12s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 7m2s
Build Packages / Generate python client (pull_request) Successful in 28s
Build Packages / Build documentation (pull_request) Successful in 58s
Build Packages / Create release (pull_request) Skipped
Build Packages / build:windows:cuda (pull_request) Successful in 12m32s
218 lines
5.5 KiB
C++
218 lines
5.5 KiB
C++
/**
|
|
* Jungfraujoch
|
|
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.159
|
|
* Contact: filip.leonarski@psi.ch
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
#include "Roi_box.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Roi_box::Roi_box()
|
|
{
|
|
m_Name = "";
|
|
m_Min_x_pxl = 0L;
|
|
m_Max_x_pxl = 0L;
|
|
m_Min_y_pxl = 0L;
|
|
m_Max_y_pxl = 0L;
|
|
|
|
}
|
|
|
|
void Roi_box::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Roi_box::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Roi_box::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Roi_box" : pathPrefix;
|
|
|
|
|
|
|
|
/* Name */ {
|
|
const std::string& value = m_Name;
|
|
const std::string currentValuePath = _pathPrefix + ".name";
|
|
|
|
|
|
if (value.length() < 1)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be at least 1 characters long;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Min_x_pxl */ {
|
|
const int64_t& value = m_Min_x_pxl;
|
|
const std::string currentValuePath = _pathPrefix + ".minXPxl";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Max_x_pxl */ {
|
|
const int64_t& value = m_Max_x_pxl;
|
|
const std::string currentValuePath = _pathPrefix + ".maxXPxl";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Min_y_pxl */ {
|
|
const int64_t& value = m_Min_y_pxl;
|
|
const std::string currentValuePath = _pathPrefix + ".minYPxl";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Max_y_pxl */ {
|
|
const int64_t& value = m_Max_y_pxl;
|
|
const std::string currentValuePath = _pathPrefix + ".maxYPxl";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Roi_box::operator==(const Roi_box& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getName() == rhs.getName())
|
|
&&
|
|
|
|
(getMinXPxl() == rhs.getMinXPxl())
|
|
&&
|
|
|
|
(getMaxXPxl() == rhs.getMaxXPxl())
|
|
&&
|
|
|
|
(getMinYPxl() == rhs.getMinYPxl())
|
|
&&
|
|
|
|
(getMaxYPxl() == rhs.getMaxYPxl())
|
|
|
|
|
|
;
|
|
}
|
|
|
|
bool Roi_box::operator!=(const Roi_box& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Roi_box& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["name"] = o.m_Name;
|
|
j["min_x_pxl"] = o.m_Min_x_pxl;
|
|
j["max_x_pxl"] = o.m_Max_x_pxl;
|
|
j["min_y_pxl"] = o.m_Min_y_pxl;
|
|
j["max_y_pxl"] = o.m_Max_y_pxl;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Roi_box& o)
|
|
{
|
|
j.at("name").get_to(o.m_Name);
|
|
j.at("min_x_pxl").get_to(o.m_Min_x_pxl);
|
|
j.at("max_x_pxl").get_to(o.m_Max_x_pxl);
|
|
j.at("min_y_pxl").get_to(o.m_Min_y_pxl);
|
|
j.at("max_y_pxl").get_to(o.m_Max_y_pxl);
|
|
|
|
}
|
|
|
|
std::string Roi_box::getName() const
|
|
{
|
|
return m_Name;
|
|
}
|
|
void Roi_box::setName(std::string const& value)
|
|
{
|
|
m_Name = value;
|
|
}
|
|
int64_t Roi_box::getMinXPxl() const
|
|
{
|
|
return m_Min_x_pxl;
|
|
}
|
|
void Roi_box::setMinXPxl(int64_t const value)
|
|
{
|
|
m_Min_x_pxl = value;
|
|
}
|
|
int64_t Roi_box::getMaxXPxl() const
|
|
{
|
|
return m_Max_x_pxl;
|
|
}
|
|
void Roi_box::setMaxXPxl(int64_t const value)
|
|
{
|
|
m_Max_x_pxl = value;
|
|
}
|
|
int64_t Roi_box::getMinYPxl() const
|
|
{
|
|
return m_Min_y_pxl;
|
|
}
|
|
void Roi_box::setMinYPxl(int64_t const value)
|
|
{
|
|
m_Min_y_pxl = value;
|
|
}
|
|
int64_t Roi_box::getMaxYPxl() const
|
|
{
|
|
return m_Max_y_pxl;
|
|
}
|
|
void Roi_box::setMaxYPxl(int64_t const value)
|
|
{
|
|
m_Max_y_pxl = value;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|