当前位置: 首页>>代码示例>>C++>>正文


C++ outString函数代码示例

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


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


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