本文整理汇总了C++中SNode::existChild方法的典型用法代码示例。如果您正苦于以下问题:C++ SNode::existChild方法的具体用法?C++ SNode::existChild怎么用?C++ SNode::existChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SNode
的用法示例。
在下文中一共展示了SNode::existChild方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyMessage
void DerivationWriter :: copyMessage(SNode node, bool operationMode)
{
SNode current = node.firstChild();
while (current != lxNone) {
Symbol symbol = (Symbol)current.type;
switch (symbol) {
case nsSubjectArg:
_writer.newNode(lxMessage);
unpackChildren(current);
_writer.closeNode();
break;
case nsMessageParameter:
case nsObject:
case nsExpression:
_writer.newBookmark();
unpackChildren(current, 1);
_writer.removeBookmark();
break;
case nsElseOperation:
_writer.newNode(lxExpression);
unpackChildren(current);
_writer.closeNode();
break;
case nsSubCode:
unpackNode(current, 1);
break;
case nsL0Operation:
case nsL3Operation:
case nsL4Operation:
case nsL5Operation:
case nsL6Operation:
case nsL7Operation:
case nsNewOperator:
case nsMessageOperation:
copyMessage(current, (symbol != nsMessageOperation));
_writer.insert(lxExpression);
_writer.closeNode();
break;
case tsIdentifier:
case tsPrivate:
case tsReference:
if (!operationMode) {
_writer.newNode(lxMessage);
unpackNode(current, 0);
_writer.closeNode();
break;
}
default:
if (operationMode && current.existChild(lxTerminal)) {
if ((Symbol)node.type == nsNewOperator) {
//HOTFIX : mark new operator
_writer.appendNode(lxOperator, -1);
if (symbol == tsInteger || symbol == tsIdentifier) {
unpackNode(current, 0);
}
}
else {
_writer.newNode(lxOperator);
copyChildren(current);
_writer.closeNode();
}
_writer.newBookmark();
}
break;
}
current = current.nextNode();
}
if (operationMode) {
_writer.removeBookmark();
}
}