93 lines
2.5 KiB
C++
93 lines
2.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.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.25
|
|
* 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.
|
|
*/
|
|
/*
|
|
* Plot.h
|
|
*
|
|
* x and y coordinates for plotting, it is OK to assume that both arrays have the same size; layout is optimized for Plotly
|
|
*/
|
|
|
|
#ifndef Plot_H_
|
|
#define Plot_H_
|
|
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
/// <summary>
|
|
/// x and y coordinates for plotting, it is OK to assume that both arrays have the same size; layout is optimized for Plotly
|
|
/// </summary>
|
|
class Plot
|
|
{
|
|
public:
|
|
Plot();
|
|
virtual ~Plot() = default;
|
|
|
|
|
|
/// <summary>
|
|
/// Validate the current data in the model. Throws a ValidationException on failure.
|
|
/// </summary>
|
|
void validate() const;
|
|
|
|
/// <summary>
|
|
/// Validate the current data in the model. Returns false on error and writes an error
|
|
/// message into the given stringstream.
|
|
/// </summary>
|
|
bool validate(std::stringstream& msg) const;
|
|
|
|
/// <summary>
|
|
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
|
|
/// Not meant to be called outside that case.
|
|
/// </summary>
|
|
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
|
|
|
bool operator==(const Plot& rhs) const;
|
|
bool operator!=(const Plot& rhs) const;
|
|
|
|
/////////////////////////////////////////////
|
|
/// Plot members
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
std::string getTitle() const;
|
|
void setTitle(std::string const& value);
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
std::vector<float> getX() const;
|
|
void setX(std::vector<float> const value);
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
std::vector<float> getY() const;
|
|
void setY(std::vector<float> const value);
|
|
|
|
friend void to_json(nlohmann::json& j, const Plot& o);
|
|
friend void from_json(const nlohmann::json& j, Plot& o);
|
|
protected:
|
|
std::string m_Title;
|
|
|
|
std::vector<float> m_x;
|
|
|
|
std::vector<float> m_y;
|
|
|
|
|
|
};
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|
|
#endif /* Plot_H_ */
|