SEArray.h
1 #pragma once
2 #include "SEProperty.h"
3 
4 class DLL_DECL SEArray : public SEProperty
5 {
6 protected:
7  std::vector<double> m_dData;
8  std::shared_ptr<CCompoundUnit> m_unit;
9 
10 public:
11  SEArray();
12  ~SEArray();
13 
14  virtual std::shared_ptr<CDM::PropertyData> UnloadData();
15  std::shared_ptr<CDM::ArrayData> Unload();
16  void Unload(std::shared_ptr<CDM::ArrayData> data);
17  bool Load(std::shared_ptr<CDM::ArrayData> in);
18 
19  virtual bool IsValid();
20  virtual void Invalidate();
21 
22  virtual bool IsValidUnit(const std::string& unit) { return true; };
23  virtual bool IsValidUnit(const std::shared_ptr<CCompoundUnit>& unit);
24  // TODO std::string GetUnit() { return m_unit; }
25 
26  unsigned int Size();
27 
28  std::string GetStringData(const std::string& unit=SEScalar::unitless);
29  bool SetStringData(const std::string& data, const std::string& unit=SEScalar::unitless);
30 
31  bool SetDoubleData(double *data, int len, const std::string& unit=SEScalar::unitless);
32  bool GetDoubleData(double *&data, int &len, const std::string& unit=SEScalar::unitless);
33 
34  double GetIndex(unsigned int idx, const std::string& unit=SEScalar::unitless);
35  void SetIndex(unsigned int idx, double value, const std::string& unit=SEScalar::unitless);
36  bool Append(double value, const std::string& unit=SEScalar::unitless);
37 
38  bool SetVectorData(std::vector<double> data, const std::string& unit=SEScalar::unitless);
39  bool GetVectorData(std::vector<double> data, const std::string& unit=SEScalar::unitless);
40 };
41 //STL_DECL template class DLL_DECL std::vector<double>;
virtual void Invalidate()=0
Definition: SEArray.h:4
virtual bool IsValid() const =0
std::shared_ptr< CCompoundUnit > m_unit
Definition: SEArray.h:8
virtual bool IsValidUnit(const std::string &unit)
Definition: SEArray.h:22
Definition: SEProperty.h:7
std::vector< double > m_dData
Definition: SEArray.h:7