14 #ifndef __KOME_CORE_XY_DATA_H__
15 #define __KOME_CORE_XY_DATA_H__
23 #include <boost/function.hpp>
24 #include <boost/optional.hpp>
69 std::string m_tmpDataFile;
76 static const unsigned int m_cacheSize;
124 void addPoint(
const double x,
const double y );
133 void insertPoint(
const unsigned int index,
const double x,
const double y );
142 void updatePoint(
const unsigned int index,
const double x,
const double y );
149 void deletePoint(
const unsigned int index );
156 unsigned int getLength();
164 double getX(
const unsigned int index );
172 double getY(
const unsigned int index );
179 void reserve(
const unsigned int num );
187 unsigned long getVersion();
196 int searchIndex(
const double x );
203 int getNearestIndex(
const double x );
211 void filter(
const double absY = 0.0,
const double relY = 0.0 );
222 void getPoints( std::vector<
Point< double > >& points,
const bool ySort,
const bool desc );
230 bool importData( boost::function<
int (
void*,
int ) > readFun );
237 bool exportData( boost::function<
int (
void*,
int ) > writeFun );
253 virtual bool onLoadData( boost::function<
int (
void*,
int ) > readFun );
261 virtual bool onSaveData( boost::function<
int (
void*,
int ) > writeFun );
268 virtual void onClearPoints() = 0;
276 virtual void onAddPoint(
const double x,
const double y ) = 0;
285 virtual void onInsertPoint(
const unsigned int index,
const double x,
const double y ) = 0;
292 virtual void onDeletePoint(
const unsigned int index ) = 0;
299 virtual unsigned int onGetLength() = 0;
307 virtual double onGetX(
const unsigned int index ) = 0;
315 virtual double onGetY(
const unsigned int index ) = 0;
322 virtual void onReserve(
const unsigned int num ) = 0;
343 static std::list< XYData* >& getCacheList();
348 #endif // __KOME_CORE_XY_DATA_H__
abstraction class of two dimention coordinate data
definition of Point class
interfaces of Timer class
static unsigned long m_currentVersion
version