Пример #1
0
FALCON_FUNC renderLayout(Falcon::VMachine* vm)
{
    RenderWindow* win = RenderWindowManager::getRenderWindow("ROOT");
    Falcon::Item* loc = vm->param(0);
    if(loc == NULL || !loc->isString()) {
        throw new Falcon::ParamError(Falcon::ErrorParam(Falcon::e_inv_params, __LINE__).extra("S"));
    }

    std::string rloc = Falcon::AutoCString(loc->asString()).c_str();
    poco_assert(win != NULL);
    win->displayWindow(win->renderLayout(rloc));
    vm->retnil();
}
Пример #2
0
FALCON_FUNC FWrapLog(Falcon::VMachine* vm)
{
	Falcon::Item* lglv = vm->param(0);
	Falcon::Item* message = vm->param(1);
	
	if((lglv == NULL || !lglv->isInteger())
		|| (message == NULL || !message->isString()))
	{
		throw new Falcon::ParamError(Falcon::ErrorParam(Falcon::e_inv_params, __LINE__)
		.extra("LOG_LEVEL, String"));
	}
	
	PE::Logging::Levels lvl = PE::Logging::Levels(lglv->forceInteger());
	std::string mess = FString::fromStringS(*message->asString());

	Log::log(lvl, mess);
}