本文整理汇总了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();
}
示例2: LoggerCore
void __stdcall LoggerCore(PVOID pVoid)
{
char Temp[1024];
// ----
// ----
while(true)
{
Sleep(100);
g_Console.AddMessageToConsole(Temp);
g_Console.LoadConsoleCommands(Temp);
}
}
示例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");
}
}
示例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;
}
}
}
示例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();
}
示例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;
}
示例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();
}
示例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");
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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());
}
示例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;
}
示例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;
}