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

C++ printInfo函数代码示例

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

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



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

示例1: stopManagers

void ZoneServerImplementation::shutdown() {
	//datagramService->setHandler(NULL);

	stopManagers();

	info("shutting down zones", true);

	for (int i = 0; i < zones->size(); ++i) {
		ManagedReference<Zone*> zone = zones->get(i);

		if (zone != NULL) {
			zone->stopManagers();
			//info("zone references " + String::valueOf(zone->getReferenceCount()), true);
		}
	}

	zones->removeAll();

	info("zones shut down", true);

	printInfo();

	datagramService = NULL;

	info("shut down complete", true);
}
开发者ID:ModTheGalaxy,项目名称:mtgserver,代码行数:26,代码来源:ZoneServerImplementation.cpp


示例2: loadGame

/**
* Laedt, falls moeglich, ein Spiel. Das Spiel wird im GameState gespeichert, dieser muss also ein Pointer sein.
*/
void loadGame(struct GameState *gs, char *filename) {
	char fullFilename[255];
	FILE *file;

	sprintf(fullFilename, "savegames/%s.sav", filename); // kompletten Dateinamen erzeugen

	file = fopen(fullFilename, "r"); // Datei oeffnen. r = read
	if (file == NULL) {
		printError("Oeffnen der Savegame-Datei fehlgeschlagen.\n");
		return;
	}

	char ai0 = (*gs).ai0;
	char ai1 = (*gs).ai1;
	size_t size1 = fread(gs, sizeof(*gs), 1, file);
	(*gs).ai0 = ai0;
	(*gs).ai1 = ai1;

	size_t size2 = fread(history, sizeof(history) * sizeof(char), 1, file);

	fclose(file); // Datei schliessen.

	if (size1 == 0 || size2 == 0) {
		printError("Laden fehlgeschlagen: Der Inhalt des Savegames ist inkompatibel.\n");
	} else {
		printInfo("Spiel geladen.\n");
	}
}
开发者ID:chriskonnertz,项目名称:c2-chess,代码行数:31,代码来源:c2.c


示例3: main

int main(int argc, char **argv)
{
    device = &freenect.createDevice<MyFreenectDevice>(0);
    device->startVideo();
    device->startDepth();
    
    glutInit(&argc, argv);

    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
    glutInitWindowSize(640, 480);
    glutInitWindowPosition(0, 0);

    window = glutCreateWindow("LibFreenect");
    glClearColor(0.45f, 0.45f, 0.45f, 0.0f);

    glEnable(GL_DEPTH_TEST);
    glEnable(GL_ALPHA_TEST);
    glAlphaFunc(GL_GREATER, 0.0f);

    glMatrixMode(GL_PROJECTION);
    gluPerspective(50.0, 1.0, 900.0, 11000.0);
        
    glutDisplayFunc(&DrawGLScene);
    glutIdleFunc(&idleGLScene);
    glutReshapeFunc(&resizeGLScene);
    glutKeyboardFunc(&keyPressed);
    glutMotionFunc(&mouseMoved);
    glutMouseFunc(&mouseButtonPressed);

    printInfo();

    glutMainLoop();

    return 0;
}
开发者ID:nitrogenlogic,项目名称:libfreenect,代码行数:35,代码来源:cpp_pc_view.cpp


示例4: computeProjectionMatrix

void VoxelGridGPU::setUniformCellSizeFromResolutionAndMapping(float width,
		float height, int resX, int resY, int resZ) {

	if ( ( width / resX )  != ( height / resY) )
	{
		DEBUGLOG->log( "Resolution and dimensions are in an unequal ratio. Cannot compute uniform cell size");
		return;
	}

	this->width = width;
	this->height = height;
	this->resX = resX;
	this->resY = resY;
	this->resZ = resZ;

	this->cellSize = ( width / resX );

	this->depth = this->cellSize * resZ;

	computeProjectionMatrix();

	computeWorldToVoxel();

	printInfo();
}
开发者ID:Secumfex,项目名称:VoxelizationFramework,代码行数:25,代码来源:VoxelGridTools.cpp


示例5: main

int main(int argc, char *argv[])
{
	char *path = ".";
	if (argc >= 2) {
		path = argv[1];
	}

	DIR *dp = opendir(path);
	if (dp == NULL) {
		perror("Open file");
		exit(1);
	}
	chdir(argv[1]);
	struct dirent *dirbuf;
	struct stat statbuf;
	char *filename[N];
	int index = 0;
	while ((dirbuf = readdir(dp)) != NULL) {
		if ((strcmp(dirbuf->d_name, ".") == 0) || (strcmp(dirbuf->d_name, "..") == 0)) {
			continue;
		}
		filename[index] = (char *)calloc(strlen(dirbuf->d_name), sizeof(char));
		strcpy(filename[index], dirbuf->d_name);
		index++;
	}
	qsort(filename, index - 1, sizeof(filename[0]), cmp);
	for (int i = 0; i < index; i++) {
		printInfo(filename[i]);
	}
	closedir(dp);
	return 0;
}
开发者ID:guoqunabc,项目名称:C-Cplusplus,代码行数:32,代码来源:main.c


示例6: literalTypes

void literalTypes()
{
    std::cout << "##############################################################\n";
    std::cout << " Literal Types:\n";
    std::cout << "##############################################################\n";
    printInfo("1", 1);
    printInfo("1U", 1U);
	printInfo("1L", 1L);
	printInfo("0xFF", 0xFF);
	printInfo("0xFFFF", 0xFFFFF);
	printInfo("0xFFFFFFFF", 0xFFFFFFFF);
	printInfo("0xFFFFFFFFFFFFFFFF", 0xFFFFFFFFFFFFFFFF);
    printInfo("1LLU", 1LLU);
    printInfo("1.2L", 1.2L);
    printInfo("1.2", 1.2);
}
开发者ID:maxrake,项目名称:CppCourse,代码行数:16,代码来源:literalTypes.cpp


示例7: m_currentFBOIndex

Renderer::Renderer(const RenderContext &context) :

m_currentFBOIndex(false),
m_gBuffer(NULL), m_shaderGBuffer(NULL),
m_ping(NULL), m_pong(NULL),
m_firstRender(true),
m_shaderSFQ(NULL),

m_useDeferredShading(false),  m_shaderDSLighting(NULL), m_shaderDSCompositing(NULL), m_dsLightRootNode(NULL), m_dsLightColor(NULL),
m_useReflections(false),      m_shaderRLR(NULL),
m_useAntiAliasing(false),     m_shaderFXAA(NULL),
m_useBloom(false),            m_shaderBloom(NULL),
m_useBlur(false),			  m_shaderBlur(NULL),
m_useRadialBlur(false),		  m_shaderRadialBlur(NULL),
m_useDoF(false),			  m_shaderDoF(NULL), m_shaderDepth(NULL),
m_useSSAO(false),             m_shaderSSAOcalc(NULL), m_shaderSSAOblur(NULL), m_shaderSSAOfinal(NULL),
m_useShadowMapping(false),    m_shaderShadowMapping(NULL), m_smCam(NULL),

m_currentViewMatrix(glm::mat4()), m_currentProjectionMatrix(glm::mat4()),
m_windowWidth(0), m_windowHeight(0)

{
  m_sfq.loadBufferData();
  context.bindContext();
  printInfo();
}
开发者ID:lisawerner,项目名称:GeKo,代码行数:26,代码来源:Renderer.cpp


示例8: _tmain

int _tmain(int argc, _TCHAR* argv[])
{
	int iNum = 0;

	if(argc != 2 && argc !=3)
	{
		printInfo(argc, argv);
		return -1;
	}

	ListInterfaceInfomation();

	//请用户选择一个网卡 
	printf("Enter the interface number (1-%d):",gDevIndex); 
	scanf("%d", &iNum); 
	if(iNum <= 0)
	{
		printf("input error\n");
		return -1;
	}

	ListInterfaceInfomation(GetDev, &iNum);

	ArpSpoof(
		szInterfaceName,
		argv[1],
		argv[2],
		1000 /*ms*/
		);

	return 0;
}
开发者ID:KangLin,项目名称:ArpSpoof,代码行数:32,代码来源:ArpConsole.cpp


示例9: ANativeActivity_onCreate

void ANativeActivity_onCreate(ANativeActivity* activity,
        void* savedState, size_t savedStateSize) {
	printInfo(activity);
	LOGI(2, "-----ANativeActivity_onCreate");
	//the callbacks the Android framework will call into a native application
	//all these callbacks happen on the main thread of the app, so we'll
	//need to make sure the function doesn't block
	activity->callbacks->onStart = onStart;
	activity->callbacks->onResume = onResume;
	activity->callbacks->onSaveInstanceState = onSaveInstanceState;
	activity->callbacks->onPause = onPause;
	activity->callbacks->onStop = onStop;
	activity->callbacks->onDestroy = onDestroy;
	activity->callbacks->onWindowFocusChanged = onWindowFocusChanged;
	activity->callbacks->onNativeWindowCreated = onNativeWindowCreated;
	activity->callbacks->onNativeWindowResized = onNativeWindowResized;
	activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeeded;
	activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed;
	activity->callbacks->onInputQueueCreated = onInputQueueCreated;
	activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed;
	activity->callbacks->onContentRectChanged = onContentRectChanged;
	activity->callbacks->onConfigurationChanged = onConfigurationChanged;
	activity->callbacks->onLowMemory = onLowMemory;

	activity->instance = NULL;
}
开发者ID:GitNooby,项目名称:notes,代码行数:26,代码来源:NativeActivityOne.cpp


示例10: aiDeepMove

/**
* Gibt 1 zurueck, wenn ein Zug ausgefuehrt wurde, sonst 0.
*/
char aiDeepMove(struct GameState *gameState) {
	char from 			= 0;
	char to 			= 0;
	char coordFrom[]	= "??";
	char coordTo[]		= "??";
	int eval 			= 0;
	int bestEvalAdding 	= 0;

	if (loadOpeningBookMove(gameState, coordFrom, coordTo)) {
		from = convertCoordToIndex(coordFrom);
		to = convertCoordToIndex(coordTo);
		printf("Eroeffnungsbuch: ");
	} else {
		timeStamp = time(NULL);
		aiDeepSearch(gameState, &from, &to, &eval, &bestEvalAdding, 0);
		if (debugMode) printDev("Calculation time: %i\n", (int) time(NULL) - timeStamp);
	}

	if (from != 0) {
		convertIndexToCoord(from, coordFrom); 
		convertIndexToCoord(to, coordTo);

		if ((*gameState).board[to] == 0) {
			printInfo("KI zieht mit %c von %s nach %s.\n", getPieceSymbolAsChar((*gameState).board[from]), coordFrom, coordTo);	
		} else {
			printInfo("KI zieht mit %c von %s nach %s und schlaegt %c.\n", getPieceSymbolAsChar((*gameState).board[from]), coordFrom, coordTo, getPieceSymbolAsChar((*gameState).board[to]));	
		}
		
		doMovePartial(gameState, from, to);
		doMoveFinal(gameState, from, to);

		return 1;
	} else {
		printf("Blah 3!\n"); exit(1);
		if (eval <= -valueCheckMate) {
			if (isCheck(gameState)) {
				printInfo("KI ist Schachmatt!\n");		
			} else {
				printInfo("KI gibt auf: Schachmatt in wenigen Zuegen!\n");	
			}
		} else {
			printError("Fehler: Keine Zuege gefunden, aber nicht Schachmatt!"); // DEBUG
		}
		
		return 0;
	}
}
开发者ID:chriskonnertz,项目名称:c2-chess,代码行数:50,代码来源:c2.c


示例11: switch

// Called every time there is a window event
void AppWindow::glutKeyboard ( unsigned char key, int x, int y )
 {
   float inc=0.025f;
   switch ( key )
    { case 27 : exit(1); // Esc was pressed
      case 'i' : printInfo(); return;

      case ' ': _viewaxis = !_viewaxis; break;
      //case 'z' : _normals=!_normals; break;
      case 'n' : _flatn=!_flatn;
                 std::cout<<(_flatn?"Flat...\n":"Smooth...\n");
                 _texturedCylinder.flat(_flatn);
                 break;
      case 'p' : _phong=!_phong;
                  std::cout<<"Switching to "<<(_phong?"Phong shader...\n":"Gouraud shader...\n");
                 _texturedCylinder.phong(_phong);
                 break;
      case 'q' :
            numfaces++;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
      case 'a':
            numfaces = (numfaces > 3) ? numfaces - 1 : numfaces;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
      case 'w':
            rt += inc;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
      case 's':
            rt = (rt - inc > 0.05f) ? rt - inc : rt;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
        case 'e':
            rb += inc;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
        case 'd':
            rb = (rb - inc > 0.05f) ? rb - inc : rb;
            _texturedCylinder.build(rt, rb, 1.0f, numfaces);
            break;
        case 'z':
            textureChoice = !textureChoice;
            break;
        case 'x':
            blendFactor = (blendFactor + inc > 1.0f) ? 1.0f : blendFactor + inc;
            break;
        case 'c':
            blendFactor = (blendFactor - inc < 0.0f) ? 0.0f : blendFactor - inc;
            break;
      
            
      default : return;
	}
     
   if ( _normals ) _lines.build ( _texturedCylinder.NL, GsColor::blue );
     
    redraw(); 
 }
开发者ID:Teknoman117,项目名称:cse170projects,代码行数:60,代码来源:app_window.cpp


示例12: printInfo

void
sprite::loadJson(Json::Value json)
{
    qw = json.get("qw", 32).asInt();
    qh = json.get("qh", 32).asInt();

    for (int i = 0 ; !json["box"][i].isNull() ;i++ )
    {
        struct box boxv;

        Json::Value box = json["box"][i];

        boxv.x = box.get("x", 0).asInt();
        boxv.y = box.get("y", 0).asInt();
        boxv.w = box.get("w", 0).asInt();
        boxv.h = box.get("h", 0).asInt();
        boxv.bits = box.get("bits", 0).asInt();

        boxes.push_back(boxv);
    }

    for (int i = 0 ; !json["frames"][i].isNull() ; i++)
    {
        struct frame framev;
        Json::Value frame = json["frames"][i];

        framev.x = frame.get("x", 0.0).asFloat();
        framev.y = frame.get("y", 0.0).asFloat();
        framev.w = frame.get("w", 0.0).asFloat();
        framev.h = frame.get("h", 0.0).asFloat();
        framev.ox = frame.get("ox", 0.0).asFloat();
        framev.oy = frame.get("oy", 0.0).asFloat();

        for (int y = 0 ; frame["box"][y].isInt() ;y++ )
        {
            framev.boxes.push_back(frame["box"][y].asInt());
        }

        frames.push_back(framev);
    }

    for (int i = 0 ; !json["animations"][i].isNull() ; i++)
    {
        struct animation aniv;
        Json::Value animation = json["animations"][i];

        aniv.loop = animation.get("loop", 1).asInt();
        aniv.interval = animation.get("interval", 10).asInt();
        aniv.next = animation.get("next", 0).asInt();

        for (int y = 0 ; animation["frames"][y].isInt() ;y++ )
        {
            aniv.frames.push_back(animation["frames"][y].asInt());
        }
        animations.push_back(aniv);
    }

    printInfo();
}
开发者ID:kvisle,项目名称:nengine,代码行数:59,代码来源:sprite.cpp


示例13: update

void KoilItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){

    if(isSelected())    brushColor = selectedColor;
    else                brushColor = normalColor;
    update();
    emit printInfo(QString(""));
    QGraphicsItem::hoverLeaveEvent(event);
}
开发者ID:luigialberti,项目名称:dolomites,代码行数:8,代码来源:koilitem.cpp


示例14: smokeScenario

void smokeScenario(int paper, int tobacco, int matches)
{
	initializeSuplies(paper, tobacco, matches);
	printInfo();
	forkSmokers();
	wait();
	printf("AGENT IS DONE!\n-----\n");
}
开发者ID:chas11man,项目名称:eecs338-assignment1,代码行数:8,代码来源:AGENT.c


示例15: main_t4

int main_t4(int argc, char *argv[]){
	pthread_t tid;
	sun_pthread_create(&tid, NULL, thread_func, NULL);
	printInfo("main thread");
	sleep(1);

	exit(0);
}
开发者ID:yamorn,项目名称:linux-network,代码行数:8,代码来源:simple_thread.c


示例16: switch

void TicTacToe::on_gameField_buttonClicked(QAbstractButton *button)
{
	switch(_currPlayer)
	{
	case 1:
		button->setIcon(QPixmap::fromImage(*_player1));
		button->setWhatsThis("1");
		break;
	case 2:
		button->setIcon(QPixmap::fromImage(*_player2));
		button->setWhatsThis("2");
		break;
	}
	button->setEnabled(false);
	bool won = checkWin();
	if(won || full())
	{
		if(won)
		{
			QListIterator<QAbstractButton *> i(gameField->buttons());
			while (i.hasNext())
			{
				QAbstractButton *qab = i.next();
				qab->setEnabled(false);
			}
			switch(_currPlayer)
			{
			case 1:
				scorePlayer1->setText(QString::number(++_score1));
				printInfo("Player 1 wins!");
				break;
			case 2:
				scorePlayer2->setText(QString::number(++_score2));
				printInfo("Player 2 wins!");
				break;
			}
		}
		turnPlayer1->setText("");
		turnPlayer2->setText("");
		buttonNewGame->setEnabled(true);
	}
	else
	{
		switchPlayer();
	}
}
开发者ID:CodeGamer,项目名称:Labyrinth,代码行数:46,代码来源:TicTacToe.cpp


示例17: printInfo

void Squad::printFullInfo()
{
	printInfo();

	for (int i = 0; i < (int)setup.size(); i++)
	{
		Broodwar->printf("%s, %d/%d", setup.at(i).type.getName().c_str(), setup.at(i).current, setup.at(i).no);
	}
}
开发者ID:rarosu,项目名称:FnulAI,代码行数:9,代码来源:Squad.cpp


示例18: sqrt

void futureAdagrad::updateParams (float *params, float *grad, int rank) {
	for (int i=0; i<m_nParamSize; i++) {
		m_histSquareGrad[i] += grad[i] * grad[i];
		m_mapHistSquareGrad[rank][i] = m_histSquareGrad[i] - m_mapHistSquareGrad[rank][i];
		params[i] -= m_learningRate * grad[i] / sqrt(m_mapHistSquareGrad[rank][i] + 0.1f);
	}
	printInfo(m_mapHistSquareGrad[rank]);
	memcpy(m_mapHistSquareGrad[rank], m_histSquareGrad, sizeof(float) * m_nParamSize);
}
开发者ID:Lemma1,项目名称:ParallelSGD,代码行数:9,代码来源:future_adagrad.cpp


示例19: LoadAsn

int LoadAsn (AsnInfo *asn) {

    /* Arguments:
     **  input		 i: Name of input file or image
     **  asn			io: Association info structure
     */

    extern int status;
    void printInfo (AsnInfo *);
    int SetInput (AsnInfo *);
    int SetAsnSingle (AsnInfo *);
    int GetAsnTable (AsnInfo *);
    int GetGlobalInfo (AsnInfo *);

    /* Determine whether input is a single file, an association table,
     ** or an entry from an association table. */
    if (SetInput (asn))
        return (status);

    if (asn->process == FULL) {
        sprintf (MsgText,"LoadAsn:  Processing FULL Association");
    } else if (asn->process == PARTIAL) {
        sprintf (MsgText,"LoadAsn:  Processing PART of Association");
    } else {
        sprintf (MsgText,"LoadAsn:  Processing SINGLE exposure");
    }
    trlmessage (MsgText);

    /* Read in global info from ASN table's primary header */	
    if (GetGlobalInfo (asn)) {
        trlerror (" Problem getting primary header information.");
        return (status);
    }


    /* Read in ASN table, and load appropriate members info into memory */
    if (asn->process == SINGLE) {
        /* Set ASN structure values to process a single exposure */
        if (SetAsnSingle (asn))
            return (status);
    } else {
        if (GetAsnTable (asn))
            return (status);
    }

    if (asn->debug) { 
        sprintf (MsgText,"LoadAsn:  Read in ASN table %s ", asn->asn_table);
        trlmessage (MsgText);
    }


    /* Print a summary of information about the association */
    if (asn->verbose)
        printInfo (asn);

    return (status);
}
开发者ID:brechmos-stsci,项目名称:hstcal,代码行数:57,代码来源:wf3table.c


示例20: out

void AttractorFractal::saveToFile(string name) {
  string fn = name + ".info";
  std::ofstream out(fn);
  std::streambuf *coutbuf = cout.rdbuf();
  cout.rdbuf(out.rdbuf());

  printInfo();
  cout.rdbuf(coutbuf);
}
开发者ID:kyeah,项目名称:Genetic-Fractals,代码行数:9,代码来源:fractal.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ printInt函数代码示例发布时间:2022-05-30
下一篇:
C++ printIndent函数代码示例发布时间: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