You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
805 B
C++
38 lines
805 B
C++
#include "StdAfx.h"
|
|
#include "ValVectorMgr.h"
|
|
#include "GlobalFunction.h"
|
|
|
|
|
|
CValVectorMgr::CValVectorMgr(void)
|
|
{
|
|
}
|
|
CValVectorMgr::~CValVectorMgr(void)
|
|
{
|
|
}
|
|
//添加一个变量
|
|
void CValVectorMgr::AddDoubleVal(double *pVal)
|
|
{
|
|
if(pVal == NULL)
|
|
return;
|
|
CDoubleVal DoubleVal;
|
|
DoubleVal.m_pVal = pVal;
|
|
DoubleVal.m_OldVal = *pVal;
|
|
m_DoubleValVec.push_back(DoubleVal);
|
|
}
|
|
//是否有值发生变化
|
|
bool CValVectorMgr::HasValChange()
|
|
{
|
|
bool Ret = false;
|
|
int size = m_DoubleValVec.size();
|
|
for(int k=0;k<size;k++)
|
|
{
|
|
CDoubleVal &DoubleVal = m_DoubleValVec[k];
|
|
if(!IsTwoDbEqual(*(DoubleVal.m_pVal),DoubleVal.m_OldVal))
|
|
{
|
|
Ret = true;
|
|
DoubleVal.m_OldVal = *(DoubleVal.m_pVal);
|
|
}
|
|
}
|
|
return Ret;
|
|
}
|