这篇教程C++ wxPrintf函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxPrintf函数的典型用法代码示例。如果您正苦于以下问题:C++ wxPrintf函数的具体用法?C++ wxPrintf怎么用?C++ wxPrintf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxPrintf函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: wxPrintfvoid CodeLiteLLDBApp::OpenCoreFile(const LLDBCommand& command){ wxPrintf("codeite-lldb: debugging core file '%s'/n", command.GetCorefile()); wxPrintf("codeite-lldb: executable file '%s'/n", command.GetExecutable()); if(!InitializeLLDB(command)) { return; } lldb::SBProcess process = m_target.LoadCore(command.GetCorefile().mb_str(wxConvUTF8).data()); if(!process.IsValid()) { wxPrintf("codeite-lldb: error loading core file '%s'/n", command.GetCorefile()); NotifyExited(); return; } // Launch the thread that will handle the LLDB process events m_lldbProcessEventThread = new LLDBProcessEventHandlerThread(this, m_debugger, m_target.GetProcess(), kDebugSessionTypeCore); m_lldbProcessEventThread->Start(); // Notify codelite that the debugger started successfully NotifyStarted(kDebugSessionTypeCore); // In any case, reset the interrupt reason m_interruptReason = kInterruptReasonNone; // Since we are in 'core' session // immediately notify about 'stop' NotifyStopped();}
开发者ID:DoctorRover,项目名称:codelite,代码行数:31,
示例2: throwvoid CodeLiteLLDBApp::AcceptNewConnection() throw(clSocketException){ m_replySocket.reset(NULL); wxPrintf("codelite-lldb: waiting for new connection/n"); try { while(true) { m_replySocket = m_acceptSocket.WaitForNewConnection(1); if(m_replySocket) { break; } } // Remote connection, send the 'handshake' packet if(m_port != wxNOT_FOUND) { wxPrintf("codelite-lldb: sending handshake packet/n"); LLDBRemoteHandshakePacket handshake; handshake.SetHost(::wxGetHostName()); m_replySocket->WriteMessage(handshake.ToJSON().format()); } // handle the connection to the thread m_networkThread = new LLDBNetworkServerThread(this, m_replySocket->GetSocket()); m_networkThread->Start(); } catch(clSocketException& e) { wxPrintf("codelite-lldb: an error occurred while waiting for connection. %s/n", e.what().c_str()); Cleanup(); // exit throw clSocketException("Failed to accept new connection"); }}
开发者ID:DoctorRover,项目名称:codelite,代码行数:32,
示例3: wxPutsvoid InteractiveInputTestCase::TestSingleIstance(){#ifdef TEST_SNGLINST wxPuts(wxT("/n*** Testing wxSingleInstanceChecker ***")); wxSingleInstanceChecker checker; if ( checker.Create(wxT(".wxconsole.lock")) ) { if ( checker.IsAnotherRunning() ) { wxPrintf(wxT("Another instance of the program is running, exiting./n")); return; } // wait some time to give time to launch another instance wxPuts(wxT("If you try to run another instance of this program now, it won't start.")); wxPrintf(wxT("Press /"Enter/" to exit wxSingleInstanceChecker test and proceed...")); wxFgetc(stdin); } else // failed to create { wxPrintf(wxT("Failed to init wxSingleInstanceChecker./n")); } wxPuts("/n");#endif // defined(TEST_SNGLINST)}
开发者ID:ruifig,项目名称:nutcracker,代码行数:27,
示例4: wxPrintfvoid CodeLiteLLDBApp::ApplyBreakpoints(const LLDBCommand& command){ wxPrintf("codelite-lldb: ApplyBreakpoints called/n"); if ( m_target.GetProcess().GetState() == lldb::eStateStopped ) { wxPrintf("codelite-lldb: ApplyBreakpoints: process state is stopped - will apply them now/n"); // we can apply the breakpoints // Apply all breakpoints with an-invalid breakpoint ID LLDBBreakpoint::Vec_t breakpoints = command.GetBreakpoints(); while( !breakpoints.empty() ) { LLDBBreakpoint::Ptr_t breakPoint = breakpoints.at(0); if ( !breakPoint->IsApplied() ) { switch( breakPoint->GetType() ) { case LLDBBreakpoint::kFunction: { wxPrintf("codelite-lldb: creating breakpoint by name: %s/n", breakPoint->GetName()); m_target.BreakpointCreateByName(breakPoint->GetName().mb_str().data(), NULL); break; } case LLDBBreakpoint::kFileLine: { wxPrintf("codelite-lldb: creating breakpoint by location: %s,%d/n", breakPoint->GetFilename(), breakPoint->GetLineNumber()); m_target.BreakpointCreateByLocation(breakPoint->GetFilename().mb_str().data(), breakPoint->GetLineNumber()); break; } } } breakpoints.erase(breakpoints.begin()); } NotifyBreakpointsUpdated(); } else { wxPrintf("codelite-lldb: ApplyBreakpoints: process state is _NOT_ Stopped - interrupting process/n"); // interrupt the process m_interruptReason = kInterruptReasonApplyBreakpoints; m_target.GetProcess().SendAsyncInterrupt(); }}
开发者ID:mixpro,项目名称:codelite,代码行数:35,
示例5: BenchmarkRoundedRectangles void BenchmarkRoundedRectangles(const wxString& msg, wxDC& dc) { if ( !opts.testRectangles ) return; if ( opts.mapMode != 0 ) dc.SetMapMode((wxMappingMode)opts.mapMode); if ( opts.penWidth != 0 ) dc.SetPen(wxPen(*wxWHITE, opts.penWidth)); dc.SetBrush( *wxCYAN_BRUSH ); wxPrintf("Benchmarking %s: ", msg); fflush(stdout); wxStopWatch sw; for ( int n = 0; n < opts.numIters; n++ ) { int x = rand() % opts.width, y = rand() % opts.height; dc.DrawRoundedRectangle(x, y, 48, 32, 8); } const long t = sw.Time(); wxPrintf("%ld rounded rects done in %ldms = %gus/rect/n", opts.numIters, t, (1000. * t)/opts.numIters); }
开发者ID:CodeTickler,项目名称:wxWidgets,代码行数:29,
示例6: mainint main(int argc, char **argv){ wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "program"); wxInitializer initializer; if ( !initializer ) { fprintf(stderr, "Failed to initialize the wxWidgets library, aborting."); return -1; } wxCmdLineParser parser(cmdLineDesc, argc, argv); switch ( parser.Parse() ) { case -1: // help was given, terminating break; case 0: // everything is ok; proceed if (parser.Found("d")) { wxPrintf("Dummy switch was given.../n"); while (1) { wxChar input[128]; wxPrintf("Try to guess the magic number (type 'quit' to escape): "); if ( !wxFgets(input, WXSIZEOF(input), stdin) ) break; // kill the last '/n' input[wxStrlen(input) - 1] = 0; if (wxStrcmp(input, "quit") == 0) break; long val; if (!wxString(input).ToLong(&val)) { wxPrintf("Invalid number.../n"); continue; } if (val == 42) wxPrintf("You guessed!/n"); else wxPrintf("Bad luck!/n"); } } break; default: break; } // do something useful here return 0;}
开发者ID:euler0,项目名称:Helium,代码行数:60,
示例7: mainint main(int argc, char **argv){ if ( argc < 2 ) { printf("usage: %s <bind string>/n", argv[0]); return EXIT_FAILURE; } try { wxString connectAddress(argv[1], wxConvUTF8); ZMQContext context; ZMQSocket s(context, ZMQSocket::Reply); // Server socket type s.bind( connectAddress ); // wait for messages s.setTimeout( 1000 ); while ( true ) { ZMQMessage incMessage; if ( s.recvMessage( incMessage ) ) { wxPrintf(wxT("Received message: %s/n"), incMessage.GetString().c_str()); // Message received! // process it wxString reply( incMessage.GetString() ); reply << wxT(" - a reply!"); s.sendMessage( reply ); } } } catch (ZMQException &e) { wxPrintf(wxT("error: %s/n"), e.What().c_str()); } return 0;}
开发者ID:erdincay,项目名称:ZeroMQCxxAPI,代码行数:35,
示例8: BenchmarkLines void BenchmarkLines(const char *msg, wxDC& dc) { if ( opts.mapMode != 0 ) dc.SetMapMode(opts.mapMode); if ( opts.penWidth != 0 ) dc.SetPen(wxPen(*wxWHITE, opts.penWidth)); wxPrintf("Benchmarking %s DC: ", msg); wxStopWatch sw; int x = 0, y = 0; for ( int n = 0; n < opts.numLines; n++ ) { int x1 = rand() % opts.width, y1 = rand() % opts.height; dc.DrawLine(x, y, x1, y1); x = x1; y = y1; } const long t = sw.Time(); wxPrintf("%d lines done in %lums = %gus/line/n", opts.numLines, t, (1000. * t)/opts.numLines); }
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:28,
示例9: catchbool CodeLiteLLDBApp::OnInit(){ try { if(m_port != wxNOT_FOUND) { m_acceptSocket.CreateServer(m_ip.mb_str(wxConvUTF8).data(), m_port); } else { m_acceptSocket.CreateServer(m_debuggerSocketPath.mb_str(wxConvUTF8).data()); } } catch(clSocketException& e) { if(m_port == wxNOT_FOUND) { wxPrintf("codelite-lldb: caught exception: %s/n", e.what()); wxPrintf("codelite-lldb: failed to create server on %s. %s/n", m_debuggerSocketPath, strerror(errno)); } else { wxPrintf("codelite-lldb: caught exception: %s/n", e.what()); wxPrintf("codelite-lldb: failed to create server on %s. %s/n", (wxString() << m_ip << ":" << m_port), strerror(errno)); } return false; } return true;}
开发者ID:DoctorRover,项目名称:codelite,代码行数:25,
示例10: BenchmarkImages void BenchmarkImages(const wxString& msg, wxDC& dc) { if ( !opts.testImages ) return; if ( opts.mapMode != 0 ) dc.SetMapMode((wxMappingMode)opts.mapMode); wxPrintf("Benchmarking %s: ", msg); fflush(stdout); wxImage image(wxSize(opts.width, opts.height), false /* don't clear */); wxStopWatch sw; for ( int n = 0; n < opts.numIters; n++ ) { UpdateRGB(image.GetData(), n); dc.DrawBitmap(image, 0, 0); } const long t = sw.Time(); wxPrintf("%ld images done in %ldms = %gus/image or %ld FPS/n", opts.numIters, t, (1000. * t)/opts.numIters, (1000*opts.numIters + t - 1)/t); }
开发者ID:CodeTickler,项目名称:wxWidgets,代码行数:26,
示例11: CHECK_DEBUG_SESSION_RUNNINGvoid CodeLiteLLDBApp::DeleteBreakpoints(const LLDBCommand& command){ CHECK_DEBUG_SESSION_RUNNING(); const LLDBBreakpoint::Vec_t& bps = command.GetBreakpoints(); if(bps.empty()) { return; } wxPrintf("codelite-lldb: DeleteBreakpoints called/n"); if(m_target.GetProcess().GetState() == lldb::eStateStopped) { wxPrintf("codelite-lldb: DeleteBreakpoints: process state is Stopped - will apply them now/n"); for(size_t i = 0; i < bps.size(); ++i) { LLDBBreakpoint::Ptr_t breakpoint = bps.at(i); wxPrintf("codelite-lldb: deleting breakpoint: %s/n", breakpoint->ToString()); if(breakpoint->IsApplied()) { lldb::SBBreakpoint lldbBreakpoint = m_target.FindBreakpointByID(breakpoint->GetId()); if(lldbBreakpoint.IsValid()) { lldbBreakpoint.ClearAllBreakpointSites(); m_target.BreakpointDelete(lldbBreakpoint.GetID()); } } } NotifyBreakpointsUpdated(); } else { wxPrintf("codelite-lldb: DeleteBreakpoints: process is Busy - will interrupt it/n"); m_interruptReason = kInterruptReasonDeleteBreakpoint; m_target.GetProcess().SendAsyncInterrupt(); }}
开发者ID:DoctorRover,项目名称:codelite,代码行数:31,
示例12: BenchmarkEllipses void BenchmarkEllipses(const wxString& msg, wxDC& dc) { if ( !opts.testEllipses ) return; if ( opts.mapMode != 0 ) dc.SetMapMode((wxMappingMode)opts.mapMode); if ( opts.penWidth != 0 ) dc.SetPen(wxPen(*wxWHITE, opts.penWidth)); dc.SetBrush( *wxBLUE_BRUSH ); wxPrintf("Benchmarking %s: ", msg); fflush(stdout); wxStopWatch sw; for ( long n = 0; n < opts.numIters; n++ ) { int x = rand() % opts.width, y = rand() % opts.height; dc.DrawEllipse(x, y, 48, 32); } const long t = sw.Time(); wxPrintf("%ld ellipses done in %ldms = %gus/ellipse/n", opts.numIters, t, (1000. * t)/opts.numIters); }
开发者ID:CodeTickler,项目名称:wxWidgets,代码行数:29,
示例13: mNameFileIO::FileIO(const wxString & name, FileIOMode mode): mName(name), mMode(mode), mInputStream(NULL), mOutputStream(NULL), mOpen(false){ wxString scheme; if (mMode == FileIO::Input) { mInputStream = new wxFFileInputStream(mName); if (mInputStream == NULL || !mInputStream->IsOk()) { wxPrintf(wxT("Couldn't get input stream: %s/n"), name.c_str()); return; } } else { mOutputStream = new wxFFileOutputStream(mName); if (mOutputStream == NULL || !mOutputStream->IsOk()) { wxPrintf(wxT("Couldn't get output stream: %s/n"), name.c_str()); return; } } mOpen = true;}
开发者ID:jozsefmezei,项目名称:audacity,代码行数:26,
示例14: BenchmarkLines void BenchmarkLines(const wxString& msg, wxDC& dc) { if ( !opts.testLines ) return; if ( opts.mapMode != 0 ) dc.SetMapMode((wxMappingMode)opts.mapMode); if ( opts.penWidth != 0 ) dc.SetPen(wxPen(*wxWHITE, opts.penWidth)); wxPrintf("Benchmarking %s: ", msg); fflush(stdout); wxStopWatch sw; int x = 0, y = 0; for ( int n = 0; n < opts.numIters; n++ ) { int x1 = rand() % opts.width, y1 = rand() % opts.height; dc.DrawLine(x, y, x1, y1); x = x1; y = y1; } const long t = sw.Time(); wxPrintf("%ld lines done in %ldms = %gus/line/n", opts.numIters, t, (1000. * t)/opts.numIters); }
开发者ID:CodeTickler,项目名称:wxWidgets,代码行数:32,
示例15: wxPrintfvoid TestResult::testsEnded() { if (failureCount > 0) wxPrintf("/n%ld tests run [%ld checks]: there were %ld failures!/n", testCount, checkCount, failureCount); else wxPrintf("/n%ld tests run [%ld checks]: all tests passed!/n", testCount, checkCount);}
开发者ID:cpence,项目名称:oyun,代码行数:8,
示例16: wxTbool OyunApp::OnInit(){ // Play like a nice Linux application for (int i = 1 ; i < argc ; i++) { if (!wxStrcmp(argv[i], wxT("--version"))) { const wchar_t *version = wxT(STRINGIZE( OYUN_VERSION )); const wxString verstring = _("Oyun %ls/n" "Copyright (C) 2004-2011 Charles Pence/n" "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>/n" "This is free software: you are free to change and redistribute it./n" "There is NO WARRANTY, to the extent permitted by law./n"); wxPrintf(verstring, version); return false; } else if (!wxStrcmp(argv[i], wxT("--help"))) { const wxString helpstring = _("Usage: oyun [OPTION].../n" "Run an evolutionary game theory tournament./n" "/n" " --test run the Oyun testing suite/n" " --help display this help and exit/n" " --version output version information and exit/n" "/n" "Report bugs to: <[email C++ wxQtConvertString函数代码示例 C++ wxPostEvent函数代码示例
|