13#ifndef ML_CURVE_LIST_H
14#define ML_CURVE_LIST_H
117 void getXYRange(
double *xMin,
double *xMax,
double *yMin,
double *yMax)
const;
void clear()
Clear list of CurveData objects, Objects are automatically deleted if the last reference is gone.
~CurveList() override=default
Destructor shouldn't be called directly anymore, always use the CurveListPtr smart-pointer.
CurveList()
Default constructor.
void addStateToTree(TreeNode *parent) const override
CurveList(const CurveList &curveList, bool deepCopyArg=false)
Copy constructor. The curve objects are only copied if deepCopy is set to true.
double getYMin() const
Get overall minimum Y data value.
double getYMax() const
Get overall maximum Y data value.
void readStateFromTree(TreeNode *parent) override
Implement import functionality (as used by the LoadBase module):
MLssize_t getNumCurves() const
Get number of curve objects.
void appendCurve(CurveDataPtr curve)
Append CurveData object.
CurveList * deepCopy() const override
double getXMin() const
Get overall minimum X data value.
CurveDataPtr takeCurve(MLssize_t index)
void insertCurve(MLssize_t index, CurveDataPtr curve)
Insert CurveData object at index. index is automatically clamped to the valid range.
MLBASEEXPORT friend bool operator==(const CurveList &x, const CurveList &y)
const std::vector< CurveDataPtr > & getCurveList()
Access vector of CurveData pointers directly.
double getXMax() const
Get overall maximum X data value.
std::vector< CurveDataPtr > _curveList
List of curve object pointers.
void reserve(size_t n)
Reserve entries in curve list (for optimization).
ML_SET_ADDSTATE_VERSION(1)
MLBASEEXPORT friend bool operator!=(const CurveList &x, const CurveList &y)
void getXYRange(double *xMin, double *xMax, double *yMin, double *yMax) const
Get overall X and Y value ranges (NULL pointers are allowed).
CurveDataPtr getCurveData(MLssize_t index)
void removeCurves(size_t index, size_t count)
Remove a range of CurveData. The range is automatically restricted to the valid range of elements.
RefCountedBase()
Constructor.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
#define ML_REFCOUNTED_PTR(CLASSNAME)
Macro that defines convenience Ptr/ConstPtr typedefs to be used instead of intrusive_ptr templates.
#define ML_CLASS_HEADER(className)
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...