2018-06-01 09:36:01 +00:00
|
|
|
|
|
|
|
#include "check.h"
|
|
|
|
|
2018-06-02 09:47:28 +00:00
|
|
|
unordered_map<string, string> parameters; //存放参数的hashmap
|
2018-06-01 09:36:01 +00:00
|
|
|
|
2018-06-01 10:21:26 +00:00
|
|
|
//版本号
|
2018-06-01 09:36:01 +00:00
|
|
|
const string cstrVersion = "0.99";
|
|
|
|
|
|
|
|
string strUserCode;
|
|
|
|
string strUserName;
|
|
|
|
string strUserPassword;
|
|
|
|
|
|
|
|
bool checkVersion()
|
|
|
|
{
|
|
|
|
bool result = false;
|
2018-06-02 09:47:28 +00:00
|
|
|
unordered_map<string,string>::iterator iter = parameters.find( string("版本号") );
|
2018-06-01 09:36:01 +00:00
|
|
|
|
|
|
|
if ( iter != parameters.end() && iter->second == cstrVersion )
|
|
|
|
{
|
|
|
|
result = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
string getUserCode()
|
|
|
|
{
|
|
|
|
return strUserCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
string getUserName()
|
|
|
|
{
|
|
|
|
return strUserName;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setUserCode(const string & cstrUserCode)
|
|
|
|
{
|
|
|
|
strUserCode = cstrUserCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setUserName(const string & cstrUserName)
|
|
|
|
{
|
|
|
|
strUserName = cstrUserName;
|
|
|
|
}
|
|
|
|
|
|
|
|
string getVersion()
|
|
|
|
{
|
|
|
|
return cstrVersion;
|
|
|
|
}
|