#ifndef VCONTAINER_H #define VCONTAINER_H #include #include #include "vpointf.h" #include "vstandarttablecell.h" #include "vincrementtablerow.h" #include "../geometry/vspline.h" #include "../geometry/varc.h" /** * @brief The VContainer class */ class VContainer { public: /** * @brief VContainer */ VContainer(); /** * @brief GetPoint * @param id * @return */ VPointF GetPoint(qint64 id) const; VStandartTableCell GetStandartTableCell(const QString& name) const; VIncrementTableRow GetIncrementTableRow(const QString& name) const; qreal GetLine(const QString &name) const; VSpline GetSpline(qint64 id) const; VArc GetArc(qint64 id) const; qint64 getId(); qint64 AddPoint(const VPointF& point); void AddStandartTableCell(const QString& name, const VStandartTableCell& cell); void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell); void AddLengthLine(const QString &name, const qreal &value); void AddLengthSpline(const qint64 &firstPointId, const qint64 &secondPointId); void AddLengthSpline(const QString &name, const qreal &value); void AddLengthArc(const qint64 &firstPointId, const qint64 ¢erPoint, const qint64 &secondPointId); void AddLengthArc(const QString &name, const qreal &value); void AddLine(const qint64 &firstPointId, const qint64 &secondPointId); qint64 AddSpline(const VSpline& spl); qint64 AddArc(const VArc& arc); QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint) const; QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint) const; QString GetNameArc(const qint64 &firstPoint, const qint64 ¢erPoint, const qint64 &secondPoint) const; void UpdatePoint(qint64 id, const VPointF& point); void UpdateSpline(qint64 id, const VSpline& spl); void UpdateArc(qint64 id, const VArc& arc); void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell); void UpdateIncrementTableRow(const QString& name, const VIncrementTableRow& cell); qreal GetValueStandartTableCell(const QString& name) const; qreal GetValueIncrementTableRow(const QString& name) const; void Clear(); void ClearIncrementTable(); void ClearLengthLines(); void ClearLengthSplines(); void ClearLengthArcs(); void SetSize(qint32 size); void SetGrowth(qint32 growth); qint32 size() const; qint32 growth() const; qreal FindVar(const QString& name, bool *ok)const; bool IncrementTableContains(const QString& name); qint64 getNextId(); void RemoveIncrementTableRow(const QString& name); const QMap *DataPoints() const; const QMap *DataSplines() const; const QMap *DataArcs() const; const QMap *DataBase() const; const QMap *DataStandartTable() const; const QMap *DataIncrementTable() const; const QMap *DataLengthLines() const; const QMap *DataLengthSplines() const; const QMap *DataLengthArcs() const; private: qint64 _id; QMap base; QMap points; QMap standartTable; QMap incrementTable; QMap lengthLines; QMap splines; QMap lengthSplines; QMap arcs; QMap lengthArcs; }; #endif // VCONTAINER_H