本文整理汇总了C++中AbstractQoreNode::refSelf方法的典型用法代码示例。如果您正苦于以下问题:C++ AbstractQoreNode::refSelf方法的具体用法?C++ AbstractQoreNode::refSelf怎么用?C++ AbstractQoreNode::refSelf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractQoreNode
的用法示例。
在下文中一共展示了AbstractQoreNode::refSelf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newProgram
void qore_program_private_base::newProgram() {
base_object = true;
po_locked = false;
exec_class = false;
// init thread local storage key
thread_local_storage = new qpgm_thread_local_storage_t;
// save thread local storage hash
assert(!thread_local_storage->get());
thread_local_storage->set(new QoreHashNode);
//printd(5, "qore_program_private_base::newProgram() this: %p\n", this);
// copy global feature list to local list
for (FeatureList::iterator i = qoreFeatureList.begin(), e = qoreFeatureList.end(); i != e; ++i)
featureList.push_back((*i).c_str());
// setup namespaces
RootNS = qore_root_ns_private::copy(*staticSystemNamespace, pwo.parse_options);
QoreNS = RootNS->rootGetQoreNamespace();
assert(QoreNS);
// setup initial defines
// add platform defines
dmap["QoreVersionString"] = new QoreStringNode(qore_version_string);
dmap["QoreVersionMajor"] = new QoreBigIntNode(qore_version_major);
dmap["QoreVersionMinor"] = new QoreBigIntNode(qore_version_minor);
dmap["QoreVersionSub"] = new QoreBigIntNode(qore_version_sub);
dmap["QoreVersionBuild"] = new QoreBigIntNode(qore_build_number);
dmap["QoreVersionBits"] = new QoreBigIntNode(qore_target_bits);
dmap["QorePlatformCPU"] = new QoreStringNode(TARGET_ARCH);
dmap["QorePlatformOS"] = new QoreStringNode(TARGET_OS);
#ifdef _Q_WINDOWS
dmap["Windows"] = &True;
#else
dmap["Unix"] = &True;
#endif
if (pwo.parse_options & PO_IN_MODULE)
dmap["QoreHasUserModuleLicense"] = &True;
QoreNamespace* ns = QoreNS->findLocalNamespace("Option");
assert(ns);
ConstantListIterator cli(qore_ns_private::getConstantList(ns));
while (cli.next()) {
AbstractQoreNode* v = cli.getValue();
assert(v);
// skip boolean options defined as False
if (v->getType() == NT_BOOLEAN && !reinterpret_cast<QoreBoolNode*>(v)->getValue())
continue;
dmap[cli.getName()] = v->refSelf();
}
#ifdef DEBUG
// if Qore library debugging is enabled, then set an option
dmap["QoreDebug"] = &True;
#endif
}