本文整理汇总了C++中Identifier::GetParameterValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::GetParameterValue方法的具体用法?C++ Identifier::GetParameterValue怎么用?C++ Identifier::GetParameterValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Identifier
的用法示例。
在下文中一共展示了Identifier::GetParameterValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Run
//.........这里部分代码省略.........
// run agent till output
noDecisions = 0;
numberCommands=0;
while (! (noDecisions) ) { // main decisional loop
//
// INPUT LINK Update
//
UpdateInputLink();
//pAgent->RunSelf(1);
pAgent->RunSelfTilOutput();
numberCommands = pAgent->GetNumberCommands() ;
#ifdef PAUSED
// keypress
cout << "pause maillocator: after RunSelfTilOutput() ... (press ENTER key)" << endl;
cin.ignore();
#endif
// loop through received commands
for (int cmd = 0 ; cmd < numberCommands ; cmd++) {
Identifier* pCommand = pAgent->GetCommand(cmd) ;
string name = pCommand->GetCommandName() ;
if (name == "assign-free") {
std::string sUid = pCommand->GetParameterValue("uid");
std::string sDeassign = pCommand->GetParameterValue("deassign");
std::string sAssign = pCommand->GetParameterValue("assign");
#ifdef SHOW_SOAR
cout << "assign-free command received [ u:"
<< sUid << " , -"
<< sDeassign << " , +"
<< sAssign << " ]"
<< endl;
#endif
AssignFree(sUid,sDeassign,sAssign);
pCommand->AddStatusComplete();
} else if (name == "swap-carriers") {
std::string sU1 = pCommand->GetParameterValue("u1");
std::string sC1 = pCommand->GetParameterValue("c1");
std::string sU2 = pCommand->GetParameterValue("u2");
std::string sC2 = pCommand->GetParameterValue("c2");
#ifdef SHOW_SOAR
cout << "swap-carriers command received [ u1:"
<< sU1 << " , c1:"
<< sC1 << " , u2:"
<< sU2 << " , c2:"
<< sC2 << " ]" << endl;
#endif
SwapCarriers(sU1,sC1,sU2,sC2);
pCommand->AddStatusComplete();
} else if (name == "increase-power") {
std::string sUid = pCommand->GetParameterValue("uid");
std::string sCid = pCommand->GetParameterValue("cid");