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.
47 lines
807 B
C++
47 lines
807 B
C++
#include "StdAfx.h"
|
|
#include "ValStrBase.h"
|
|
|
|
|
|
CValStrBase::CValStrBase(void)
|
|
{
|
|
m_str = "TEXT";
|
|
m_ValStrType = _STR_ERROR;
|
|
}
|
|
CValStrBase::~CValStrBase(void)
|
|
{
|
|
}
|
|
CString CValStrBase::GetValStr()
|
|
{
|
|
CString str = GetStr();
|
|
return str;
|
|
}
|
|
//只有一位的左边补0
|
|
void CValStrBase::AddLeftZreo(CString &str)
|
|
{
|
|
if(str.GetLength()==1)
|
|
{
|
|
str = "0"+str;
|
|
}
|
|
}
|
|
CString CValStrBase::GetValTypeStr()
|
|
{
|
|
CString str;
|
|
switch(m_ValStrType)
|
|
{
|
|
case _STR_FIXED:
|
|
str = "固定文本";
|
|
break;
|
|
case _STR_SN:
|
|
str = "序列号";
|
|
break;
|
|
case _STR_DATE:
|
|
str = "日期";
|
|
break;
|
|
case _STR_TIME:
|
|
str = "时间";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return str;
|
|
} |