eis/inc/zlib/MemTrk.h

84 lines
1.5 KiB
C++

/*********************************************************************
*
* name: MemTrk.h
*
* copyright: Shanghai Baosight Software Co., Ltd.
*
* Version history
* 1.0 2020-02-16 zoufuzhou create
*
*********************************************************************/
#ifndef _H_MEM_TRK_H
#define _H_MEM_TRK_H
#include <zlib/zoneDef.h>
using namespace baosight;
class CMemTrk
{
public:
CMemTrk();
public:
~CMemTrk(void);
public:
TRK_UNIT* operator()(int zone);
TRK_UNIT* operator()(int zone,int ti);
TRK_UNIT* operator()(int zone,const string& coilid);
TRK_UNIT* isNull();
//index: history cache index
TRK_UNIT* getHistory(int zone,int index);
TRK_UNIT* getHistory(int zone,const string& entId);
TRK_UNIT* getPrev(int zone,int ti);
TRK_UNIT* getPrev(int zone,const string& entId);
TRK_UNIT* getNext(int zone,int ti);
TRK_UNIT* getNext(int zone,const string& entId);
//set the coil zone start pos
void setStart(int zone,int start,int ti = 0);
//set the coil zone end pos
void setEnd(int zone,int start,int ti = 0);
//mm
long getCoilLen(int ti);
//process coil move forward backup
void backup(int zone);
//process coil move forward backup
void backup(void);
//process coil shift back
void rollback(int zone,int ti);
void copy(TRK_UNIT* dist,TRK_UNIT* source);
//process coil shift length
void shift(int ti,int shiftlength);
void shiftSpring(int ti,int shiftlength);
void shiftBackward(int zone,int shiftlength = 0);
private:
TRK_UNIT ptr_null;
//TRK_ZONES* p_trk;
TRK_ZONE* mp_trk;
};
#endif