本文整理汇总了C++中cmiutilstring::VecString_t::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ VecString_t::push_back方法的具体用法?C++ VecString_t::push_back怎么用?C++ VecString_t::push_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmiutilstring::VecString_t
的用法示例。
在下文中一共展示了VecString_t::push_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strOption
//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command is executed in this function.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Function succeeded.
// MIstatus::failure - Function failed.
// Throws: None.
//--
bool
CMICmdCmdGdbShow::Execute()
{
CMICMDBASE_GETOPTION(pArgGdbOption, ListOfN, m_constStrArgNamedGdbOption);
const CMICmdArgValListBase::VecArgObjPtr_t &rVecWords(pArgGdbOption->GetExpectedOptions());
// Get the gdb-show option to carry out. This option will be used as an action
// which should be done. Further arguments will be used as parameters for it.
CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecWords.begin();
const CMICmdArgValString *pOption = static_cast<const CMICmdArgValString *>(*it);
const CMIUtilString strOption(pOption->GetValue());
++it;
// Retrieve the parameter(s) for the option
CMIUtilString::VecString_t vecWords;
while (it != rVecWords.end())
{
const CMICmdArgValString *pWord = static_cast<const CMICmdArgValString *>(*it);
vecWords.push_back(pWord->GetValue());
// Next
++it;
}
FnGdbOptionPtr pPrintRequestFn = nullptr;
if (!GetOptionFn(strOption, pPrintRequestFn))
{
// For unimplemented option handlers, fallback to a generic handler
// ToDo: Remove this when ALL options have been implemented
if (!GetOptionFn("fallback", pPrintRequestFn))
{
m_bGdbOptionRecognised = false;
m_strGdbOptionName = "fallback"; // This would be the strOption name
return MIstatus::success;
}
}
m_bGdbOptionFnSuccessful = (this->*(pPrintRequestFn))(vecWords);
if (!m_bGdbOptionFnSuccessful && !m_bGbbOptionFnHasError)
return MIstatus::failure;
return MIstatus::success;
}