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


C++ ELOG函数代码示例

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


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

示例1: Log

	void Log(LogTypes::LOG_LEVELS level, const char *msg)
	{
		switch (level)
		{
		case LogTypes::LVERBOSE:
		case LogTypes::LDEBUG:
		case LogTypes::LINFO:
			ILOG("%s", msg);
			break;
		case LogTypes::LERROR:
			ELOG("%s", msg);
			break;
		case LogTypes::LWARNING:
			WLOG("%s", msg);
			break;
		case LogTypes::LNOTICE:
		default:
			ILOG("%s", msg);
			break;
		}
	}
开发者ID:arg274,项目名称:ppsspp,代码行数:21,代码来源:NativeApp.cpp

示例2: CML_Gain_Offsets_Config

/*------------完成CML的的发射链路设置Config_for_Gain and Offsets---------------------*/
INT8U CML_Gain_Offsets_Config(void)
{
   u16 Program_Block4[6] = {0x8000,0x0000,0x0530,0x130e,0x0000,0x0000};   
   u8 i;//Upper_8_Bit,Lower_8_Bit,;
   
//   CBUS_SendTwoByte(0xc1,0x00,0x00);
//   Chack_Prog_flag();
//   CBUS_SendTwoByte(0xc1,0x02,0x30);
   for(i = 0;i < 6;i++)
   {
	   CBUS_Send16U(PROG_REG,Program_Block4[i]);
	   if(CML_NO_ERR!=Chack_Prog_flag(CML_TIME_OUT)){
	   	ELOG("timeout err\n");
		return CML_ERR;
	   };
	   DelayMS(10);// Delay #10

	}
	return CML_NO_ERR;
//	CBUS_SendTwoByte(0xB1,0x12,0xc0);//12,00   //Input Gain: Output1->MOD1, Output2->MOD2,DISC->Input1
}
开发者ID:liuxizhen2009,项目名称:zlggui,代码行数:22,代码来源:CML.c

示例3: parse_mode_json

/*
 * Start parsing the received JSON string
 *
 */
void parse_mode_json(char *json) {
    /* FIXME: Fasciliate stream processing, i.e. allow starting to interpret
     * JSON in chunks */
    struct mode_json_params params;

    mode binding;

    params.cur_key = NULL;
    params.json = json;
    params.mode = &binding;

    yajl_handle handle;
    yajl_status state;

    handle = yajl_alloc(&mode_callbacks, NULL, (void *)&params);

    state = yajl_parse(handle, (const unsigned char *)json, strlen(json));

    /* FIXME: Propper error handling for JSON parsing */
    switch (state) {
        case yajl_status_ok:
            break;
        case yajl_status_client_canceled:
        case yajl_status_error:
            ELOG("Could not parse mode event!\n");
            exit(EXIT_FAILURE);
            break;
    }

    /* We don't want to indicate default binding mode */
    if (strcmp("default", i3string_as_utf8(params.mode->name)) == 0)
        I3STRING_FREE(params.mode->name);

    /* Set the new binding mode */
    set_current_mode(&binding);

    yajl_free(handle);

    FREE(params.cur_key);
}
开发者ID:Acidburn0zzz,项目名称:i3,代码行数:44,代码来源:mode.c

示例4: init_glslang

bool AndroidVulkanContext::Init(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) {
	if (g_Vulkan) {
		return false;
	}

	init_glslang();

	g_LogOptions.breakOnError = true;
	g_LogOptions.breakOnWarning = true;
	g_LogOptions.msgBoxOnError = false;

	ILOG("Creating vulkan context");
	Version gitVer(PPSSPP_GIT_VERSION);
	g_Vulkan = new VulkanContext("PPSSPP", gitVer.ToInteger(), VULKAN_FLAG_PRESENT_MAILBOX | VULKAN_FLAG_PRESENT_FIFO_RELAXED);
	if (!g_Vulkan->GetInstance()) {
		ELOG("Failed to create vulkan context");
		return false;
	}

	ILOG("Creating vulkan device");
	if (g_Vulkan->CreateDevice(0) != VK_SUCCESS) {
		ILOG("Failed to create vulkan device: %s", g_Vulkan->InitError().c_str());
		return false;
	}
	int width = desiredBackbufferSizeX;
	int height = desiredBackbufferSizeY;
	if (!width || !height) {
		width = pixel_xres;
		height = pixel_yres;
	}
	ILOG("InitSurfaceAndroid: width=%d height=%d", width, height);
	g_Vulkan->InitSurfaceAndroid(wnd, width, height);
	if (g_validate_) {
		int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
		g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions);
	}
	g_Vulkan->InitObjects(true);

	return true;
}
开发者ID:njh08d,项目名称:ppsspp,代码行数:40,代码来源:app-android.cpp

示例5: NativeInitGraphics

void NativeInitGraphics()
{
	INFO_LOG(BOOT, "NativeInitGraphics - should only be called once!");
	gl_lost_manager_init();
	ui_draw2d.SetAtlas(&ui_atlas);

	screenManager = new ScreenManager();
	if (boot_filename.empty()) {
		screenManager->switchScreen(new LogoScreen(boot_filename));
	} else {
		// Go directly into the game.
		screenManager->switchScreen(new EmuScreen(boot_filename));
	}
	// screenManager->switchScreen(new FileSelectScreen());

	UIShader_Init();

	UITheme theme = {0};
	theme.uiFont = UBUNTU24;
	theme.uiFontSmall = UBUNTU24;
	theme.uiFontSmaller = UBUNTU24;
	theme.buttonImage = I_BUTTON;
	theme.buttonSelected = I_BUTTON_SELECTED;
	theme.checkOn = I_CHECKEDBOX;
	theme.checkOff = I_SQUARE;

	UIInit(&ui_atlas, theme);

	uiTexture = new Texture();
	if (!uiTexture->Load("ui_atlas.zim"))
	{
		ELOG("Failed to load texture");
	}
	uiTexture->Bind(0);

	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:40,代码来源:NativeApp.cpp

示例6: socket

bool Server::Listen4(int port) {
	listener_ = socket(AF_INET, SOCK_STREAM, 0);
	if (listener_ < 0)
		return false;

	struct sockaddr_in server_addr;
	memset(&server_addr, 0, sizeof(server_addr));
	server_addr.sin_family = AF_INET;
	server_addr.sin_addr.s_addr = htonl(INADDR_ANY);
	server_addr.sin_port = htons(port);

	int opt = 1;
	// Enable re-binding to avoid the pain when restarting the server quickly.
	setsockopt(listener_, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));

	if (bind(listener_, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0) {
		closesocket(listener_);
		ELOG("Failed to bind to port %i. Bailing.", port);
		return false;
	}

	fd_util::SetNonBlocking(listener_, true);

	// 1024 is the max number of queued requests.
	if (listen(listener_, 1024) < 0) {
		closesocket(listener_);
		return false;
	}

	socklen_t len = sizeof(server_addr);
	if (getsockname(listener_, (struct sockaddr *)&server_addr, &len) == 0) {
		port = ntohs(server_addr.sin_port);
	}

	ILOG("HTTP server started on port %i", port);
	port_ = port;

	return true;
}
开发者ID:AmesianX,项目名称:ppsspp,代码行数:39,代码来源:http_server.cpp

示例7: fread_idle_cb

// Called by the by the 'idle' handle to emulate a reading event
static void fread_idle_cb(uv_idle_t *handle)
{
  uv_fs_t req;
  RStream *rstream = handle_get_rstream((uv_handle_t *)handle);

  rstream->uvbuf.len = rbuffer_available(rstream->buffer);
  rstream->uvbuf.base = rbuffer_write_ptr(rstream->buffer);

  // the offset argument to uv_fs_read is int64_t, could someone really try
  // to read more than 9 quintillion (9e18) bytes?
  // upcast is meant to avoid tautological condition warning on 32 bits
  uintmax_t fpos_intmax = rstream->fpos;
  if (fpos_intmax > INT64_MAX) {
    ELOG("stream offset overflow");
    preserve_exit();
  }

  // Synchronous read
  uv_fs_read(
      uv_default_loop(),
      &req,
      rstream->fd,
      &rstream->uvbuf,
      1,
      (int64_t) rstream->fpos,
      NULL);

  uv_fs_req_cleanup(&req);

  if (req.result <= 0) {
    uv_idle_stop(rstream->fread_idle);
    return;
  }

  // no errors (req.result (ssize_t) is positive), it's safe to cast.
  size_t nread = (size_t) req.result;
  rbuffer_produced(rstream->buffer, nread);
  rstream->fpos += nread;
}
开发者ID:axblount,项目名称:neovim,代码行数:40,代码来源:rstream.c

示例8: TiXmlDeclaration

void PluginManager::Save() {
  TiXmlDocument doc;
  doc.LinkEndChild(new TiXmlDeclaration("1.0", "UTF-8", ""));

  TiXmlElement* xmlRoot = new TiXmlElement("Plugins");
  xmlRoot->SetAttribute("version", "1.0");
  doc.LinkEndChild(xmlRoot);

  for (int i = 0; i < plugins_.size(); i++) {
    Plugin* plugin = plugins_.at(i);

    TiXmlElement* xmlPlugin = new TiXmlElement("Plugin");
    xmlRoot->LinkEndChild(xmlPlugin);

    XmlUtil::AppendTextElement(xmlPlugin, "UUID", plugin->GetUUID());
    XmlUtil::AppendTextElement(xmlPlugin, "Enabled", plugin->IsEnabled());
  }

  FilePaths::CreateSettingsDirectory();
  bool saved = doc.SaveFile(FilePaths::GetPluginSettingsFile().mb_str());
  if (!saved) ELOG(_T("Could not save plugin.xml file"));
}
开发者ID:DocWhoChat,项目名称:appetizer,代码行数:22,代码来源:PluginManager.cpp

示例9: send

bool Buffer::FlushSocket(uintptr_t sock) {
  for (size_t pos = 0, end = data_.size(); pos < end; ) {
    int sent = send(sock, &data_[pos], end - pos, 0);
    if (sent < 0) {
      ELOG("FlushSocket failed");
      return false;
    }
    pos += sent;

    // Buffer full, don't spin.
    if (sent == 0) {
#ifdef _WIN32
      Sleep(1);
#else
      sleep(1);
#endif
    }
  }

  data_.resize(0);
  return true;
}
开发者ID:Ced2911,项目名称:native,代码行数:22,代码来源:buffer.cpp

示例10: getenv

void *update_ipc(void *data)
{
	char *socket_path = getenv("I3SOCK");
	char *i3_default_sock_path = "/tmp/i3-ipc.sock";

	main_loop = ev_default_loop(0);

	if (socket_path == NULL) {
		ELOG("No Socket Path Specified, default to %s\n", i3_default_sock_path);
		socket_path = i3_default_sock_path;
	}

	if (init_connection(socket_path)) {
		/* We subscribe to the i3-events we need */
		subscribe_events();

		/* Get current workspaces from i3. */
		i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL);
	}

	ev_loop(main_loop, 0);
}
开发者ID:phnom,项目名称:i3applet,代码行数:22,代码来源:i3_workspace_applet.c

示例11: ELOG

	void OrganizationShowHandller::handleIqID( const IQ& iq, int context )
	{
		json::jobject jobj = json::jobject();
		if (iq.m_subtype != gloox::IQ::Result)
		{
			universal_resource error_desc;
			ELOG("app")->error(WCOOL(L"组织结构树查看权限获取错误") + boost::shared_ptr<gloox::Tag>(iq.tag())->xml());
			error_desc = XL("biz.OrganizationShowHandller.fail");
			callback_(true, error_desc,jobj);
		}
		else
		{
			boost::shared_ptr<gloox::Tag> ptag(iq.findExtension(kExtUser_iq_filter_organization_show)->tag());
			if (ptag)
			{
				gloox::Tag* tag_basic_permission = ptag->findChild("basic_permissions");
				if (tag_basic_permission)
				{
					ConstTagList ptag_list = tag_basic_permission->findTagList("//permission");
					for (ConstTagList::iterator it = ptag_list.begin(); it != ptag_list.end(); ++it)
					{
						if ((*it)->findAttribute("name") == "show_organization")
						{
							if ((*it)->cdata() == "true")
							{
								jobj["is_show_organization"] = true;
							}
							else
							{
								jobj["is_show_organization"] = false;
							}
							callback_(false, XL(""),jobj);
						}
					}
				}
			}
		}
	}
开发者ID:iVideo,项目名称:weishao,代码行数:38,代码来源:organization_show_hadler.cpp

示例12: ILOG

/**
 * Check if the new version of the app is available
 * @param silent If this is set to false, no error messages will be displayed to the user
 */
void MiniLaunchBar::CheckForNewVersion(bool silent) {

  ILOG(_T("Looking for an update..."));
  UpdaterVersionInfo versionInfo;
  bool success = Updater::CheckVersion(CHECK_VERSION_URL, versionInfo);
  
  if (!success) {
    ELOG(_T("Could not get update information"));
    if (!silent) MessageBoxes::ShowError(_("Could not get update information"));
    return;
  }

  wxString thisVersion = VersionInfo::GetVersionString();

  ILOG(wxString::Format(_T("This version: %s"), thisVersion));
  ILOG(wxString::Format(_T("Current version: %s"), versionInfo.Version));
  ILOG(wxString::Format(_T("Page URL: %s"), versionInfo.PageURL));
  ILOG(wxString::Format(_T("Download URL: %s"), versionInfo.DownloadURL));
  ILOG(wxString::Format(_T("Release notes: %s"), versionInfo.ReleaseNotes));

  if (Updater::CompareVersions(thisVersion, versionInfo.Version) >= 0) {
    ILOG(_T("=> No new version"));
    if (!silent) MessageBoxes::ShowInformation(_("You have the latest version."));
    return;
  } else {
    ILOG(_T("=> A new version is available"));
  }

  wxString message;
  message = wxString::Format(_("A new version of Appetizer is available!\n\nYour version: %s\nNew version: %s\nRelease notes: %s\nDo you wish to download it now?"), thisVersion, versionInfo.Version, versionInfo.ReleaseNotes);
      
  int result = MessageBoxes::ShowConfirmation(message, 2|8, wxEmptyString, false, _("New version of Appetizer"));

  if (result == wxID_YES) {
    bool wasLaunched = ::wxLaunchDefaultBrowser(versionInfo.PageURL, wxBROWSER_NEW_WINDOW);
    if (!wasLaunched) MessageBoxes::ShowError(_("Error launching web browser"));
  }
}
开发者ID:tanaga9,项目名称:appetizer,代码行数:42,代码来源:main.cpp

示例13: LOG

// -----------------------------------------------------------------------------
// CSTSApduEvent::Dispatch
// from CJavaEvent. Copies response data to java side and calls java side method
// with parameters set before.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
void CSTSApduEvent::Dispatch(JNIEnv* aJni, jobject aPeer)
{
    LOG(ESATSA, EInfo, "+ CSTSApduEvent::Dispatch");

    // create java byte array
    jbyteArray byteArray;
    if (iResponseData)
    {
        LOG(ESATSA, EInfo, "CSTSApduEvent::Dispatch: Responsedata is ready");
        byteArray = aJni->NewByteArray(iResponseData->Size());
        if (byteArray)
        {
            LOG(ESATSA, EInfo, "CSTSApduEvent::Dispatch: create byteArray now");
            S60CommonUtils::CopyToJava((*aJni), *iResponseData, byteArray, 0,
                                       iResponseData->Size());
        }
    }
    else
    {
        LOG(ESATSA, EInfo, "CSTSApduEvent::Dispatch: responseData is NOT ready!");
        byteArray = aJni->NewByteArray(0);
    }

    if (!byteArray)
    {
        ELOG(ESATSA, "STS::CSTSApduEvent::Dispatch - Failed to create ByteArray");
        iError = KErrNoMemory;
    }
    LOG(ESATSA, EInfo, "call java side method with parameters");
    // call java side method with parameters
    jclass sessionClass = aJni->FindClass(
                              "com/nokia/mj/impl/satsa/APDUConnectionImpl");
    jmethodID mOperationCompleteCallBack = aJni->GetMethodID(sessionClass,
                                           "operationComplete", "(II[B)V");
    aJni->CallVoidMethod(aPeer, mOperationCompleteCallBack, iId, iError,
                         byteArray);

}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:44,代码来源:cstsapduevent.cpp

示例14: ELOG

  bool SoundHandler::loadFromFile(const typeAssetID assetID, sf::SoundBuffer& asset)
  {
    // Start with a return result of false
    bool succ = false;

    // Retrieve the filename for this asset
    std::string anFilename = assetID;

    // Was a valid filename found? then attempt to load the asset from anFilename
    if(anFilename.length() > 0)
    {
      // Load the asset from a file
      succ = asset.loadFromFile(anFilename);
    }
    else
    {
      ELOG() << "SoundHandler::loadFromFile(" << assetID
        << ") No filename provided!" << std::endl;
    }

    // Return anResult of true if successful, false otherwise
    return succ;
  }
开发者ID:Ostkaka,项目名称:MGE,代码行数:23,代码来源:SoundHandler.cpp

示例15: guard

void ScreenManager::processFinishDialog() {
	if (dialogFinished_) {
		std::lock_guard<std::recursive_mutex> guard(inputLock_);
		// Another dialog may have been pushed before the render, so search for it.
		Screen *caller = dialogParent(dialogFinished_);
		for (size_t i = 0; i < stack_.size(); ++i) {
			if (stack_[i].screen == dialogFinished_) {
				stack_.erase(stack_.begin() + i);
			}
		}

		if (!caller) {
			ELOG("ERROR: no top screen when finishing dialog");
		} else if (caller != topScreen()) {
			// The caller may get confused if we call dialogFinished() now.
			WLOG("Skipping non-top dialog when finishing dialog.");
		} else {
			caller->dialogFinished(dialogFinished_, dialogResult_);
		}
		delete dialogFinished_;
		dialogFinished_ = nullptr;
	}
}
开发者ID:takashow,项目名称:ppsspp,代码行数:23,代码来源:screen.cpp


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