本文整理汇总了C++中message::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ message::getString方法的具体用法?C++ message::getString怎么用?C++ message::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类message
的用法示例。
在下文中一共展示了message::getString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processMessage
bool RemotePlugin::processMessage( const message & _m )
{
lock();
message reply_message( _m.id );
bool reply = false;
switch( _m.id )
{
case IdUndefined:
unlock();
return false;
case IdInitDone:
reply = true;
break;
case IdSampleRateInformation:
reply = true;
reply_message.addInt( Engine::mixer()->processingSampleRate() );
break;
case IdBufferSizeInformation:
reply = true;
reply_message.addInt( Engine::mixer()->framesPerPeriod() );
break;
case IdChangeInputCount:
m_inputCount = _m.getInt( 0 );
resizeSharedProcessingMemory();
break;
case IdChangeOutputCount:
m_outputCount = _m.getInt( 0 );
resizeSharedProcessingMemory();
break;
case IdChangeInputOutputCount:
m_inputCount = _m.getInt( 0 );
m_outputCount = _m.getInt( 1 );
resizeSharedProcessingMemory();
break;
case IdDebugMessage:
fprintf( stderr, "RemotePlugin::DebugMessage: %s",
_m.getString( 0 ).c_str() );
break;
case IdProcessingDone:
case IdQuit:
default:
break;
}
if( reply )
{
sendMessage( reply_message );
}
unlock();
return true;
}
示例2: processMessage
virtual bool processMessage( const message & _m )
{
switch( _m.id )
{
case IdQuit:
break;
case IdShowUI:
case IdHideUI:
case IdLoadSettingsFromFile:
case IdLoadPresetFromFile:
pthread_mutex_lock( &m_guiMutex );
m_guiMessages.push( _m );
pthread_mutex_unlock( &m_guiMutex );
break;
case IdSaveSettingsToFile:
{
LocalZynAddSubFx::saveXML( _m.getString() );
sendMessage( IdSaveSettingsToFile );
break;
}
case IdZasfPresetDirectory:
LocalZynAddSubFx::setPresetDir( _m.getString() );
break;
case IdZasfLmmsWorkingDirectory:
LocalZynAddSubFx::setLmmsWorkingDir( _m.getString() );
break;
default:
return RemotePluginClient::processMessage( _m );
}
return true;
}
示例3: processMessage
bool VstPlugin::processMessage( const message & _m )
{
switch( _m.id )
{
case IdVstPluginWindowID:
m_pluginWindowID = _m.getInt();
if( m_embedMethod == "none" )
{
#ifdef LMMS_BUILD_WIN32
// We're changing the owner, not the parent,
// so this is legal despite MSDN's warning
SetWindowLongPtr( (HWND)(intptr_t) m_pluginWindowID,
GWLP_HWNDPARENT,
(LONG_PTR) gui->mainWindow()->winId() );
#endif
#ifdef LMMS_BUILD_LINUX
XSetTransientForHint( QX11Info::display(),
m_pluginWindowID,
gui->mainWindow()->winId() );
#endif
}
break;
case IdVstPluginEditorGeometry:
m_pluginGeometry = QSize( _m.getInt( 0 ),
_m.getInt( 1 ) );
break;
case IdVstPluginName:
m_name = _m.getQString();
break;
case IdVstPluginVersion:
m_version = _m.getInt();
break;
case IdVstPluginVendorString:
m_vendorString = _m.getQString();
break;
case IdVstPluginProductString:
m_productString = _m.getQString();
break;
case IdVstCurrentProgram:
m_currentProgram = _m.getInt();
break;
case IdVstCurrentProgramName:
m_currentProgramName = _m.getQString();
break;
case IdVstProgramNames:
m_allProgramNames = _m.getQString();
break;
case IdVstPluginUniqueID:
// TODO: display graphically in case of failure
printf("unique ID: %s\n", _m.getString().c_str() );
break;
case IdVstParameterDump:
{
m_parameterDump.clear();
const int num_params = _m.getInt();
int p = 0;
for( int i = 0; i < num_params; ++i )
{
VstParameterDumpItem item;
item.index = _m.getInt( ++p );
item.shortLabel = _m.getString( ++p );
item.value = _m.getFloat( ++p );
m_parameterDump["param" + QString::number( item.index )] =
QString::number( item.index ) + ":" +
/*uncomented*/ /*QString( item.shortLabel )*/ QString::fromStdString(item.shortLabel) + ":" +
QString::number( item.value );
}
break;
}
default:
return RemotePlugin::processMessage( _m );
}
return true;
}
示例4: return
bool operator==(message& m) const{
std::cout << "me han comparado" << std::endl;
return (m.getString() == str);
}
示例5: processMessage
bool VstPlugin::processMessage( const message & _m )
{
switch( _m.id )
{
case IdVstBadDllFormat:
m_badDllFormat = true;
break;
case IdVstPluginWindowID:
m_pluginWindowID = _m.getInt();
break;
case IdVstPluginEditorGeometry:
m_pluginGeometry = QSize( _m.getInt( 0 ),
_m.getInt( 1 ) );
break;
case IdVstPluginName:
m_name = _m.getQString();
break;
case IdVstPluginVersion:
m_version = _m.getInt();
break;
case IdVstPluginVendorString:
m_vendorString = _m.getQString();
break;
case IdVstPluginProductString:
m_productString = _m.getQString();
break;
case IdVstCurrentProgram:
m_currentProgram = _m.getInt();
break;
case IdVstCurrentProgramName:
m_currentProgramName = _m.getQString();
break;
case IdVstProgramNames:
m_allProgramNames = _m.getQString();
break;
case IdVstPluginUniqueID:
// TODO: display graphically in case of failure
printf("unique ID: %s\n", _m.getString().c_str() );
break;
case IdVstParameterDump:
{
m_parameterDump.clear();
const int num_params = _m.getInt();
int p = 0;
for( int i = 0; i < num_params; ++i )
{
VstParameterDumpItem item;
item.index = _m.getInt( ++p );
item.shortLabel = _m.getString( ++p );
item.value = _m.getFloat( ++p );
m_parameterDump["param" + QString::number( item.index )] =
QString::number( item.index ) + ":" +
/*uncomented*/ /*QString( item.shortLabel )*/ QString::fromStdString(item.shortLabel) + ":" +
QString::number( item.value );
}
break;
}
default:
return RemotePlugin::processMessage( _m );
}
return true;
}