• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ outString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中outString函数的典型用法代码示例。如果您正苦于以下问题:C++ outString函数的具体用法?C++ outString怎么用?C++ outString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了outString函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetAt

void CGroupsInfo::printGroupInfo(FILE *file) const
{
	size_t i = GetAt(0)->numMatrices() ? 0 : 1;
	const size_t iMax = GetSize();
	if (i == iMax)
		return;			// Nothing was constructed

#define SHIFT "    "
	char buffer[256], line[256];
	size_t len = SPRINTF(buffer, "\n" SHIFT "    |Aut(D)|          Nd:             Ns:            Ndt:            Nst:\n");
	outString(buffer, file);

	strcpy_s(line, countof(line), SHIFT);
	const size_t l_Shift = strlen(SHIFT);
	memset(line + l_Shift, '_', len);
	len += l_Shift;
	strcpy_s(line + len, countof(line) - len, "\n");
	outString(line, file);

	COrderInfo total(0, 0);
	for (; i < iMax; i++) {
		const COrderInfo *pInfo = GetAt(i);
		total.addMatrix(pInfo);
		len = SPRINTF(buffer, SHIFT"%10zd", pInfo->groupOrder());
		pInfo->outNumbInfo(buffer, countof(buffer) - len, len);
		outString(buffer, file);
	}

	outString(line, file);
	len = SPRINTF(buffer, "        Total:");
	total.outNumbInfo(buffer, countof(buffer) - len, len);
	outString(buffer, file);
}
开发者ID:andrei5055,项目名称:Incidence-System-Enumeration,代码行数:33,代码来源:GroupsInfo.cpp


示例2: setRunTime

void CEnumInfo<T>::outEnumInfo(FILE **pOutFile, bool removeReportFile, const CGroupsInfo *pGroupInfo)
{
	setRunTime();
	FILE *outFile = pOutFile ? *pOutFile : NULL;
	if (!outFile)
		return;

	if (!pGroupInfo)
		pGroupInfo = this;

	pGroupInfo->printGroupInfo(outFile);
	const ulonglong nConstrMatr = constrCanonical();
	char buff[256];
	SPRINTF(buff, "\n%10llu matri%s" CONSTRUCTED_IN " ", nConstrMatr, nConstrMatr == 1 ? "x" : "ces");
	const size_t len = strlen(buff);
	convertTime(runTime(), buff + len, countof(buff) - len, false);
	outString(buff, outFile);

	const ulonglong nMatr = numbSimpleDesign();
	if (nConstrMatr > 0) {
		SPRINTF(buff, "%10llu matri%s ha%s no replicated blocks\n", nMatr, nMatr == 1 ? "x" : "ces", nMatr == 1 ? "s" : "ve");
		outString(buff, outFile);
	}

	SPRINTF(buff, "%10llu matri%s fully constructed\n", constrTotal(), constrTotal() == 1 ? "x was" : "ces were");
	outString(buff, outFile);

	outEnumInformation(pOutFile);
	if (removeReportFile) // Remove temporary file with the intermediate results	
		remove(reportFileName());
}
开发者ID:andrei5055,项目名称:Incidence-System-Enumeration,代码行数:31,代码来源:EnumInfo.cpp


示例3: receiveVar

uint
receiveVar(char* p_c) {
  // Receive the data by stepping the machine until it outputs
  // something
  do {
    // While there's no data, run the timeout counter
    RECEIVE_ERROR re;
    uint32_t u32_count = 0;
    while (!isCharReady()) {
      if (u32_count < RECEIVE_TIMEOUT)
        u32_count++;
      doHeartbeat();
    }

    // Step the machine
    *p_c = inChar();
    if (u32_count >= RECEIVE_TIMEOUT)
      notifyOfTimeout();
    re = stepReceiveMachine(*p_c);
    if (re != ERR_NONE) {
      outString("Data receive error: ");
      outString(getReceiveErrorString());
      outChar('\n');
    }
  } while (!isReceiveMachineChar() && !isReceiveMachineData());

  // Note that p_c already contains the received character, since it's
  // always the last thing received from inChar().
  return getReceiveMachineIndex();
}
开发者ID:BradKillen76,项目名称:SECON-2016,代码行数:30,代码来源:dataXfer.c


示例4: redefMsg

static void redefMsg(any x, any y) {
   outFile *oSave = OutFile;
   void (*putSave)(int) = Env.put;

   OutFile = OutFiles[STDERR_FILENO],  Env.put = putStdout;
   outString("# ");
   print(x);
   if (y)
      space(), print(y);
   outString(" redefined\n");
   Env.put = putSave,  OutFile = oSave;
}
开发者ID:evanrmurphy,项目名称:PicoLisp,代码行数:12,代码来源:flow.c


示例5: tempDes

void CMMF_TSU_DEVSOUND_TestInterface1DeMux::DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage)
	{
	TMMFDevSoundCIMessageData data;
	
	// decode message
	iUtility->GetAsyncMessageDataL(aMessage, data);

	if (data.iCommand != EMMFDevSoundCITestAsyncResult)
		{
		User::Leave(KErrNotSupported);
		}
	
	// check descriptor
	HBufC8* tempBuf = HBufC8::NewL(iUtility->InputDesLength(aMessage));
	CleanupStack::PushL(tempBuf);
	TPtr8 tempDes(tempBuf->Des());
	
	iUtility->ReadFromInputDesL(aMessage, &tempDes);
	
	if (tempDes != KDevSoundCITestIn)
		{
		User::Leave(KErrCorrupt);
		}
	
	// write to the output buffer
	TPtrC8 outString(KDevSoundCITestOut);
	iUtility->WriteToOutputDesL(aMessage, outString);
	
	// complete the message
	iUtility->CompleteMessage(aMessage, KErrNone);
	CleanupStack::PopAndDestroy(); // tempBuf
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:32,代码来源:TSU_MMF_DEVSOUND_TestInterface1.cpp


示例6: onDrawContent

    void onDrawContent(SkCanvas* canvas) override {
        SkPaint paint;
        SkSafeUnref(paint.setTypeface(SkTypeface::CreateFromFile("/skimages/samplefont.ttf")));
        paint.setAntiAlias(true);
        paint.setFilterQuality(kMedium_SkFilterQuality);

        SkString outString("fps: ");
        fTimer.end();

        // TODO: generalize this timing code in utils
        fTimes[fCurrentTime] = (float)(fTimer.fWall);
        fCurrentTime = (fCurrentTime + 1) & 0x1f;

        float meanTime = 0.0f;
        for (int i = 0; i < 32; ++i) {
            meanTime += fTimes[i];
        }
        meanTime /= 32.f;
        SkScalar fps = 1000.f / meanTime;
        outString.appendScalar(fps);
        outString.append(" ms: ");
        outString.appendScalar(meanTime);

        SkString modeString("Text scale: ");
        modeString.appendU32(fSizeScale);
        modeString.append("x");

        fTimer.start();

        canvas->save();

#if SK_SUPPORT_GPU
        SkBaseDevice* device = canvas->getDevice_just_for_deprecated_compatibility_testing();
        GrContext* grContext = canvas->getGrContext();
        if (grContext) {
            GrTexture* tex = grContext->getFontAtlasTexture(GrMaskFormat::kA8_GrMaskFormat);
            reinterpret_cast<SkGpuDevice*>(device)->drawTexture(tex,
                                                       SkRect::MakeXYWH(512, 10, 512, 512), paint);
        }
#endif
        canvas->translate(180, 180);
        canvas->rotate(fRotation);
        canvas->scale(fScale, fScale);
        canvas->translate(-180, -180);

        const char* text = "Hamburgefons";
        size_t length = strlen(text);

        SkScalar y = SkIntToScalar(0);
        for (int i = 12; i <= 26; i++) {
            paint.setTextSize(SkIntToScalar(i*fSizeScale));
            y += paint.getFontSpacing();
            DrawTheText(canvas, text, length, SkIntToScalar(110), y, paint);
        }
        canvas->restore();

        paint.setTextSize(16);
//        canvas->drawText(outString.c_str(), outString.size(), 512.f, 540.f, paint);
        canvas->drawText(modeString.c_str(), modeString.size(), 768.f, 540.f, paint);
    }
开发者ID:Crawping,项目名称:chromium_extract,代码行数:60,代码来源:SampleAnimatedText.cpp


示例7: main

int main(void) {
  int16_t i16_c;

  if (_POR) {
    i16_b = 0;
    _POR = 0;
  }
  configBasic(HELLO_MSG);

  outString("Hello world!\n");
  ++i16_a;
  ++i16_b;
  ++i16_c;
  printf("a = %d, b = %d, c = %d\n", i16_a, i16_b, i16_c);
  while (1) {
    // Do nothing.

    // After powering the chip on:
    //
    // - What is the value of a at this line? Either a number or x if
    //   unknown.
    // - What is the value of b at this line? Either a number or x if
    //   unknown.
    //
    // After pressing the MCLR button once:
    //
    // - What is the value of a at this line? Either a number or x if
    //   unknown.
    // - What is the value of b at this line? Either a number or x if
    //   unknown.
  }
}
开发者ID:bjones1,项目名称:ece3724_inclass,代码行数:32,代码来源:gpio.c


示例8: solutionSize

void CRowSolution<T>::printRow(FILE *file, PERMUT_ELEMENT_TYPE *pPerm, const T *pSol) const
{
    char buffer[512], *pBuf = buffer;
    for (size_t j = 0; j < numSolutions(); j++) {
        size_t idx = pPerm? *(pPerm + j) : j;
        if (pSol)
            idx = *(pSol + idx * solutionSize());
        
        pBuf += sprintf_s(pBuf, sizeof(buffer) - (pBuf - buffer), "%2zd", idx % 100);
        if (pBuf >= buffer + sizeof(buffer) - 2)
			outString(pBuf = buffer, file);
    }
    
	sprintf_s(pBuf, sizeof(buffer) - (pBuf - buffer), "\n");
	outString(buffer, file);
}
开发者ID:andrei5055,项目名称:Incidence-System-Enumeration,代码行数:16,代码来源:RowSolution.cpp


示例9: main

int main() {
        str = "Kitty on your lap\n";
        printf(str);
        outString();

         return 0;
}
开发者ID:dorberu,项目名称:Wisdom-Sakura-C,代码行数:7,代码来源:ex50_2_1.c


示例10: atoi

void Log::SetLogFileLevel(char *Level) {
	int32 NewLevel = atoi((char*) Level);
	if (NewLevel < 0)
		NewLevel = 0;
	m_logFileLevel = NewLevel;

	outString("LogFileLevel is %u", m_logFileLevel);
}
开发者ID:tauri,项目名称:ArkCORE,代码行数:8,代码来源:Log.cpp


示例11: MUTEX_LOCK

void CRowSolution<T>::printSolutions(FILE *file, bool markNextUsed) const
{
	if (!solutionSize() || !numSolutions())
        return;
    
	MUTEX_LOCK(out_mutex);
	char buffer[2048];
	if (numSolutions() >= sizeof(buffer) / 2) {
  	if (markNextUsed) {
			SPRINTF(buffer, "Using solution # %zd out of %zd\n", solutionIndex(), numSolutions());
			outString(buffer, file);
		}
	}
	else {
		if (markNextUsed) {
			const size_t len2 = sizeof(buffer) << 1;
			const size_t len = solutionIndex() * 2;
			const size_t nLoops = len / len2;
			size_t idx = 0;
			for (size_t j = 0; j < nLoops; j++) {
				idx = setSolutionFlags(buffer, sizeof(buffer), idx);
				buffer[sizeof(buffer)-1] = '\0';
				outString(buffer, file);
			}

			const size_t lastLen = 2 * (numSolutions() - idx);
			setSolutionFlags(buffer, lastLen, idx);
			buffer[len % len2 + 1] = '*';
			strcpy_s(buffer + lastLen, sizeof(buffer)-lastLen, "\n");
			outString(buffer, file);
		}

		printRow(file);

		PERMUT_ELEMENT_TYPE *pPerm = solutionPerm() ? solutionPerm()->GetData() : NULL;
		if (pPerm)
			printRow(file, pPerm);

		const VECTOR_ELEMENT_TYPE *pSolution = firstSolution();
		for (unsigned int i = 0; i < solutionSize(); i++)
			printRow(file, pPerm, pSolution + i);
	}

	MUTEX_UNLOCK(out_mutex);
}
开发者ID:andrei5055,项目名称:Incidence-System-Enumeration,代码行数:45,代码来源:RowSolution.cpp


示例12: outString

void ACGI::cgiEncodeAndOutputURL(const char *pccSource, int iLength)
{
  char *pcOut = g_aCrypto.convertoEncodeURL(pccSource, iLength);

  if (pcOut)
    outString(pcOut);

  delete []pcOut;
}
开发者ID:achacha,项目名称:freeCGI,代码行数:9,代码来源:a_cgi.cpp


示例13: outStringN

void ACGI::cgiStartFORM(const char *pccAction, const char *pccMethod)
{
  outStringN("<FORM ACTION=\"");
  if (pccAction) outString(pccAction);
  else           cgiGetScriptName(0x1);
  outStringN("\" METHOD=");
  if (pccMethod) outStringQ(pccMethod);
  else           outStringQ("POST");
  outStringCRN(">");
}
开发者ID:achacha,项目名称:freeCGI,代码行数:10,代码来源:a_cgi.cpp


示例14: traceIndent

static void traceIndent(int i, any x, char *s) {
   if (i > 64)
      i = 64;
   while (--i >= 0)
      Env.put(' ');
   if (isSym(x))
      print(x);
   else
      print(car(x)), space(), print(cdr(x)), space(), print(val(This));
   outString(s);
}
开发者ID:evanrmurphy,项目名称:PicoLisp,代码行数:11,代码来源:flow.c


示例15: SPRINTF

void CEnumInfo<T>::outEnumAdditionalInfo(FILE **pOutFile) const
{
	FILE *outFile = pOutFile ? *pOutFile : NULL;
	if (!outFile)
		return;

	char buff[256];
	SPRINTF(buff, "%10llu matri%s fully constructed\n", constrTotal(), constrTotal() == 1 ? "x was" : "ces were");
	outString(buff, outFile);

	outEnumInformation(pOutFile);
}
开发者ID:andrei5055,项目名称:Incidence-System-Enumeration,代码行数:12,代码来源:EnumInfo.cpp


示例16: commentifyDocString

QString commentifyDocString( const QString & docString, int indentLevel = 0 )
{
	QString indentString;
	for( int i=0; i<indentLevel; i++ )
		indentString += "\t";

	QString outString(indentString +"/**\n");
	// Unix \n, windows \n\r, mac \r
	QStringList lines = docString.split( QRegExp( "[\n\r]\r?" ) );
	QString commentStart("/*"), commentEnd("*/");
	foreach( QString line, lines ) {
		line = line.replace( commentStart, "" );
		line = line.replace( commentEnd, "" );
		outString += indentString + "  * " + line + "\n";
	}
开发者ID:carriercomm,项目名称:arsenalsuite,代码行数:15,代码来源:sourcegen.cpp


示例17: main

int main(void)
{
 	 //configure pins. Only need SDO, SCLK since POT is output only
	CONFIG_RG8_AS_DIG_OUTPUT();   //use RF3 for SDO
	CONFIG_RG6_AS_DIG_OUTPUT();   //use RF6 for SCLK
 	CONFIG_RG7_AS_DIG_OUTPUT();   //use RF7 for SDI
	CONFIG_RF0_AS_DIG_OUTPUT();   //chip select for VDIP1_A
	CONFIG_RB9_AS_DIG_OUTPUT();   //chip select for VDIP1_B

    configBasic(HELLO_MSG);

	outString("Hello world \n");
	configHeartbeat();            //heartbeat LED



	//config SPI for VDIP1
	VDIP_Init();

	VDIP_WriteFile("BARBIE.TXT", "THREE IS THE MAGICAL NUMBER.  YOUR HUBBY LOVES YOU!");
	VDIP_WriteFile("ABCDEF1.TXT", "This is a test.");
	VDIP_WriteFile("ABCDEF2.TXT", "This is a test.");
	VDIP_WriteFile("ABCDEF3.TXT", "This is a test.");
	VDIP_WriteFile("ABCDEF4.TXT", "This is a test.");
	VDIP_WriteFile("ABCDEF5.TXT", "This is a test.");
	VDIP_WriteFile("ABCDEF.TXT", "This is a test-1.");
	VDIP_WriteFile("ABCDEF.TXT", "This is a test-2.");
	VDIP_WriteFile("ABCDEF.TXT", "This is a test-3.");	
	VDIP_WriteFile("ABCDEF.TXT", "This is a test-4.");





//	VDIP_ListDir();
	while(1){}
	return 0;
}
开发者ID:tracktimerteam,项目名称:Track-Timer,代码行数:38,代码来源:vdip_example_snsl.c


示例18: RETURN_IS_FAIL

	//-------------------------------------------------------------------------
	//
	void Log::outMessage(const char* fmt, ...)
	{
		RETURN_IS_FAIL(m_pFileMessage);
		CACHE_VA_LIST(data, fmt);
		outString(m_pFileMessage, data, strlen(data));
	}
开发者ID:hcqmaker,项目名称:simple_game,代码行数:8,代码来源:Log.cpp


示例19: ifBinary

int ACGI::cgiOutputBinary(const char *pccMIMEType, const char *pccMIMESubType, const char *pccFilePath)
{
  if (m_posOut && pccMIMEType && pccMIMESubType && pccFilePath)
  {
    #ifdef _MSC_VER
      ifstream ifBinary(pccFilePath, ios::in|ios::binary);
    #elif defined(__BORLANDC__)
      ifstream ifBinary(pccFilePath, ios::in|ios::bin);
    #else
      //a_UNIX and others don't need the  processing
      ifstream ifBinary(pccFilePath, ios::in);
    #endif


#if defined(__BORLANDC__) || defined(__unix)
    if ((ifBinary.rdbuf())->is_open())
#else
    if (ifBinary.is_open())
#endif
    {
      //a_Get the length of the file
      ifBinary.seekg(0x0, ios::end);
      int iBytesRead = ifBinary.tellg();

      //a_MIME output
      mimeOut(pccMIMEType, pccMIMESubType, iBytesRead);

      //a_Rewind the file
      ifBinary.seekg(0x0, ios::beg);

      //a_Set stream to binary
      #if defined(_MSC_VER)
	      *this << ios::binary;
      #elif defined(__BORLANDC__)
        m_posOut.setf(ios::binary);
      #else
        //Probably UNIX and we do not care, everything is binary!
      #endif

      //Output the file
      char sBuffer[READ_BUFFER_SIZE];
      while (!ifBinary.eof())
      {
        ifBinary.read(sBuffer, READ_BUFFER_SIZE);
        iBytesRead = ifBinary.gcount();
        if (iBytesRead > 0x0)
          m_posOut->write(sBuffer, iBytesRead);
      }

      ifBinary.close();
      m_posOut->flush();
    }
    else
    {
      #ifdef _DEBUG_DUMP_
        mimeOut("text", "plain");
        outStringN("Filename: ");
        outString(pccFilePath);
        outStringN(" connot be opened!");
      #endif

      return 0x0;
    }
  }
  else
  {
    //a_You have to specify the MIME type/subtype for the binary output
    //a_and/or a non-NULL file path
    //a_and/or output stream variable is NULL
    assert(0x0);

    return 0x0;
  }

  return 0x1;
}
开发者ID:achacha,项目名称:freeCGI,代码行数:76,代码来源:a_cgi.cpp


示例20: outString

  void ceefit_call_spec FILEWRITER::Close()
  {
    if(Output != null)
    {
      STRING outString(StringWriter.ToString());
      DYNARRAY<unicode_char_t> convertSrcBuffer;
      DYNARRAY<char> outBuf;
      int srcLen = outString.Length();
      wchar_t* srcWchar = outString.GetBuffer();
      convertSrcBuffer.Reserve(srcLen);

      int i = -1;
      while(++i < srcLen)
      {
        convertSrcBuffer[i] = srcWchar[i];
      }

      outBuf.Reserve((srcLen*6) + 6);

      void* privateData;
      if(ExpectedEncoding->init)
      {
        ExpectedEncoding->init(&privateData);
      }

      unicode_char_t* src = &convertSrcBuffer[0];
      char* dest = &outBuf[0];
      fit_size_t incharsLeft = convertSrcBuffer.GetSize();
      fit_size_t outbytesLeft = outBuf.GetSize();
      fit_size_t maxbytesLeft = outbytesLeft;

      memset(dest, 0, outbytesLeft);    // clear the dest buffer

      if(ExpectedEncoding->reset)
      {
        ExpectedEncoding->reset(privateData, (char**) &dest, &outbytesLeft);
      }

      enum unicode_write_result writeResult;
      writeResult = ExpectedEncoding->write(privateData, &src, &incharsLeft, &dest, &outbytesLeft);

      if(ExpectedEncoding->destroy)
      {
        ExpectedEncoding->destroy(&privateData);
      }

      if(writeResult != unicode_write_ok)
      {
        STRING reason;

        reason = STRING("Failed to write output file ") + OutFilepath.GetBuffer() + " using " + ExpectedEncoding->names[0] + " encoding.";

        // must have hit a bad character, die monster die!
        throw new IOEXCEPTION(reason);
      }

      fwrite(&outBuf[0], maxbytesLeft - outbytesLeft, 1, Output);

      fclose(Output);
      Output = null;
    }
  }
开发者ID:juherr,项目名称:fit,代码行数:62,代码来源:writer.cpp



注:本文中的outString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ outTime函数代码示例发布时间:2022-05-30
下一篇:
C++ outStream函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap