本文整理汇总了C++中SUIArguments::GetAsString方法的典型用法代码示例。如果您正苦于以下问题:C++ SUIArguments::GetAsString方法的具体用法?C++ SUIArguments::GetAsString怎么用?C++ SUIArguments::GetAsString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SUIArguments
的用法示例。
在下文中一共展示了SUIArguments::GetAsString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessEvent
void CFlashUIFromArrayNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo )
{
if (event == eFE_Activate && IsPortActive( pActInfo, eI_Array ))
{
SUIArguments args( GetPortString( pActInfo, eI_Array ).c_str());
ActivateOutput( pActInfo, eO_Count, args.GetArgCount());
SUIArguments leftOver;
int port = eO_Val1;
for (int i = 0; i < args.GetArgCount(); ++i)
{
string arg;
args.GetArg( i, arg );
if (port + i < eO_LeftOver)
{
ActivateOutput( pActInfo, port + i, arg );
}
else
{
leftOver.AddArgument( arg );
}
}
if (leftOver.GetArgCount() > 0)
{
ActivateOutput( pActInfo, eO_LeftOver, string( leftOver.GetAsString()));
}
}
}
示例2: FlushNextEvent
void CFlashUIEventNode::FlushNextEvent( SActivationInfo* pActInfo )
{
if (m_events.size() > 0)
{
const std::pair<SUIArguments, int> &data = m_events.get();
const SUIArguments & args = data.first;
bool bTriggerEvent = true;
const int checkValue = GetPortInt(pActInfo, eI_CheckPort);
if (checkValue >= 0)
{
bTriggerEvent = false;
CRY_ASSERT_MESSAGE(checkValue < args.GetArgCount(), "Port does not exist!" );
if (checkValue < args.GetArgCount())
{
string val = GetPortString(pActInfo, eI_CheckValue);
string compstr;
args.GetArg(checkValue).GetValueWithConversion(compstr);
bTriggerEvent = val == compstr;
}
}
if (bTriggerEvent)
{
int end = m_eventDesc.InputParams.Params.size();
string val;
int i = 0;
for (; i < end; ++i)
{
CRY_ASSERT_MESSAGE( i < args.GetArgCount(), "UIEvent received wrong number of arguments!" );
ActivateDynOutput( i < args.GetArgCount() ? args.GetArg(i) : TUIData(string("")), m_eventDesc.InputParams.Params[i], pActInfo, i + 2 );
}
if (m_eventDesc.InputParams.IsDynamic)
{
SUIArguments dynarg;
for (; i < args.GetArgCount(); ++i)
{
if (args.GetArg( i, val ))
dynarg.AddArgument( val );
}
ActivateOutput( pActInfo, end + eO_DynamicPorts, string( dynarg.GetAsString()));
}
ActivateOutput( pActInfo, eO_OnEvent, true );
ActivateOutput( pActInfo, eO_OnInstanceId, data.second );
}
m_events.pop();
}
}
示例3: EndActionInt
//------------------------------------------------------------------------------------
void CUIActionManager::EndActionInt( IUIAction* pAction, const SUIArguments& args )
{
FUNCTION_PROFILER(GetISystem(), PROFILE_ACTION);
if ( pAction && m_actionStateMap[ pAction ] ) // only allow to end actions that are started
{
m_actionStateMap[pAction] = false;
UIACTION_LOG( "UIAction %s end (Args: %s)", pAction->GetName(), args.GetAsString() );
if (pAction->GetType() == IUIAction::eUIAT_LuaScript)
((CFlashUIAction*)pAction)->EndScript();
for (TActionListener::Notifier notifier(m_listener); notifier.IsValid(); notifier.Next())
notifier->OnEnd( pAction, args );
}
}
示例4: StartActionInt
//------------------------------------------------------------------------------------
void CUIActionManager::StartActionInt( IUIAction* pAction, const SUIArguments& args )
{
FUNCTION_PROFILER(GetISystem(), PROFILE_ACTION);
if ( pAction && pAction->IsValid() )
{
m_actionStateMap[ pAction ] = true;
EnableActionInt( pAction, true );
UIACTION_LOG( "UIAction %s start (Args: %s)", pAction->GetName(), args.GetAsString() );
if (pAction->GetType() == IUIAction::eUIAT_LuaScript)
((CFlashUIAction*)pAction)->StartScript(args);
for (TActionListener::Notifier notifier(m_listener); notifier.IsValid(); notifier.Next())
notifier->OnStart( pAction, args );
}
}
示例5: EndAction
//------------------------------------------------------------------------------------
void CUIActionManager::EndAction( IUIAction* pAction, const SUIArguments& args )
{
if (!m_bAcceptRequests) return;
if ( pAction && pAction->IsValid() )
{
#ifndef _RELEASE
if (m_actionEndMap.find(pAction) != m_actionEndMap.end())
{
UIACTION_WARNING( "UIAction %s already ended! Old args will be discarded!", pAction->GetName() );
}
#endif
m_actionEndMap[pAction] = args;
stl::member_find_and_erase(m_actionStartMap, pAction);
UIACTION_LOG( "UIAction %s end request (Args: %s)", pAction->GetName(), args.GetAsString() );
return;
}
UIACTION_ERROR( "EndAction failed! UIAction %s not valid!", pAction ? pAction->GetName() : "NULL" );
}
示例6: ProcessEvent
void CFlashUIArrayBaseNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo )
{
if (event == eFE_Initialize)
{
UpdateObjectDesc( GetPortString( pActInfo, GetInputPort(eI_UIArray)), pActInfo, m_isTemplate );
}
else if (event == eFE_Activate)
{
if (IsPortActive( pActInfo, GetInputPort(eI_UIArray)))
{
UpdateObjectDesc( GetPortString( pActInfo, GetInputPort(eI_UIArray)), pActInfo, m_isTemplate );
}
if (IsTemplate() && !UpdateTmplDesc( GetPortString( pActInfo, GetInputPort(eI_TemplateInstanceName)), pActInfo ))
return;
if (GetElement())
{
const int instanceId = GetPortInt( pActInfo, GetInputPort(eI_InstanceID));
if (IsPortActive ( pActInfo, GetInputPort(eI_Set)))
{
SUIArguments values( GetPortString( pActInfo, GetInputPort(eI_Value)).c_str());
SPerInstanceCall1< const SUIArguments & > caller;
caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUIArrayBaseNode::SetArray), values );
ActivateOutput( pActInfo, eO_OnSet, true );
}
else if (IsPortActive( pActInfo, GetInputPort(eI_Get)))
{
SUIArguments out;
SPerInstanceCall1< SUIArguments & > caller;
if (!caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUIArrayBaseNode::GetArray), out, false ))
{
UIACTION_WARNING( "FG: UIElement \"%s\" called get Array for multiple instances! (passed instanceId %i), referenced at node \"%s\"", GetElement()->GetName(),instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));
}
ActivateOutput( pActInfo, eO_Value, string( out.GetAsString()));
}
}
}
}
示例7: OnEnd
void CFlashUIActionNode::OnEnd( IUIAction* pAction, const SUIArguments& args )
{
if ( m_pAction != NULL && pAction == m_pAction )
{
UI_STACK_PUSH( m_endStack, std::make_pair( pAction, args ), "OnEnd UIAction %s (%s)", pAction->GetName(), args.GetAsString() );
if ( m_bWasStarted )
{
m_bWasStarted = false;
UI_STACK_PUSH( m_selfEndStack, std::make_pair( pAction, args ), "OnEnd (self) UIAction %s (%s)", pAction->GetName(), args.GetAsString() );
}
}
}
示例8: OnStart
void CFlashUIActionNode::OnStart( IUIAction* pAction, const SUIArguments& args )
{
if ( m_pAction != NULL && pAction == m_pAction )
{
UI_STACK_PUSH(m_startStack, std::make_pair( pAction, args ), "OnStart UIAction %s (%s)", pAction->GetName(), args.GetAsString() );
}
}
示例9: OnUIEvent
void CFlashUIEventNode::OnUIEvent( IUIElement* pSender, const SUIEventDesc &event, const SUIArguments &args )
{
if (m_eventDesc == event)
{
UI_STACK_PUSH(m_events, std::make_pair(args, pSender->GetInstanceID()), "OnFlashEvent %[email protected]%i %s (%s)", pSender->GetName(), pSender->GetInstanceID(), event.sDisplayName, args.GetAsString());
}
}