这篇教程C++ writeLine函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中writeLine函数的典型用法代码示例。如果您正苦于以下问题:C++ writeLine函数的具体用法?C++ writeLine怎么用?C++ writeLine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了writeLine函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: glyphEnd/* End glyph definition. */static void glyphEnd(abfGlyphCallbacks *cb) { ufwCtx h = cb->direct_ctx; if (h->err.code != 0) return; else if (h->path.state < 2) { /* Call sequence error */ h->err.code = ufwErrBadCall; return; } if (h->path.state >= 3) /* have seen a move to. */ writeContour(h); if (h->path.state < 3) /* have NOT seen a move to, hence have never emitted an <outline> tag. */ writeLine(h, "/t<outline>"); writeLine(h, "/t</outline>"); writeLine(h, "</glyph>"); h->path.state = 0; flushBuf(h); /* Close dst stream */ h->cb.stm.close(&h->cb.stm, h->stm.dst); return;}
开发者ID:khaledhosny,项目名称:afdko,代码行数:28,
示例2: MSXrpt_writeint MSXrpt_write(){ INT4 magic = 0; int j; int recordsize = sizeof(INT4);// --- check that results are available if ( MSX.Nperiods < 1 ) return 0; if ( MSX.OutFile.file == NULL ) return ERR_OPEN_OUT_FILE; fseek(MSX.OutFile.file, -recordsize, SEEK_END); fread(&magic, sizeof(INT4), 1, MSX.OutFile.file); if ( magic != MAGICNUMBER ) return ERR_IO_OUT_FILE;// --- write program logo & project title PageNum = 1; LineNum = 1; newPage(); for (j=0; j<=5; j++) writeLine(Logo[j]); writeLine(""); writeLine(MSX.Title);// --- generate the appropriate type of table if ( MSX.Statflag == SERIES ) createSeriesTables(); else createStatsTables(); writeLine(""); return 0;}
开发者ID:lothar-mar,项目名称:epanet2-msx,代码行数:30,
示例3: Stringvoid Logfile::writeCollapsibleSection(const UnicodeString& title, const Vector<UnicodeString>& contents, OutputType type, bool writeLineNumbers){ // Collapsible sections are done with an <a> tag that toggles the display style on a div holding the contents of the // section. The toggleDivVisibility() JavaScript function used here is defined in Logfile::LogfileHeader. static auto nextSectionID = 0U; auto divID = String() + "collapsible-section-" + nextSectionID++; m->writeRaw(UnicodeString() + "<div class='info'>[" + FileSystem::getShortDateTime() + "] " + "<a href='javascript:;' onmousedown='toggleDivVisibility(/"" + divID + "/");'>" + title + "</a></div>" + "<div id='" + divID + "' style='display: none; padding-left: 5em; padding-top: 1em; padding-bottom: 1em;'>"); for (auto i = 0U; i < contents.size(); i++) { if (writeLineNumbers) writeLine(String::Empty, (UnicodeString(i + 1) + ":").padToLength(10) + contents[i], type, false); else writeLine(String::Empty, contents[i], type, false); } m->writeRaw(String("</div>"));}
开发者ID:savant-nz,项目名称:carbon,代码行数:25,
示例4: writeLinebool NetscapePluginModule::scanPlugin(const String& pluginPath){ RawPluginMetaData metaData; { // Don't allow the plugin to pollute the standard output. StdoutDevNullRedirector stdOutRedirector; // We are loading the plugin here since it does not seem to be a standardized way to // get the needed informations from a UNIX plugin without loading it. RefPtr<NetscapePluginModule> pluginModule = NetscapePluginModule::getOrCreate(pluginPath); if (!pluginModule) return false; pluginModule->incrementLoadCount(); bool success = pluginModule->getPluginInfoForLoadedPlugin(metaData); pluginModule->decrementLoadCount(); if (!success) return false; } // Write data to standard output for the UI process. writeLine(metaData.name); writeLine(metaData.description); writeLine(metaData.mimeDescription); fflush(stdout); return true;}
开发者ID:sinoory,项目名称:webv8,代码行数:31,
示例5: writeLinebool MyClient::sendFiles( const QStringList & files, bool addToPlaylist){ QString line; writeLine("open_files_start/r/n"); line = readLine(); if (!line.startsWith("OK")) return false; for (int n=0; n < files.count(); n++) { writeLine("open_files " + files[n] + "/r/n"); line = readLine(); if (!line.startsWith("OK")) return false; } if (!addToPlaylist) writeLine("open_files_end/r/n"); else writeLine("add_files_end/r/n"); writeLine("quit/r/n"); do { line = readLine(); } while (!line.isNull()); /* socket->disconnectFromHost(); socket->waitForDisconnected( timeout ); */ return true;}
开发者ID:AlexRu,项目名称:rosa-media-player,代码行数:35,
示例6: splitvoid ASFont::write(Surface* surface, const std::string& text, int x, int y, HAlign halign, VAlign valign) { if (text.find("/n", 0) != std::string::npos) { std::vector<std::string> textArr; split(textArr, text, "/n"); writeLine(surface, textArr, x, y, halign, valign); } else writeLine(surface, text, x, y, halign, valign);}
开发者ID:darth-llamah,项目名称:gmenu2x,代码行数:8,
示例7: dispatchCommand// do something...void dispatchCommand() { int commandNumber = atoi(commandBuffer); if (DEBUG) { Serial.print("command buffer is: "); Serial.println(commandBuffer); Serial.println("accumulated data:"); Serial.println(dataBuffer); } int dataAsInt; switch (commandNumber) { case CLEAR: clearLineHistory(); lcd.clear(); break; case ROW_ONE_TEXT: writeLine(1, dataBuffer); break; case ROW_TWO_TEXT: writeLine(2, dataBuffer); break; case PLACE_STRING: writeString(dataBuffer); break; case WRITE_ASCII: writeAscii(dataBuffer); break; case SCROLL_LEFT: dataAsInt = atoi(dataBuffer); dataAsInt > 0 ? dataAsInt : DEFAULT_SCROLL_DELAY; lcd.leftScroll(LINE_SIZE, dataAsInt > 0 ? dataAsInt : DEFAULT_SCROLL_DELAY); lcd.clear(); // should i or not? break; case SCROLL_UP: writeLine(1, lineHistory[2]); writeLine(2, dataBuffer); break; case MAKE_CHAR: recvCharData(); break; case SET_GAUGE: setGauge(); break; case SEND_CMD: lcd.commandWrite(atoi(dataBuffer)); break; case PRINT: lcd.print(atoi(dataBuffer)); break; case RESET: clearLineHistory(); resetGauges(); lcd.clear(); break; default: lcd.clear(); lcd.printIn("Undef'd Command"); }}
开发者ID:gitpan,项目名称:Device-Arduino-LCD,代码行数:59,
示例8: clearScreenvoid IOHelper::writeWelcome(){ clearScreen(); writeLine("-------------------------------------------------------------"); writeLine("| Welcome to Dungeons & Dragons |"); writeLine("| |"); writeLine("| Made by Wouter Aarts & Ben van Doormalen |"); writeLine("-------------------------------------------------------------");}
开发者ID:Wmaarts,项目名称:Dungeons-Dragons,代码行数:9,
示例9: runCmdvoid luConsoleEdit::runCmd(const wxString& cmd, bool prompt, bool echo){ if (echo) writeLine(cmd + "/n"); if (prompt) writeLine(m_prompt); if (m_script) { m_script->call(WX2GK(cmd), "console"); }}
开发者ID:Ali-il,项目名称:gamekit,代码行数:10,
示例10: newPagevoid newPage(){ char s[MAXLINE+1]; LineNum = 1; sprintf(s, "/nPage %-3d EPANET-MSX 1.1", //1.1.00 PageNum); writeLine(s); writeLine(""); if ( PageNum > 1 ) writeTableHdr(); PageNum++;}
开发者ID:lothar-mar,项目名称:epanet2-msx,代码行数:12,
示例11: writeGlyphFinalCurvestatic void writeGlyphFinalCurve(ufwCtx h, float *coords) { writeStr(h, "/t/t/t<point x=/""); writeReal(h, coords[0]); writeStr(h, "/" y=/""); writeReal(h, coords[1]); writeLine(h, "/" />"); writeStr(h, "/t/t/t<point x=/""); writeReal(h, coords[2]); writeStr(h, "/" y=/""); writeReal(h, coords[3]); writeLine(h, "/" />");}
开发者ID:khaledhosny,项目名称:afdko,代码行数:13,
示例12: mainint main(int argc, char **argv){ cudaError_t err = cudaSuccess; int deviceCount = 0; size_t totalDevMem, freeDevMem; size_t lastLineLength = 0; // MUST be initialized to zero signal(SIGTERM, signalHandler); signal(SIGQUIT, signalHandler); signal(SIGINT, signalHandler); signal(SIGHUP, signalHandler); writeLine(lastLineLength, "Preparing..."); err = cudaGetDeviceCount(&deviceCount); if (err != cudaSuccess) { std::cerr << "ERROR: " << cudaGetErrorString(err) << std::endl; } while (err == cudaSuccess && gRun) { std::ostringstream stream; for (int i=0; i < deviceCount; ++i) { if (err == cudaSuccess) { err = cudaSetDevice(i); if (err == cudaSuccess) { cudaMemGetInfo(&freeDevMem, &totalDevMem); if (i != 0) stream << " : "; stream << "Dev " << i << " (" << (freeDevMem/1024) << " KB of " << (totalDevMem/1048576) << " MB free)"; } } } if (err == cudaSuccess) { writeLine(lastLineLength, stream.str()); } sleep(5); // TODO - make the cycle time an optional command line flag... } cudaThreadExit(); std::cout << std::endl; return 0;}
开发者ID:fquiros,项目名称:CEO,代码行数:48,
示例13: writeLinevoid QAtChat::performWakeup(){ d->wakeupInProgress = true; writeLine( d->wakeupCommand ); d->lastSendTime.restart(); QTimer::singleShot( 1000, this, SLOT(wakeupFinished()) );}
开发者ID:Camelek,项目名称:qtmoko,代码行数:7,
示例14: getColorvoid TInterior::draw() // modified for scroller{ ushort color = getColor(0x0301); for( int i = 0; i < size.y; i++ ) // for each line: { TDrawBuffer b; b.moveChar( 0, ' ', color, size.x ); // fill line buffer with spaces int j = delta.y + i; // delta is scroller offset if( j < lineCount && lines[j] != 0 ) { char s[maxLineLength]; if( delta.x > strlen(lines[j] ) ) s[0] = EOS; else { strncpy( s, lines[j]+delta.x, size.x ); s[size.x] = EOS; } b.moveCStr( 0, s, color ); } writeLine( 0, i, size.x, 1, b); }}
开发者ID:Mikelle02,项目名称:GameMaker,代码行数:26,
示例15: writeLinebool ASTPrinter::visit(Identifier const& _node){ writeLine(string("Identifier ") + _node.getName()); printType(_node); printSourcePart(_node); return goDeeper();}
开发者ID:1600,项目名称:solidity,代码行数:7,
示例16: sprintfvoid TProgressBar::draw() { char string[4]; sprintf(string,"%d",curPercent); string[3] = '/0'; if(curPercent<10) { string[2] = string[0]; string[1] = string[0] = ' '; } else if(curPercent<100 && curPercent>9) { string[2] = string[1]; string[1] = string[0]; string[0] = ' '; } TDrawBuffer nbuf; uchar colorNormal, colorHiLite; colorNormal = getColor(1); uchar fore = colorNormal >>4; // >>4 is same as /16 colorHiLite = fore+((colorNormal-(fore<<4))<<4); // <<4 is same as *16 nbuf.moveChar(0,backChar,colorNormal,size.x); nbuf.moveStr(numOffset,string,colorNormal); nbuf.moveStr(numOffset+3," %",colorNormal); unsigned i; for(i=0;i<curWidth;i++) nbuf.putAttribute(i,colorHiLite); writeLine(0, 0, size.x, 1, nbuf);}
开发者ID:idispatch,项目名称:tvision,代码行数:26,
示例17: writeLinevoid LoggerWithFiltering::performWriteLine(std::string message, rang::fg color){ if (message.find(textToFilter) != std::string::npos) { writeLine(message, color); }}
开发者ID:Szmyk,项目名称:zspy-cli,代码行数:7,
示例18: getColorvoid TPuzzleView::draw() { char tmp[8]; char color[2], colorBack; TDrawBuffer buf; color[0] = color[1] = colorBack = getColor(1); if (!solved) color[1] = getColor(2); /* SS: little change */ short i; for (i = 0; i <= 3; i++) //for(short i = 0; i <= 3; i++) { buf.moveChar(0, ' ', colorBack, 18); if (i == 1) buf.moveStr(13, "Move", colorBack); if (i == 2) { sprintf(tmp, "%d", moves); buf.moveStr(14, tmp, colorBack); } for (short j = 0; j <= 3; j++) { strcpy(tmp, " "); tmp[1] = board[i][j]; if (board[i][j] == ' ') buf.moveStr((short) (j * 3), tmp, color[0]); else buf.moveStr((short) (j * 3), tmp, color[(int) map[board[i][j] - 'A']]); } writeLine(0, i, 18, 1, buf); }}
开发者ID:idispatch,项目名称:tvtest,代码行数:32,
示例19: getColorvoid TOutlineViewer::draw() { ushort nrmColor = getColor(0x0401); firstThat(drawTree); dBuf.moveChar(0, ' ', nrmColor, size.x); writeLine(0, auxPos + 1, size.x, size.y - (auxPos - delta.y), dBuf);}
开发者ID:OS2World,项目名称:SYSTEM-LOADER-QSINIT,代码行数:7,
示例20: switchvoid LC_MakerCamSVG::writeEntity(RS_Entity* entity) { RS_DEBUG->print("RS_MakerCamSVG::writeEntity: Found entity ..."); switch (entity->rtti()) { case RS2::EntityInsert: writeInsert((RS_Insert*)entity); break; case RS2::EntityPoint: writePoint((RS_Point*)entity); break; case RS2::EntityLine: writeLine((RS_Line*)entity); break; case RS2::EntityPolyline: writePolyline((RS_Polyline*)entity); break; case RS2::EntityCircle: writeCircle((RS_Circle*)entity); break; case RS2::EntityArc: writeArc((RS_Arc*)entity); break; case RS2::EntityEllipse: writeEllipse((RS_Ellipse*)entity); break; default: RS_DEBUG->print("RS_MakerCamSVG::writeEntity: Entity with type '%d' not yet implemented", (int)entity->rtti()); break; }}
开发者ID:CERobertson,项目名称:LibreCAD,代码行数:33,
注:本文中的writeLine函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ writeLock函数代码示例 C++ writeInt函数代码示例 |