本文整理汇总了C++中AbstractQoreNode::deref方法的典型用法代码示例。如果您正苦于以下问题:C++ AbstractQoreNode::deref方法的具体用法?C++ AbstractQoreNode::deref怎么用?C++ AbstractQoreNode::deref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractQoreNode
的用法示例。
在下文中一共展示了AbstractQoreNode::deref方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execImpl
int SwitchStatement::execImpl(QoreValue& return_value, ExceptionSink *xsink) {
int rc = 0;
// instantiate local variables
LVListInstantiator lvi(lvars, xsink);
AbstractQoreNode *se = sexp->eval(xsink);
if (!xsink->isEvent()) {
// find match
CaseNode *w = head;
while (w) {
if (w->matches(se, xsink))
break;
w = w->next;
}
if (!w && deflt)
w = deflt;
while (w && !rc && !xsink->isEvent()) {
if (w->code)
rc = w->code->execImpl(return_value, xsink);
w = w->next;
}
if (rc == RC_BREAK || rc == RC_CONTINUE)
rc = 0;
}
if (se)
se->deref(xsink);
return rc;
}
示例2: cmp
TEST()
{
printf("testing OP_LOG_GT 8\n");
// both floats
AbstractQoreNode* n = new AbstractQoreNode(1.0);
CaseNodeWithOperator cmp(n, 0, OP_LOG_GT);
AbstractQoreNode* lhs = new AbstractQoreNode(2.0);
ExceptionSink xsink;
bool b = cmp.matches(lhs, &xsink);
assert(b);
lhs->deref(&xsink);
assert(!xsink);
}
示例3: append_buffers_to_list
int command::append_buffers_to_list(row_result_t &column_info, row_output_buffers& all_buffers, QoreHashNode *h, ExceptionSink *xsink) {
HashIterator hi(h);
for (unsigned i = 0, n = column_info.size(); i != n; ++i) {
hi.next();
const output_value_buffer& buff = *all_buffers[i];
AbstractQoreNode* value = get_node(column_info[i], buff, xsink);
if (xsink->isException()) {
if (value) value->deref(xsink);
return -1;
}
QoreListNode *l = reinterpret_cast<QoreListNode *>(hi.getValue());
l->push(value);
} // for
return 0;
}