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


C++ LLPluginMessage::generate方法代码示例

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


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

示例1: sendMessage

// This is the viewer process (the parent process)
//
// This function is called to send a message to the plugin.
void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
    if(message.hasValue("blocking_response"))
    {
        mBlocked = false;

        // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
        mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
    }
    if (message.hasValue("gorgon"))
    {
        // After this message it is expected that the plugin will not send any more messages for a long time.
        mBlocked = true;
    }

    std::string buffer = message.generate();
#if LL_DEBUG
    if (message.getName() == "mouse_event")
    {
        LL_DEBUGS("PluginMouseEvent") << "Sending: " << buffer << LL_ENDL;
    }
    else
    {
        LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;
    }
#endif
    writeMessageRaw(buffer);

    // Try to send message immediately.
    if(mMessagePipe)
    {
        mMessagePipe->pumpOutput();
    }
}
开发者ID:PlayerDagostino,项目名称:SingularityViewer,代码行数:37,代码来源:llpluginprocessparent.cpp

示例2: sendMessage

void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
	
	std::string buffer = message.generate();
	LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;	
	writeMessageRaw(buffer);
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:7,代码来源:llpluginprocessparent.cpp

示例3: sendMessageToParent

// This is the SLPlugin process (the child process).
// This is not part of a DSO.
//
// This function is called by SLPlugin to send 'message' to the viewer (the parent process).
void LLPluginProcessChild::sendMessageToParent(const LLPluginMessage &message)
{
	std::string buffer = message.generate();

	LL_DEBUGS("Plugin") << "Sending to parent: " << buffer << LL_ENDL;

	// Write the serialized message to the pipe.
	writeMessageRaw(buffer);
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:13,代码来源:llpluginprocesschild.cpp

示例4: sendMessageToPlugin

// This is the SLPlugin process.
// This is not part of a DSO.
//
// This function is called by SLPlugin to send a message (originating from
// SLPlugin itself) to the loaded DSO. It calls LLPluginInstance::sendMessage.
void LLPluginProcessChild::sendMessageToPlugin(const LLPluginMessage &message)
{
	if (mInstance)
	{
		std::string buffer = message.generate();
		
		LL_DEBUGS("Plugin") << "Sending to plugin: " << buffer << LL_ENDL;
		LLTimer elapsed;
		
		mInstance->sendMessage(buffer);
		
		mCPUElapsed += elapsed.getElapsedTimeF64();
	}
	else
	{
		LL_WARNS("Plugin") << "mInstance == NULL" << LL_ENDL;
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:23,代码来源:llpluginprocesschild.cpp

示例5: sendMessage

void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
	if(message.hasValue("blocking_response"))
	{
		mBlocked = false;

		// reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
		mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
	}
	
	std::string buffer = message.generate();
	LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;	
	writeMessageRaw(buffer);
	
	// Try to send message immediately.
	if(mMessagePipe)
	{
		mMessagePipe->pumpOutput();
	}
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:20,代码来源:llpluginprocessparent.cpp

示例6: sendMessage

/**
 * Send message to plugin loader shell.
 *
 * @param[in] message Message data being sent to plugin loader shell
 *
 */
void MediaPluginBase::sendMessage(const LLPluginMessage &message)
{
    std::string output = message.generate();
    mHostSendFunction(output.c_str(), &mHostUserData);
}
开发者ID:kow,项目名称:Astra-Viewer-2,代码行数:11,代码来源:media_plugin_base.cpp

示例7:

	/* virtual */ void receivePluginMessage(const LLPluginMessage &message)
	{
		LL_INFOS("plugin_process_launcher") << "received message: \n" << message.generate() << LL_ENDL;
	}
开发者ID:9skunks,项目名称:imprudence,代码行数:4,代码来源:plugin_process_launcher.cpp


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