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


C++ Console类代码示例

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


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

示例1: jsConsolePrototypeFunctionTimeEnd

JSValue JSC_HOST_CALL jsConsolePrototypeFunctionTimeEnd(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSConsole::s_info))
        return throwError(exec, TypeError);
    JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
    Console* imp = static_cast<Console*>(castedThisObj->impl());
    ScriptCallStack callStack(exec, args, 1);
    const UString& title = valueToStringWithUndefinedOrNullCheck(exec, args.at(0));

    imp->timeEnd(title, &callStack);
    return jsUndefined();
}
开发者ID:Marforius,项目名称:qt,代码行数:13,代码来源:JSConsole.cpp

示例2: LoggerCore

void __stdcall LoggerCore(PVOID pVoid)
{
	char Temp[1024];
	// ----
	
	// ----
	while(true)
	{
		Sleep(100);
		g_Console.AddMessageToConsole(Temp);
		g_Console.LoadConsoleCommands(Temp);
	}
}
开发者ID:alin1337,项目名称:linkmania-hack,代码行数:13,代码来源:g_Console.cpp

示例3: toggleRenderMode

	void ConsoleCommands::toggleRenderMode(Console& console, const Console::Arguments& args, GameSettings& gameSettings)
	{
		gameSettings.setWireframe(!gameSettings.isWireframe());

		if (gameSettings.isWireframe())
		{
			console.printLine("Rendering mode switched to wireframe");
		}
		else
		{
			console.printLine("Rendering mode switched to solid");
		}
	}
开发者ID:michalweiser,项目名称:duel6r,代码行数:13,代码来源:ConsoleCommands.cpp

示例4: on_close_clicked

void FrostEdit::on_close_clicked() {

	Console* c = qobject_cast<Console*>(mApplicationOutput->currentWidget());
	if(c != nullptr) {
		QProcess* proc = c->getProcess();
		if(proc != nullptr) {
			if(c->running())
				c->closeProcess();
			mRunningApplication.removeAt(mRunningApplication.indexOf(proc));
			delete proc;
		}
	}
}
开发者ID:MaGetzUb,项目名称:FrostEdit,代码行数:13,代码来源:frostedit.cpp

示例5: DECLCALLBACK

/**
 * @interface_method_impl{PDMIVMMDEVCONNECTOR,pfnUpdateGuestStatus}
 */
DECLCALLBACK(void) vmmdevUpdateGuestStatus(PPDMIVMMDEVCONNECTOR pInterface, uint32_t uFacility, uint16_t uStatus,
                                           uint32_t fFlags, PCRTTIMESPEC pTimeSpecTS)
{
    PDRVMAINVMMDEV pDrv = RT_FROM_MEMBER(pInterface, DRVMAINVMMDEV, Connector);
    Console *pConsole = pDrv->pVMMDev->getParent();

    /* Store that information in IGuest */
    Guest* guest = pConsole->i_getGuest();
    AssertPtrReturnVoid(guest);

    guest->i_setAdditionsStatus((VBoxGuestFacilityType)uFacility, (VBoxGuestFacilityStatus)uStatus, fFlags, pTimeSpecTS);
    pConsole->i_onAdditionsStateChange();
}
开发者ID:mcenirm,项目名称:vbox,代码行数:16,代码来源:VMMDevInterface.cpp

示例6: memoryAttrGetter

static v8::Handle<v8::Value> memoryAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.Console.memory._get");
    Console* imp = V8Console::toNative(info.Holder());
    RefPtr<MemoryInfo> result = imp->memory();
    v8::Handle<v8::Value> wrapper = result.get() ? getDOMObjectMap().get(result.get()) : v8::Handle<v8::Value>();
    if (wrapper.IsEmpty()) {
        wrapper = toV8(result.get());
        if (!wrapper.IsEmpty())
            V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);
    }
    return wrapper;
}
开发者ID:Treeeater,项目名称:chrome_bindings,代码行数:13,代码来源:V8Console.cpp

示例7: jsConsolePrototypeFunctionAssert

JSValue JSC_HOST_CALL jsConsolePrototypeFunctionAssert(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSConsole::s_info))
        return throwError(exec, TypeError);
    JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
    Console* imp = static_cast<Console*>(castedThisObj->impl());
    ScriptCallStack callStack(exec, args, 1);
    bool condition = args.at(0).toBoolean(exec);

    imp->assertCondition(condition, &callStack);
    return jsUndefined();
}
开发者ID:Marforius,项目名称:qt,代码行数:13,代码来源:JSConsole.cpp

示例8: toggleShowFps

	void ConsoleCommands::toggleShowFps(Console& console, const Console::Arguments& args, GameSettings& gameSettings)
	{
		gameSettings.setShowFps(!gameSettings.isShowFps());
		
		if (gameSettings.isShowFps())
		{
			console.printLine("Fps counter shown");
		}
		else
		{
			console.printLine("Fps counter hidden");
		}
	}
开发者ID:michalweiser,项目名称:duel6r,代码行数:13,代码来源:ConsoleCommands.cpp

示例9: applicationCloseRequest

void FrostEdit::applicationCloseRequest(int id) {
	Console* c = qobject_cast<Console*>(mApplicationOutput->widget(id));
	if(c != nullptr) {
		QProcess* proc = c->getProcess();
		if(proc != nullptr) {
			if(proc->state() == QProcess::Running)
				proc->close();
			mRunningApplication.removeAt(mRunningApplication.indexOf(proc));
			delete proc;
		}
		mApplicationOutput->removeTab(id);
		delete c;
	}
}
开发者ID:MaGetzUb,项目名称:FrostEdit,代码行数:14,代码来源:frostedit.cpp

示例10: LoggerCore

void __stdcall LoggerCore(PVOID pVoid)
{
    char Temp[1024];
    // ----
    AllocConsole();
    SetConsoleTitleA(CONSOLETITLE);
    // ----
    while(true)
    {
        Sleep(100);
        g_Console.AddMessageToConsole(Temp);
        g_Console.LoadConsoleCommands(Temp);
    }
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:14,代码来源:g_Console.cpp

示例11: CreateConsoleAndDebugHud

void TowerApp::CreateConsoleAndDebugHud() {
    // Get default style
    ResourceCache *cache = GetSubsystem<ResourceCache>();
    XMLFile *xmlFile = cache->GetResource<XMLFile>("UI/DefaultStyle.xml");

    // Create console
    Console *console = engine_->CreateConsole();
    console->SetDefaultStyle(xmlFile);
    console->GetBackground()->SetOpacity(0.8f);

    // Create debug HUD.
    DebugHud *debugHud = engine_->CreateDebugHud();
    debugHud->SetDefaultStyle(xmlFile);
}
开发者ID:Batanick,项目名称:tower,代码行数:14,代码来源:Tower.cpp

示例12:

void Urho3DQtApplication::CreateConsoleAndDebugHud()
{
    // Get default style
    ResourceCache* cache = GetSubsystem<ResourceCache>();
    XMLFile* xmlFile = cache->GetResource<XMLFile>("UI/DefaultStyle.xml");

    // Create console
    Console* console = engine_->CreateConsole();
    console->SetDefaultStyle(xmlFile);

    // Create debug HUD.
    DebugHud* debugHud = engine_->CreateDebugHud();
    debugHud->SetDefaultStyle(xmlFile);
}
开发者ID:StrongCod3r,项目名称:Urho3D_and_Qt5_with_CMAKE,代码行数:14,代码来源:Urho3DQtApplication.cpp

示例13: jsConsolePrototypeFunctionTime

EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTime(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSConsole::s_info))
        return throwVMTypeError(exec);
    JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
    Console* imp = static_cast<Console*>(castedThis->impl());
    const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());

    imp->time(title);
    return JSValue::encode(jsUndefined());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:14,代码来源:JSConsole.cpp

示例14: lua_Util_listOptions

int lua_Util_listOptions(lua_State *lua) {
    // Get the console
    Console *console = dynamic_cast<Console *>(ScreenManager::instance()->getScreen(SCREEN_CONSOLE));
    Color4f white;
    Color4fSet((&white),1.0,1.0,1.0,1.0);

    // List options
    Config *settings = State::instance()->settings;
    for(std::map<std::string, ConfigOption>::iterator iter = settings->map()->begin(); iter != settings->map()->end(); iter++) {
        console->log(iter->first + " = " + iter->second.getString(),white);
    }

    return 0;
}
开发者ID:BlazingGriffin,项目名称:Distant-Star-Prototype,代码行数:14,代码来源:LuaUtil.cpp

示例15: DECLCALLBACK

DECLCALLBACK(int) vmmdevGetHeightReduction(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *heightReduction)
{
    PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
    Console *pConsole = pDrv->pVMMDev->getParent();

    if (!heightReduction)
        return VERR_INVALID_PARAMETER;
    IFramebuffer *framebuffer = pConsole->getDisplay()->getFramebuffer();
    if (framebuffer)
        framebuffer->COMGETTER(HeightReduction)((ULONG*)heightReduction);
    else
        *heightReduction = 0;
    return VINF_SUCCESS;
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:14,代码来源:VMMDevInterface.cpp


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