本文整理汇总了C++中CAstStatement::toDot方法的典型用法代码示例。如果您正苦于以下问题:C++ CAstStatement::toDot方法的具体用法?C++ CAstStatement::toDot怎么用?C++ CAstStatement::toDot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAstStatement
的用法示例。
在下文中一共展示了CAstStatement::toDot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toDot
void CAstScope::toDot(ostream &out, int indent) const
{
string ind(indent, ' ');
CAstNode::toDot(out, indent);
CAstStatement *s = GetStatementSequence();
if (s != NULL) {
string prev = dotID();
do {
s->toDot(out, indent);
out << ind << prev << " -> " << s->dotID() << " [style=dotted];" << endl;
prev = s->dotID();
s = s->GetNext();
} while (s != NULL);
}
vector<CAstScope*>::const_iterator it = _children.begin();
while (it != _children.end()) {
CAstScope *s = *it++;
s->toDot(out, indent);
out << ind << dotID() << " -> " << s->dotID() << ";" << endl;
}
}