本文整理汇总了C++中genactiontablemap::Iter::last方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::last方法的具体用法?C++ Iter::last怎么用?C++ Iter::last使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类genactiontablemap::Iter
的用法示例。
在下文中一共展示了Iter::last方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INT
/* Write out the array of actions. */
std::ostream &JavaTabCodeGen::ACTIONS_ARRAY()
{
ARRAY_ITEM( INT(0), false );
for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) {
/* Write out the length, which will never be the last character. */
ARRAY_ITEM( INT(act->key.length()), false );
for ( GenActionTable::Iter item = act->key; item.lte(); item++ )
ARRAY_ITEM( INT(item->value->actionId), (act.last() && item.last()) );
}
return out;
}
示例2: INT
/* Write out the array of actions. */
std::ostream &JSCodeGen::ACTIONS_ARRAY()
{
START_ARRAY_LINE();
int totalActions = 0;
ARRAY_ITEM( INT(0), ++totalActions, false );
for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) {
/* Write out the length, which will never be the last character. */
ARRAY_ITEM( INT(act->key.length()), ++totalActions, false );
for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) {
ARRAY_ITEM( INT(item->value->actionId), ++totalActions, (act.last() && item.last()) );
}
}
END_ARRAY_LINE();
return out;
}
示例3:
/* Write out the array of actions. */
std::ostream &GoCodeGen::ACTIONS_ARRAY()
{
out << " 0, ";
int totalActions = 1;
for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) {
/* Write out the length, which will never be the last character. */
out << act->key.length() << ", ";
if ( totalActions++ % IALL == 0 )
out << endl << " ";
for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) {
out << item->value->actionId << ", ";
if ( ! (act.last() && item.last()) ) {
if ( totalActions++ % IALL == 0 )
out << endl << " ";
}
}
}
out << endl;
return out;
}
示例4:
/* Write out the array of actions. */
std::ostream &FsmCodeGen::ACTIONS_ARRAY()
{
out << "\t0, ";
int totalActions = 1;
for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) {
/* Write out the length, which will never be the last character. */
out << act->key.length() << ", ";
/* Put in a line break every 8 */
if ( totalActions++ % 8 == 7 )
out << "\n\t";
for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) {
out << item->value->actionId;
if ( ! (act.last() && item.last()) )
out << ", ";
/* Put in a line break every 8 */
if ( totalActions++ % 8 == 7 )
out << "\n\t";
}
}
out << "\n";
return out;
}