13#ifndef ML_CURVE_LIST_H
14#define ML_CURVE_LIST_H
Base object class CurveList with a list of CurveData (smart) object pointers.
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
Set addStateToTree version number that can be accessed via getAddStateVersion()
double getXMin() const
Get overall minimum X data value.
CurveDataPtr takeCurve(MLssize_t index)
Take pointer to CurveData object at index (i.e.
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)
Get pointer to CurveData object at 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 class adds intrusive reference counting support to the Base class.
The class TreeNode is the abstract base class for the import/export of ML objects.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#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)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
SSIZE_T MLssize_t
The signed ML size type which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...