本文整理汇总了C++中TypeNode::getOperator方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeNode::getOperator方法的具体用法?C++ TypeNode::getOperator怎么用?C++ TypeNode::getOperator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeNode
的用法示例。
在下文中一共展示了TypeNode::getOperator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exportTypeInternal
TypeNode exportTypeInternal(TypeNode n, NodeManager* from, NodeManager* to, ExprManagerMapCollection& vmap) {
Debug("export") << "type: " << n << " " << n.getId() << std::endl;
if(theory::kindToTheoryId(n.getKind()) == theory::THEORY_DATATYPES) {
throw ExportUnsupportedException
("export of types belonging to theory of DATATYPES kinds unsupported");
}
if(n.getMetaKind() == kind::metakind::PARAMETERIZED &&
n.getKind() != kind::SORT_TYPE) {
throw ExportUnsupportedException
("export of PARAMETERIZED-kinded types (other than SORT_KIND) not supported");
}
if(n.getKind() == kind::TYPE_CONSTANT) {
return to->mkTypeConst(n.getConst<TypeConstant>());
} else if(n.getKind() == kind::BITVECTOR_TYPE) {
return to->mkBitVectorType(n.getConst<BitVectorSize>());
} else if(n.getKind() == kind::SUBRANGE_TYPE) {
return to->mkSubrangeType(n.getSubrangeBounds());
}
Type from_t = from->toType(n);
Type& to_t = vmap.d_typeMap[from_t];
if(! to_t.isNull()) {
Debug("export") << "+ mapped `" << from_t << "' to `" << to_t << "'" << std::endl;
return *Type::getTypeNode(to_t);
}
NodeBuilder<> children(to, n.getKind());
if(n.getKind() == kind::SORT_TYPE) {
Debug("export") << "type: operator: " << n.getOperator() << std::endl;
// make a new sort tag in target node manager
Node sortTag = NodeBuilder<0>(to, kind::SORT_TAG);
children << sortTag;
}
for(TypeNode::iterator i = n.begin(), i_end = n.end(); i != i_end; ++i) {
Debug("export") << "type: child: " << *i << std::endl;
children << exportTypeInternal(*i, from, to, vmap);
}
TypeNode out = children.constructTypeNode();// FIXME thread safety
to_t = to->toType(out);
return out;
}/* exportTypeInternal() */