• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetIntValue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetIntValue函数的典型用法代码示例。如果您正苦于以下问题:C++ GetIntValue函数的具体用法?C++ GetIntValue怎么用?C++ GetIntValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetIntValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: while

            void Configuration::FillFromConfigAttributes(const char * attributes)
            {
                // Initializing map.
                arguments.clear();

                size_t len = 0;

                // Getting list length. List is terminated by two '\0'.
                while (attributes[len] || attributes[len + 1])
                    ++len;

                ++len;

                ParseAttributeList(attributes, len, '\0', arguments);

                ArgumentMap::const_iterator it = arguments.find(Key::address);
                if (it != arguments.end())
                {
                    // Parsing address.
                    ParseAddress(it->second, endPoint);
                }
                else
                {
                    endPoint.host = GetStringValue(Key::server, DefaultValue::server);
                    endPoint.port = static_cast<uint16_t>(GetIntValue(Key::port, DefaultValue::port));
                }
            }
开发者ID:TimmyTian,项目名称:ignite,代码行数:27,代码来源:configuration.cpp


示例2: switch

bool Var::Equals(Var* rvalue) {
	switch(type) {
		case vtInt: {
			return GetIntValue() == rvalue->GetIntValue();
		}
		case vtFloat: {
			return GetFloatValue() == rvalue->GetFloatValue();
		}
		case vtString: {
			char* lvaluetext = GetStringValue();
			char* rvaluetext = rvalue->GetStringValue();
			bool result = !strcmp(lvaluetext,rvaluetext);
			delete[] lvaluetext;
			delete[] rvaluetext;
			return result;
		}
		case vtFloat3: {
			return float3value == rvalue->float3value;
		}
		case vtObject: {
			return objectvalue == rvalue->objectvalue; // compare pointers...
		}
		default: {
			return false;
		}
	}
}
开发者ID:JohanMes,项目名称:JohanEngine,代码行数:27,代码来源:Variable.cpp


示例3: GetPrivateProfileString

bool  CIniFileProcessor::GetIRSFacilityID(short& iVal) // unique function to retrieve the id from a unique ini file only for use with IRS
{
	CString irsinipath;
	TCHAR foo[64];
	CIniFileProcessor::GetULFullPath(eIRININAME, irsinipath);

	// Get value from the real ini file source
	// We do it this way (always reloading the file content) as it may change externally, and it resides in a different file from the FDMS.ini anyway
	DWORD dw = 
		GetPrivateProfileString(
		m_Entry[eFACILITYID].section,
		m_Entry[eFACILITYID].name,
		m_Entry[eFACILITYID].defIniValue,
		foo,sizeof(foo),irsinipath);

	if (dw == 0)
	{
		return false;
	}

	if (m_Entry[eFACILITYID].iniValue != NULL)
	{
		delete [] m_Entry[eFACILITYID].iniValue;
	}

	m_Entry[eFACILITYID].iniValue = new TCHAR[strlen(foo)+1];
	foo[strlen(foo)] = 0;  // redundant
	strcpy(m_Entry[eFACILITYID].iniValue, foo);

	iVal = (short)GetIntValue(eFACILITYID);

	return true;
}
开发者ID:hnordquist,项目名称:FDMS,代码行数:33,代码来源:IniFileProcessor.cpp


示例4: strlen

//读取第nParamIndex个参数,该参数为整型
int CScript::GetIntParam(char* strCmd, int nParamIndex)
{
	int nCmdLen = strlen(strCmd);
	int nStartOfParam = __PassCmdName(strCmd, nCmdLen);

	if(nStartOfParam == nCmdLen)
		return DEMO::ERROR_INT_PARAM;

	int nParamNum = 0;
	m_bScanningStr = false;

	for(int j=nStartOfParam+1; j<nCmdLen; j++)
	{
		if(strCmd[j] == '\"')
			m_bScanningStr = !m_bScanningStr;
		//跳过分隔符
		if(__IsDelimiter(strCmd[j]))
			nParamNum++;
		//读取到数字参数,读取并转换为数字
		if(nParamNum == nParamIndex && 
			(strCmd[j] == '-' || (strCmd[j] >= '0' && strCmd[j] <= '9')))
		{
			return GetIntValue(strCmd, nCmdLen, j);
		}
	}
	return DEMO::ERROR_INT_PARAM;
}
开发者ID:xiaohuajiao,项目名称:Demo,代码行数:28,代码来源:CScript.cpp


示例5: BeforeWorkPro

LRESULT CMainFrame::OnRuning(WPARAM wParam, LPARAM lParam)
{
#ifndef _DEBUG
	BeforeWorkPro();
	BeforeWork();
#endif

	if (GetIntValue(PK_PortCtrlMode) != PCM_USE_WEEK)
	{
		Sleep(500);//延时用于打开吸泵	
	}

	vector<TRACK> _vecTrack;
	//1.获取加工数据
	if(GetData(_vecTrack) == false)
	{
		OnCloseLoop(NULL, NULL);
		Home();
		return 0;
	}

	//2. 把数据丢进控制卡模块驱动硬件
	Run(_vecTrack);
	return 0;
}
开发者ID:dusong7,项目名称:NULL,代码行数:25,代码来源:MainFrm.cpp


示例6: ParseAttributeList

            void Configuration::FillFromConnectString(const char* str, size_t len)
            {
                // Initializing map.
                arguments.clear();

                // Initializing DSN to empty string.
                arguments[Key::dsn].clear();

                // Ignoring terminating zero byte if present.
                // Some Driver Managers pass zero-terminated connection string
                // while others don't.
                if (len && !str[len - 1])
                    --len;

                ParseAttributeList(str, len, ';', arguments);

                ArgumentMap::const_iterator it = arguments.find(Key::address);
                if (it != arguments.end())
                {
                    // Parsing address.
                    ParseAddress(it->second, endPoint);
                }
                else
                {
                    endPoint.host = GetStringValue(Key::server, DefaultValue::server);
                    endPoint.port = static_cast<uint16_t>(GetIntValue(Key::port, DefaultValue::port));
                }
            }
开发者ID:TimmyTian,项目名称:ignite,代码行数:28,代码来源:configuration.cpp


示例7: OnPushScore

// 上分
void OnPushScore(char Id) {
	struct stUserInfo *pUser = GetUserInfo(Id);
	int Total = GetIntValue(UD_TOTALSCORE+Id);
	
	// 没开锁
	if (!(ConstDownKey[Id] & KEY_LOCK)) {
		return;
	}
	
	Total += GetIntValue(UD_PUSHSCORE_RATIO);
	// 总分
	SetIntValue(UD_TOTALSCORE+Id, Total);
	
	// 上分
	SetIntValue(UD_PUSHSCORE+Id, GetIntValue(UD_PUSHSCORE+Id)+GetIntValue(UD_PUSHSCORE_RATIO));
}
开发者ID:wealthlwg,项目名称:multi-com-main-card-prj,代码行数:17,代码来源:BetPadKey.c


示例8: return

float CGUISliderControl::GetProportion(RangeSelector selector /* = RangeSelectorLower */) const
{
  if (m_iType == SPIN_CONTROL_TYPE_FLOAT)
    return (GetFloatValue(selector) - m_fStart) / (m_fEnd - m_fStart);
  else if (m_iType == SPIN_CONTROL_TYPE_INT)
    return (float)(GetIntValue(selector) - m_iStart) / (float)(m_iEnd - m_iStart);
  return 0.01f * GetPercentage(selector);
}
开发者ID:vanMiez,项目名称:xbmc,代码行数:8,代码来源:GUISliderControl.cpp


示例9: GetIntValueOrDefault

/* 获取section段第一个键为key的int值,成功返回获取的值,否则返回默认值 */
void IniFile::GetIntValueOrDefault(const string &section, const string &key, int *value, int defaultValue)
{
    if (GetIntValue(section, key, value) != 0) {
        *value = defaultValue;
    }

    return;
}
开发者ID:DoubleKing,项目名称:spell_correct,代码行数:9,代码来源:inifile.cpp


示例10: OnPollScore

// 下分
void OnPollScore(char Id) {
	struct stUserInfo *pUser = GetUserInfo(Id);
	int LocalTotal = GetIntValue(UD_TOTALSCORE+Id);
	int Total = LocalTotal - pUser->TotalBetScore;
	// 正在退币,不能下分
	if (IsPollingCoin(Id)) {
		return;
	}

	// 没开锁
	if (!(ConstDownKey[Id] & KEY_LOCK)) {
		return;
	}
	
	// 减总分
	if (Total > GetIntValue(UD_POLLSCORE_RATIO)) {
		Total -= GetIntValue(UD_POLLSCORE_RATIO);
		LocalTotal -= GetIntValue(UD_POLLSCORE_RATIO);
		SetIntValue(UD_TOTALSCORE+Id, LocalTotal);														// 保存总分
		SetIntValue(UD_POLLSCORE+Id, GetIntValue(UD_POLLSCORE+Id)+GetIntValue(UD_POLLSCORE_RATIO));		// 保存下分
	} else {
		LocalTotal -= Total;
		SetIntValue(UD_TOTALSCORE+Id, LocalTotal);								// 保存总分
		SetIntValue(UD_POLLSCORE+Id, GetIntValue(UD_POLLSCORE+Id)+Total);		// 保存下分
	}
}
开发者ID:wealthlwg,项目名称:multi-com-main-card-prj,代码行数:27,代码来源:BetPadKey.c


示例11: ParamMLoadFile

void CDialogCCD::OnBnClickedReload()
{
	//参数初始化
	ParamMLoadFile();
	MCardParamLoad();
	ImageCalcParamLoad();

	g_nWorkMode = GetIntValue(PK_WorkMode);
}
开发者ID:dusong7,项目名称:NULL,代码行数:9,代码来源:DialogCCD.cpp


示例12: SetThro

void SetThro()
{
	//char type = GetUartChar();
	uint8_t value;
	//if(type=='t') 
		{
			value = GetIntValue();
			Thro = value;
	}
}
开发者ID:yanyu130,项目名称:JRW_4,代码行数:10,代码来源:Control.c


示例13: InitUserData

void InitUserData(void) 
{
	char Idx;
	for (Idx = 0; Idx < PLAYER_COUNT; Idx++) {
		ALLBITS |= (1<<Idx);
	}

	if (READINTVALUE(UD_FIRSTRUN_FLAG) == FIRSTRUN_FLAG) {
		ReadUserData();
		if (GetCharValue(UD_START_SAVE)) {
			RecoverPlayerData();
		}
		if (GetCharValue(UD_UNSAVE_SCORE)) {
			SaveBetWinScore();
		}
	} else {
		ClearUserData();
		SetIntValue(UD_FIRSTRUN_FLAG, FIRSTRUN_FLAG);
	}
#ifdef _NO_PRINT
	SetCharValue(UD_IF_PRINT, 0);
#endif

#ifdef _TEST_
#define Debug lite_printf
	//ClearUserData();
	//SetIntValue(UD_FIRSTRUN_FLAG, FIRSTRUN_FLAG);-
	SetCharValue(UD_IF_PRINT, 0);
	//SetCharValue(UD_BETTIME, 5);
	//SetCharValue(UD_EXTRA_CODE_DIFFICULT, 1);	// 外5门设定难度
	//SetIntValue(UD_ROUNDLOSS_BOOM, 1000000);		// 当轮输爆机
	//SetIntValue(UD_STAGEWIN_BOOM, 20000000);		// 当期max loss
	//SetIntValue(UD_STAGELOSS_BOOM, 300000000);		// 当期max win
//	for (Idx = 0; Idx < UD_MAXCHAR_STATE; Idx++) {
//		Debug("%p = %d/%d\n", UserDataCharArray + Idx, READCHARVALUE(Idx), UserDataCharArray[Idx]);
//	}
//	for (Idx = 0; Idx < UD_MAXSHORT_STATE; Idx++) {
//		Debug("%p = %d/%d\n", UserDataShortArray + Idx, READSHORTVALUE(Idx), UserDataShortArray[Idx]);
//	}
	for (Idx = 0; Idx < UD_MAXINT_STATE; Idx++) {
		Debug("%p = %d/%d\n", UserDataIntArray + Idx, READINTVALUE(Idx), UserDataIntArray[Idx]);
	}
//	for (Idx = 0; Idx < UD_MAXLONGLONG_STATE; Idx++) {
//		Debug("%p = %d/", UserDataLongLongArray + Idx, READLONGLONGVALUE(Idx));
//		Debug("%d\n", UserDataLongLongArray[Idx]);
//	}
Debug("UUID:\n");
	for (Idx = 0; Idx < USB_PLAYER_COUNT; Idx++) {
		Debug("%p:%d/%d\n", UserDataIntArray+UD_INVALID_INT+Idx, GetIntValue(UD_USB_UUID+Idx), READINTVALUE(UD_USB_UUID+Idx));
	}
	
	SetIntValue(UD_USB_UUID + 5, 123456);
	SetIntValue(UD_USB_UUID + 6, 876543210);
#endif
}
开发者ID:wealthlwg,项目名称:multi-com-main-card-prj,代码行数:55,代码来源:UserData.c


示例14: ParamMLoadFile

CMainFrame::CMainFrame()
{
	//参数初始化
	ParamMLoadFile();
	MCardParamLoad();
	ImageCalcParamLoad();
	m_bIsLoopWork = FALSE;
	m_nLineCount = 0;
	m_timeTotal = CTimeSpan(0);
	g_nWorkMode = GetIntValue(PK_WorkMode);
}
开发者ID:dusong7,项目名称:NULL,代码行数:11,代码来源:MainFrm.cpp


示例15: controlExpression

static bool controlExpression(char relOp, expADT expL, expADT expR, environmentADT env){

	valueADT leftV, rightV;

	leftV = Eval(expL, env);
	rightV = Eval(expR, env);

	if(ValueType(leftV) == IntValue && ValueType(rightV) == IntValue ){

		switch(relOp){

		case '<':
		return (GetIntValue(leftV) < GetIntValue(rightV));

		case '>':
			return (GetIntValue(leftV) > GetIntValue(rightV));

		case '=':
			return (GetIntValue(leftV) == GetIntValue(rightV));

		default:
			Error("Reloperator %c is not valid.\n", relOp);
			break;
		}
	}
	else
		Error("\nCompared expressions is not Integers\n");

}
开发者ID:tobiasanhed,项目名称:DoP-labb-3,代码行数:29,代码来源:eval.c


示例16: main

int main(){

	int Num_TestCase=0,total_credit=0,num_item=0,count=0,arr[10000],i=0;

	
	Num_TestCase=GetIntValue();

	//printf("\n%d\n",Num_TestCase);
	
	while(count < Num_TestCase) {

		//printf("\n******* ENTRY %d*********",count+1);
		
		total_credit=GetIntValue();
		num_item=GetIntValue();

		//printf("\n%d",total_credit);
		//printf("\n%d\n",num_item);
		
		i=0;

		while(i<num_item){

			arr[i]=GetIntValue();
			//printf("%d ",arr[i]);
			i++;
		}

		StoreCredit(arr,total_credit,num_item,count);

		//printf("\n******* Completed %d*********\n\n",count+1);

		count++;
	}


	//fclose(f1);

	return 0;
}
开发者ID:kitterateplus,项目名称:GCJ-StoreCredit,代码行数:40,代码来源:crediscoresubmit.c


示例17: Process_CoinInfo

// 接收投退币个数
// ***退币流程*** //
// 1.押分板按下退币,发送消息
// 2.主卡从接收到消息开始倒计时5S
// 3.押分板每次退一个币就发送一条消息到主卡
// 4.主卡每接收到退币个数即重新倒计时
// 5.如果在倒计时内不接收到来自押分板的退币个数消息,即表示退币完毕
// 6.在倒计时内不可押分
void Process_CoinInfo(unsigned char Id, unsigned char *Data) {
	short PushCoinCount,PollCoinCount;
	int TotalScore = GetIntValue(UD_TOTALSCORE + Id);
	int PushScore, PollScore;
	
	PushCoinCount = GET_U16(Data);	Data += 2;	// 投币个数
	PollCoinCount = GET_U16(Data);	Data += 2;	// 退币个数
	PushScore = PushCoinCount*GetIntValue(UD_PUSHCOIN_RATIO);
	PollScore = PollCoinCount*GetIntValue(UD_POLLCOIN_RATIO);
	// 处理投币
	if (PushScore > 0) {
		SetIntValue(UD_PUSHSCORE + Id, GetIntValue(UD_PUSHSCORE + Id) + PushScore);
		SetIntValue(UD_TOTALSCORE + Id, TotalScore+PushScore);
	}

	// 处理退币
	if (PollScore > 0) {
		if (TotalScore >= PollScore) {
			SetIntValue(UD_POLLSCORE + Id, GetIntValue(UD_POLLSCORE + Id) + PollScore);
			SetIntValue(UD_TOTALSCORE + Id, TotalScore - PollScore);
		}

		// 重新设置退币倒计时
		UpdatePollingCoinTime(Id, 5);
	}
	
	// 更新总分
	if (TotalScore != GetIntValue(UD_TOTALSCORE + Id)) {
		Set_Score(Id);
	}
}
开发者ID:wealthlwg,项目名称:multi-com-main-card-prj,代码行数:39,代码来源:BetPadKey.c


示例18: NS_ENSURE_ARG_POINTER

NS_IMETHODIMP
nsPop3IncomingServer::GetOfflineSupportLevel(int32_t *aSupportLevel)
{
  NS_ENSURE_ARG_POINTER(aSupportLevel);

  nsresult rv;
  rv = GetIntValue("offline_support_level", aSupportLevel);
  if (*aSupportLevel != OFFLINE_SUPPORT_LEVEL_UNDEFINED) return rv;

  // set default value
  *aSupportLevel = OFFLINE_SUPPORT_LEVEL_NONE;
  return NS_OK;
}
开发者ID:SphereWeb,项目名称:releases-comm-central,代码行数:13,代码来源:nsPop3IncomingServer.cpp


示例19: EvalCompound

static int EvalCompound(expADT exp, environmentADT env){
    char op;
    int lhs, rhs;
	valueADT lValue, rValue;

    op = ExpOperator(exp);

	lValue = Eval(ExpLHS(exp), NewClosure(env));
    rValue = Eval(ExpRHS(exp), NewClosure(env));
	
	lhs = GetIntValue(lValue);
	rhs = GetIntValue(rValue);
		


    switch (op) {
      case '+': return (lhs + rhs);
      case '-': return (lhs - rhs);
      case '*': return (lhs * rhs);
	  case '/': if (rhs == 0) Error("Division by zero\n"); else return (lhs / rhs);
      default:  Error("Illegal operator");
    }
}
开发者ID:tobiasanhed,项目名称:DoP-labb-3,代码行数:23,代码来源:eval.c


示例20: SaveBetWinScore

// 重新计算上局押分
void SaveBetWinScore(void) {
	char ID;
	for (ID = 0; ID < PLAYER_COUNT; ID++) {
		if (GetIntValue(UD_TOTALSCORE+ID) >= GetIntValue(UD_LAST_TOTAL_BET+ID) && GetIntValue(UD_LAST_WON_SCORE+ID) >= 0) {
			SetIntValue(UD_TOTALSCORE+ID, GetIntValue(UD_TOTALSCORE+ID)+GetIntValue(UD_LAST_WON_SCORE+ID)-GetIntValue(UD_LAST_TOTAL_BET+ID));
		}
		// 如果某个玩家的分数为负,则清0
		if (GetIntValue(UD_TOTALSCORE+ID) < 0) {
			SetIntValue(UD_TOTALSCORE+ID, GetIntValue(UD_PLAYER_PROFIT+ID) + GetIntValue(UD_POLLSCORE+ID) - GetIntValue(UD_PUSHSCORE+ID));
			if (GetIntValue(UD_TOTALSCORE+ID) < 0) {
				SetIntValue(UD_TOTALSCORE+ID, 0);
			}
		}
		SetIntValue(UD_LAST_WON_SCORE+ID, 0);
		SetIntValue(UD_LAST_TOTAL_BET+ID, 0);
	}

	// 复位标志
	SetCharValue(UD_UNSAVE_SCORE, 0);	
}
开发者ID:wealthlwg,项目名称:multi-com-main-card-prj,代码行数:21,代码来源:UserData.c



注:本文中的GetIntValue函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetInterface函数代码示例发布时间:2022-05-30
下一篇:
C++ GetIntParam函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap