本文整理汇总了C++中Branch::getFromEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ Branch::getFromEnd方法的具体用法?C++ Branch::getFromEnd怎么用?C++ Branch::getFromEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Branch
的用法示例。
在下文中一共展示了Branch::getFromEnd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch_getOutputCount
int switch_getOutputCount(Term* term)
{
Branch* contents = nested_contents(term);
// check if term is still being initialized:
if (contents->length() == 0)
return 1;
Branch* outerRebinds = contents->getFromEnd(0)->contents();
return outerRebinds->length() + 1;
}
示例2: switch_getOutputName
const char* switch_getOutputName(Term* term, int outputIndex)
{
Branch* contents = nested_contents(term);
// check if term is still being initialized:
if (contents->length() == 0)
return "";
Branch* outerRebinds = contents->getFromEnd(0)->contents();
return outerRebinds->get(outputIndex - 1)->name.c_str();
}
示例3: switch_getOutputType
Type* switch_getOutputType(Term* term, int outputIndex)
{
if (outputIndex == 0)
return &VOID_T;
Branch* contents = nested_contents(term);
// check if term is still being initialized:
if (contents->length() == 0)
return &ANY_T;
Branch* outerRebinds = contents->getFromEnd(0)->contents();
return outerRebinds->get(outputIndex - 1)->type;
}
示例4: get_for_loop_outer_rebinds
Branch* get_for_loop_outer_rebinds(Term* forTerm)
{
Branch* contents = nested_contents(forTerm);
return contents->getFromEnd(0)->contents();
}