本文整理汇总了C++中Kiss::getChildItr方法的典型用法代码示例。如果您正苦于以下问题:C++ Kiss::getChildItr方法的具体用法?C++ Kiss::getChildItr怎么用?C++ Kiss::getChildItr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kiss
的用法示例。
在下文中一共展示了Kiss::getChildItr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool _Automaton::init(void* pKiss)
{
CHECK_F(!this->_ThreadBase::init(pKiss));
Kiss* pK = (Kiss*)pKiss;
pK->m_pInst = this;
//create state instances
Kiss** pItr = pK->getChildItr();
int i = 0;
while (pItr[i])
{
Kiss* pState = pItr[i++];
CHECK_F(m_nState >= N_STATE);
F_ERROR_F(pState->v("state", &m_pStateName[m_nState]));
m_nState++;
}
string startState = "";
F_ERROR_F(pK->v("startState", &startState));
m_iState = getStateIdx(&startState);
CHECK_F(m_iState<0);
return true;
}
示例2: init
bool _AutoPilot::init(void* pKiss)
{
CHECK_F(!this->_ThreadBase::init(pKiss));
Kiss* pK = (Kiss*)pKiss;
pK->m_pInst = this;
//create action instance
Kiss* pCC = pK->o("action");
CHECK_T(pCC->empty());
Kiss** pItr = pCC->getChildItr();
int i = 0;
while (pItr[i])
{
Kiss* pAction = pItr[i];
i++;
bool bInst = false;
F_INFO(pAction->v("bInst", &bInst));
if (!bInst)continue;
if (m_nAction >= N_ACTION)LOG(FATAL);
ActionBase** pA = &m_pAction[m_nAction];
m_nAction++;
//Add action modules below
ADD_ACTION(RC_visualFollow);
ADD_ACTION(APMcopter_landing);
ADD_ACTION(APMcopter_guided);
ADD_ACTION(HM_base);
ADD_ACTION(HM_follow);
ADD_ACTION(APMrover_base);
ADD_ACTION(APMrover_follow);
//Add action modules above
LOG_E("Unknown action class: "+pAction->m_class);
}
return true;
}