DianLi/LandslidePredict/CProcessBase.h

99 lines
1.5 KiB
C
Raw Permalink Normal View History

2023-03-13 16:17:55 +08:00
#pragma once
#include <iostream>
using namespace std;
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>ֵ
*/
//Դ<>룺class IMGALG_API CProcessBase
class CProcessBase
{
public:
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
CProcessBase()
{
m_dPosition = 0.0;
m_iStepCount = 100;
m_iCurStep = 0;
m_bIsContinue = true;
}
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
virtual ~CProcessBase() {}
/**
* @brief <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param pszMsg <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
*/
virtual void SetMessage(const char* pszMsg) = 0;
/**
* @brief <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>ֵ
* @param dPosition <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>trueΪ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>falseΪȡ<EFBFBD><EFBFBD>
*/
virtual bool SetPosition(double dPosition) = 0;
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>true<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>false<EFBFBD><EFBFBD>ʾȡ<EFBFBD><EFBFBD>
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>trueΪ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>falseΪȡ<EFBFBD><EFBFBD>
*/
virtual bool StepIt() = 0;
/**
* @brief <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD>ȸ<EFBFBD><EFBFBD><EFBFBD>
* @param iStepCount <EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD><EFBFBD><EFBFBD>
*/
virtual void SetStepCount(int iStepCount)
{
ReSetProcess();
m_iStepCount = iStepCount;
}
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @return <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
*/
string GetMessage()
{
return m_strMessage;
}
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @return <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
*/
double GetPosition()
{
return m_dPosition;
}
/**
* @brief <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
void ReSetProcess()
{
m_dPosition = 0.0;
m_iStepCount = 100;
m_iCurStep = 0;
m_bIsContinue = true;
}
/*! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ */
string m_strMessage;
/*! <20><><EFBFBD><EFBFBD>ֵ */
double m_dPosition;
/*! <20><><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD> */
int m_iStepCount;
/*! <20><><EFBFBD>ȵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD> */
int m_iCurStep;
/*! <20>Ƿ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ֵΪfalseʱ<65><CAB1>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1> */
bool m_bIsContinue;
};