Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
DataPoints.h
Go to the documentation of this file.
1 
12 #ifndef __KOME_CORE_DATA_POINTS_H__
13 #define __KOME_CORE_DATA_POINTS_H__
14 
15 #include "XYData.h"
16 
17 
18 namespace kome {
19  namespace core {
20 
25  class CORE_TOOLKITS_CLASS DataPoints : public XYData {
26  public:
31  typedef enum {
32  DOUBLE,
33  FLOAT,
34  } ArrayType;
35 
36  public:
42  DataPoints( ArrayType type = DOUBLE );
43 
49  DataPoints( const DataPoints& pts );
50 
55  virtual ~DataPoints();
56 
57  public:
64  DataPoints& operator=( const DataPoints& other );
65 
66  protected:
71  union DataArray {
72  double* dblarry;
73  float* fltarry;
74  };
75 
78 
81 
84 
86  unsigned int m_arraySize;
87 
89  unsigned int m_length;
90 
91  public:
97  void* getXData();
98 
104  void* getYData();
105 
106  protected:
111  virtual void onClearPoints();
112 
119  virtual void onAddPoint( const double x, const double y );
120 
128  virtual void onInsertPoint( const unsigned int index, const double x, const double y );
129 
135  virtual void onDeletePoint( const unsigned int index );
136 
142  virtual unsigned int onGetLength();
143 
150  virtual double onGetX( const unsigned int index );
151 
158  virtual double onGetY( const unsigned int index );
159 
165  virtual void onReserve( const unsigned int num );
166 
167  protected:
173  void changeSize( const unsigned int size ) ;
174  };
175  }
176 }
177 
178 #endif // __KOME_CORE_DATA_POINTS_H__
abstraction class of two dimention coordinate data
Definition: XYData.h:34
data points data of profile management class
Definition: DataPoints.h:25
ArrayType
the type of array
Definition: DataPoints.h:31
unsigned int m_length
Definition: DataPoints.h:89
unsigned int m_arraySize
Definition: DataPoints.h:86
interfaces of XYData class