这篇教程C++ CB函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CB函数的典型用法代码示例。如果您正苦于以下问题:C++ CB函数的具体用法?C++ CB怎么用?C++ CB使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CB函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CHECK_STATEvoid GdbCoreEngine::setupInferior(){ CHECK_STATE(InferiorSetupRequested); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); postCommand("-file-exec-and-symbols /"" + path + '"', NoFlags, CB(handleFileExecAndSymbols));}
开发者ID:hoangHEDSPI,项目名称:qt-creator,代码行数:9,
示例2: callback_cmd_get_secret_keyops_parse_cb_return_tcallback_cmd_get_secret_key(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo){ ops_parser_content_union_t* content=(ops_parser_content_union_t *)&content_->content; const ops_secret_key_t *secret; ops_parser_content_t pc; OPS_USED(cbinfo); // ops_print_packet(content_); switch(content_->tag) { case OPS_PARSER_CMD_GET_SECRET_KEY: cbinfo->cryptinfo.keydata=ops_keyring_find_key_by_id(cbinfo->cryptinfo.keyring,content->get_secret_key.pk_session_key->key_id); if (!cbinfo->cryptinfo.keydata || !ops_is_key_secret(cbinfo->cryptinfo.keydata)) return 0; /* now get the key from the data */ secret=ops_get_secret_key_from_data(cbinfo->cryptinfo.keydata); int tag_to_use = OPS_PARSER_CMD_GET_SK_PASSPHRASE ; int nbtries = 0 ; while( (!secret) && nbtries++ < 3) { if (!cbinfo->cryptinfo.passphrase) { memset(&pc,'/0',sizeof pc); pc.content.secret_key_passphrase.passphrase=&cbinfo->cryptinfo.passphrase; CB(cbinfo,tag_to_use,&pc); if (!cbinfo->cryptinfo.passphrase) { fprintf(stderr,"can't get passphrase/n"); assert(0); } } /* then it must be encrypted */ secret=ops_decrypt_secret_key_from_data(cbinfo->cryptinfo.keydata,cbinfo->cryptinfo.passphrase); free(cbinfo->cryptinfo.passphrase) ; cbinfo->cryptinfo.passphrase = NULL ; tag_to_use = OPS_PARSER_CMD_GET_SK_PASSPHRASE_PREV_WAS_BAD ; } if(!secret) return 0 ; *content->get_secret_key.secret_key=secret; break; default: // return callback_general(content_,cbinfo); break; } return OPS_RELEASE_MEMORY;}
开发者ID:coyotama,项目名称:retroshare,代码行数:57,
示例3: QTC_ASSERTvoid GdbCoreEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); postCommand("-file-exec-and-symbols /"" + path + '"', CB(handleFileExecAndSymbols));}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:9,
示例4: QTC_ASSERTvoid PlainGdbAdapter::startInferior(){ QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); if (!startParameters().processArgs.isEmpty()) m_engine->postCommand(_("-exec-arguments ") + startParameters().processArgs.join(_(" "))); QFileInfo fi(startParameters().executable); m_engine->postCommand(_("-file-exec-and-symbols /"%1/"").arg(fi.absoluteFilePath()), CB(handleFileExecAndSymbols));}
开发者ID:asokolov,项目名称:ananas-creator,代码行数:10,
示例5: QTC_ASSERTvoid GdbPlainEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); if (!startParameters().processArgs.isEmpty()) { QString args = startParameters().processArgs; postCommand("-exec-arguments " + toLocalEncoding(args)); } postCommand("-file-exec-and-symbols /"" + execFilePath() + '"', CB(handleFileExecAndSymbols));}
开发者ID:Revulet,项目名称:qtcreator,代码行数:10,
示例6: prev_keyint prev_key(ENTRY *pe, IX_DESC *pix){ RECPOS address; pci = pix; retrieve_block(pci->level, CB(pci->level)); prev_entry(CO(pci->level)); if (CO(pci->level) == -1) { address = block_ptr->p0; } else { address = ENT_ADR(block_ptr, CO(pci->level))->idxptr; } if (address != NULLREC) { do { retrieve_block(++(pci->level), address); address = ENT_ADR(block_ptr, last_entry())->idxptr; } while (address != NULLREC); } if (CO(pci->level) == -1) { do { if(pci->level == 0) { first_key(pci); return (EOIX); } --(pci->level); } while (CO(pci->level) == -1); retrieve_block(pci->level, CB(pci->level)); } copy_entry(pe, ENT_ADR(block_ptr, CO(pci->level))); return ( IX_OK );}
开发者ID:edisenwang,项目名称:libmm,代码行数:42,
示例7: QTC_ASSERTvoid GdbPlainEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); setEnvironmentVariables(); if (!runParameters().inferior.commandLineArguments.isEmpty()) { QString args = runParameters().inferior.commandLineArguments; runCommand({"-exec-arguments " + toLocalEncoding(args), NoFlags}); } runCommand({"-file-exec-and-symbols /"" + execFilePath() + '"', NoFlags, CB(handleFileExecAndSymbols)});}
开发者ID:DuinoDu,项目名称:qt-creator,代码行数:11,
示例8: QTC_ASSERTvoid CoreGdbAdapter::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); const QByteArray sysroot = startParameters().sysroot.toLocal8Bit(); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); if (!sysroot.isEmpty()) m_engine->postCommand("set sysroot " + sysroot); m_engine->postCommand("-file-exec-and-symbols /"" + path + '"', CB(handleFileExecAndSymbols));}
开发者ID:anchowee,项目名称:QtCreator,代码行数:12,
示例9: startParametersvoid RemoteGdbServerAdapter::callTargetRemote(){ //m_breakHandler->clearBreakMarkers(); // "target remote" does three things: // (1) connects to the gdb server // (2) starts the remote application // (3) stops the remote application (early, e.g. in the dynamic linker) QString channel = startParameters().remoteChannel; m_engine->postCommand("target remote " + channel.toLatin1(), CB(handleTargetRemote));}
开发者ID:pcacjr,项目名称:qt-creator,代码行数:12,
示例10: flushstatic void flush(dearmour_arg_t *arg,ops_parse_cb_info_t *cbinfo) { ops_parser_content_t content; if(arg->num_unarmoured == 0) return; content.content.unarmoured_text.data=arg->unarmoured; content.content.unarmoured_text.length=arg->num_unarmoured; CB(cbinfo,OPS_PTAG_CT_UNARMOURED_TEXT,&content); arg->num_unarmoured=0; }
开发者ID:G10h4ck,项目名称:RetroShare,代码行数:12,
示例11: retrieve_blockstatic void retrieve_block(int j, RECPOS r){ if (j == 0) { block_ptr = &(pci->root); } else { get_cache(r); } CB(j) = block_ptr->brec;}
开发者ID:edisenwang,项目名称:libmm,代码行数:13,
示例12: CBGUI::Widget* ZScriptMainDialog::createDialog(const GUI::WidgetFactory& f){ GUI::Window* win= f.window("Compile ZScript", f.column(GUI::Contents( sizeText=f.text(""), f.buttonRow(GUI::Contents( f.button("&Edit", CB(onEdit)), f.button("&Compile", CB(onCompile)) )), f.buttonRow(GUI::Contents( f.button("&Import", CB(onImport)), f.button("E&xport", CB(onExport)) )), f.button("C&lose", CB(shutDown)) )) ); setSizeText(); return win;}
开发者ID:gwx,项目名称:ZeldaClassic,代码行数:22,
示例13: next_key/* get next, previous entries */int next_key(ENTRY *pe, IX_DESC *pix){ RECPOS address; if(block_ptr->bend == 0) { return IX_FAIL; } pci = pix; retrieve_block(pci->level, CB(pci->level)); address = ENT_ADR(block_ptr, CO(pci->level))->idxptr; while (address != NULLREC) { retrieve_block(++(pci->level), address); CO(pci->level) = -1; address = block_ptr->p0; } next_entry(CO(pci->level)); if (CO(pci->level) == block_ptr->bend) { do { if(pci->level == 0) { last_key(pci); return (EOIX); } --(pci->level); retrieve_block(pci->level, CB(pci->level)); next_entry(CO(pci->level)); } while (CO(pci->level) == block_ptr->bend); } copy_entry(pe, ENT_ADR(block_ptr, CO(pci->level))); return ( IX_OK );}
开发者ID:edisenwang,项目名称:libmm,代码行数:39,
示例14: DataCopyvoid Fuzzer::ExecuteCallback(const uint8_t *Data, size_t Size) { // We copy the contents of Unit into a separate heap buffer // so that we reliably find buffer overflows in it. std::unique_ptr<uint8_t[]> DataCopy(new uint8_t[Size]); memcpy(DataCopy.get(), Data, Size); AssignTaintLabels(DataCopy.get(), Size); CurrentUnitData = DataCopy.get(); CurrentUnitSize = Size; int Res = CB(DataCopy.get(), Size); (void)Res; assert(Res == 0); CurrentUnitData = nullptr; CurrentUnitSize = 0;}
开发者ID:UBERLLVM,项目名称:llvm,代码行数:14,
示例15: QTC_ASSERTvoid TermGdbAdapter::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); const qint64 attachedPID = m_stubProc.applicationPID();#ifdef Q_OS_WIN const qint64 attachedMainThreadID = m_stubProc.applicationMainThreadID(); showMessage(QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID), LogMisc);#else showMessage(QString::fromLatin1("Attaching to %1").arg(attachedPID), LogMisc);#endif m_engine->notifyInferiorPid(attachedPID); m_engine->postCommand("attach " + QByteArray::number(attachedPID), CB(handleStubAttached));}
开发者ID:gaoxiaojun,项目名称:qtcreator,代码行数:14,
示例16: startParametersvoid GdbRemoteServerEngine::callTargetRemote(){ QByteArray rawChannel = startParameters().remoteChannel.toLatin1(); QByteArray channel = rawChannel; // Don't touch channels with explicitly set protocols. if (!channel.startsWith("tcp:") && !channel.startsWith("udp:") && !channel.startsWith("file:") && channel.contains(':')) { // "Fix" the IPv6 case with host names without '['...']' if (!channel.startsWith('[') && channel.count(':') >= 2) { channel.insert(0, '['); channel.insert(channel.lastIndexOf(':'), ']'); } channel = "tcp:" + channel; } if (m_isQnxGdb) postCommand("target qnx " + channel, CB(handleTargetQnx)); else if (m_isMulti) postCommand("target extended-remote " + m_serverChannel, CB(handleTargetExtendedRemote)); else postCommand("target remote " + channel, CB(handleTargetRemote), 10);}
开发者ID:Revulet,项目名称:qtcreator,代码行数:24,
示例17: QTC_ASSERTvoid RemoteGdbAdapter::startInferior(){ QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); m_engine->postCommand("set architecture " + startParameters().remoteArchitecture.toLatin1()); m_engine->postCommand("set sysroot " + startParameters().sysRoot.toLocal8Bit()); m_engine->postCommand("set solib-search-path " + QFileInfo(startParameters().dumperLibrary).path().toLocal8Bit()); if (!startParameters().processArgs.isEmpty()) { QString args = startParameters().processArgs.join(_(" ")); m_engine->postCommand("-exec-arguments " + args.toLocal8Bit()); } m_engine->postCommand("set target-async on", CB(handleSetTargetAsync)); QString x = startParameters().executable; QFileInfo fi(startParameters().executable); QString fileName = fi.absoluteFilePath(); m_engine->postCommand("-file-exec-and-symbols /"" + fileName.toLocal8Bit() + '"', CB(handleFileExecAndSymbols));}
开发者ID:TheProjecter,项目名称:project-qtcreator,代码行数:24,
示例18: CBGUI::Widget* CheatEditor::createDialog(const GUI::WidgetFactory& f){ GUI::Window* win=f.window("Cheat codes", f.column(GUI::Contents( enabledCB=f.checkbox("Cheats &enabled"), f.row(GUI::Contents(f.text("Level 1"), code1=f.textField(40))), f.row(GUI::Contents(f.text("Level 2"), code2=f.textField(40))), f.row(GUI::Contents(f.text("Level 3"), code3=f.textField(40))), f.row(GUI::Contents(f.text("Level 4"), code4=f.textField(40))), f.buttonRow(GUI::Contents( f.button("O&K", CB(onOK)), f.button("&Cancel", CB(shutDown)) )) )) ); enabledCB->setValue((zcheats.flags&1)!=0); code1->setText(zcheats.codes[0]); code2->setText(zcheats.codes[1]); code3->setText(zcheats.codes[2]); code4->setText(zcheats.codes[3]); return win;}
开发者ID:arceusplayer11,项目名称:Vanilla-Patch,代码行数:24,
示例19: first_key/* position at start/end of index */int first_key(IX_DESC *pix){ pci = pix; block_ptr = &(pci->root); CB(0) = 0L; CO(0) = -1; pci->level = 0; while(block_ptr->p0 != NULLREC) { retrieve_block(++(pci->level), block_ptr->p0); CO(pci->level) = -1; } return (IX_OK);}
开发者ID:edisenwang,项目名称:libmm,代码行数:17,
示例20: QTC_ASSERTvoid RemoteGdbServerAdapter::interruptInferior(){ QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state()); if (debuggerCore()->boolSetting(TargetAsync)) { m_engine->postCommand("-exec-interrupt", GdbEngine::Immediate, CB(handleInterruptInferior)); } else { bool ok = m_gdbProc.interrupt(); if (!ok) { // FIXME: Extra state needed? m_engine->showMessage(_("NOTE: INFERIOR STOP NOT POSSIBLE")); m_engine->showStatusMessage(tr("Interrupting not possible")); m_engine->notifyInferiorRunOk(); } }}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:16,
示例21: QTC_ASSERTvoid CoreGdbAdapter::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); const QByteArray sysroot = startParameters().sysroot.toLocal8Bit(); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); if (!sysroot.isEmpty()) { m_engine->postCommand("set sysroot " + sysroot); // sysroot is not enough to correctly locate the sources, so explicitly // relocate the most likely place for the debug source m_engine->postCommand("set substitute-path /usr/src " + sysroot + "/usr/src"); } m_engine->postCommand("-file-exec-and-symbols /"" + path + '"', CB(handleFileExecAndSymbols));}
开发者ID:gaoxiaojun,项目名称:qtcreator,代码行数:16,
示例22: DataCopyvoid Fuzzer::ExecuteCallback(const uint8_t *Data, size_t Size) { UnitStartTime = system_clock::now(); // We copy the contents of Unit into a separate heap buffer // so that we reliably find buffer overflows in it. std::unique_ptr<uint8_t[]> DataCopy(new uint8_t[Size]); memcpy(DataCopy.get(), Data, Size); AssignTaintLabels(DataCopy.get(), Size); CurrentUnitData = DataCopy.get(); CurrentUnitSize = Size; AllocTracer.Start(); int Res = CB(DataCopy.get(), Size); (void)Res; HasMoreMallocsThanFrees = AllocTracer.Stop(); CurrentUnitSize = 0; CurrentUnitData = nullptr; assert(Res == 0);}
开发者ID:afesteves,项目名称:llvm,代码行数:17,
示例23: HOpenRFPUBLIC OSErrHOpenRF (INTEGER vref, LONGINT dirid, Str255 name, SignedByte perm, INTEGER *refp){ HParamBlockRec hpb; OSErr retval; hpb.fileParam.ioNamePtr = RM (name); hpb.fileParam.ioVRefNum = CW (vref); hpb.ioParam.ioPermssn = CB (perm); hpb.ioParam.ioMisc = CLC (0); hpb.fileParam.ioDirID = CL (dirid); retval = PBHOpenRF (&hpb, FALSE); if (retval == noErr) *refp = CW (hpb.ioParam.ioRefNum); return retval;}
开发者ID:nobled,项目名称:executor,代码行数:17,
示例24: last_keyint last_key(IX_DESC *pix){ long ads; pci = pix; block_ptr = &(pci->root); CB(0) = 0L; pci->level = 0; if(last_entry() >= 0) { while ((ads = ENT_ADR(block_ptr,last_entry())->idxptr) != NULLREC) { retrieve_block(++(pci->level), ads); } } CO(pci->level) = block_ptr->bend; return ( IX_OK );}
开发者ID:edisenwang,项目名称:libmm,代码行数:18,
注:本文中的CB函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CBGetMessage函数代码示例 C++ CArrayPushBack函数代码示例 |