本文整理汇总了C++中ExecutionContext::setPrimitiveTree方法的典型用法代码示例。如果您正苦于以下问题:C++ ExecutionContext::setPrimitiveTree方法的具体用法?C++ ExecutionContext::setPrimitiveTree怎么用?C++ ExecutionContext::setPrimitiveTree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExecutionContext
的用法示例。
在下文中一共展示了ExecutionContext::setPrimitiveTree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: interpret
/*!
* \brief Interpret the primitive tree.
* \param ioContext A reference to the execution context.
* \return A handle to the result of the interpretation.
* \throw SCHNAPS::Core::AssertException if the primitive tree is empty.
*/
AnyType::Handle PrimitiveTree::interpret(ExecutionContext& ioContext) const {
schnaps_StackTraceBeginM();
schnaps_AssertM(empty() == false);
ioContext.setPrimitiveTree(this);
return (*this)[0].mPrimitive->execute(0, ioContext);
schnaps_StackTraceEndM("SCHNAPS::Core::Atom::Handle SCHNAPS::Core::PrimitiveTree::interpret(SCHNAPS::Core::ExecutionContext&)");
}
示例2: validate
/*!
* \brief Valiadate the primitive tree.
* \param ioContext A reference to the execution context.
* \throw SCHNAPS::Core::InternalException if the primitive tree is not valid.
*/
void PrimitiveTree::validate(ExecutionContext& ioContext) const {
schnaps_StackTraceBeginM();
ioContext.setPrimitiveTree(this);
if ((*this)[0].mPrimitive->isValid(0, ioContext)) {
return;
} else {
throw schnaps_InternalExceptionM("Primitive tree is not valid!");
}
schnaps_StackTraceEndM("const std::string& SCHNAPS::Core::PrimitiveTree::getReturnType(SCHNAPS::Core::ExecutionContext&) const");
}