• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetPortString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Execute

	virtual bool Execute(SActivationInfo *pActInfo)
	{
		bool bResult = false;

		SXmlDocument *doc;
		if (GDM->GetXmlDocument(pActInfo->pGraph, &doc) && doc->active)
		{
			const char* childName = GetPortString(pActInfo, EIP_Name);
			const int childIndex = GetPortInt(pActInfo, EIP_Index);
			const int childCount = doc->active->getChildCount();
			XmlNodeRef ref = NULL;
			for (int i = 0, realCount = 0; i < childCount; ++i)
			{
				ref = doc->active->getChild(i);
				if (ref && strcmp(ref->getTag(), childName) == 0)
				{
					if (++realCount >= childIndex)
					{
						doc->active->deleteChildAt(i);
						bResult = true;
						break;
					}
				}
			}
		}

		return bResult;
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:28,代码来源:FlowXmlNavNodes.cpp


示例2: GetDynStartPort

void CFlashUIFunctionNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo )
{
	if (event == eFE_Activate && IsPortActive(pActInfo, eI_Call))
	{
		int          port = GetDynStartPort();
		SUIArguments args;
		for (TUIParams::const_iterator iter = m_funcDesc.InputParams.Params.begin(); iter != m_funcDesc.InputParams.Params.end(); ++iter)
		{
			GetDynInput( args, *iter, pActInfo, port++ );
		}

		TUIData   res;
		const int instanceId = GetPortInt( pActInfo, eI_InstanceID );

		if (IsTemplate() && !UpdateTmplDesc( GetPortString(pActInfo, eI_TemplateInstanceName), pActInfo ))
			return;

		SPerInstanceCall2< const SUIArguments &, TUIData & > caller;
		caller.Execute(m_pElement, instanceId, functor(*this, &CFlashUIFunctionNode::CallFunction), args, res);

		string out;
		res.GetValueWithConversion( out );
		ActivateOutput( pActInfo, eO_RetVal, out  );

		ActivateOutput( pActInfo, eO_OnCall, true );
	}
}
开发者ID:joewan,项目名称:pycmake,代码行数:27,代码来源:FlashUIElementNodes.cpp


示例3: WeaponAccessoryChanged

	virtual void WeaponAccessoryChanged(CWeapon* pWeapon, const char* accessory, bool bAdd)
	{
		const char* actWeaponName = pWeapon->GetEntity()->GetClass()->GetName();

		const string& weaponName = GetPortString(&m_actInfo, 0);
		if (weaponName.empty() == false && stricmp(actWeaponName, weaponName.c_str()) != 0)
			return;

		const string& itemName = GetPortString(&m_actInfo, 1);
		if (itemName.empty() == false && stricmp(accessory, itemName.c_str()) != 0)
			return;

		string name (actWeaponName);
		string accName (accessory);
		ActivateOutput(&m_actInfo, 0, name);
		ActivateOutput(&m_actInfo, bAdd ? 1 : 2, accName);
	}
开发者ID:RenEvo,项目名称:dead6,代码行数:17,代码来源:WeaponNodes.cpp


示例4: ProcessEvent

	void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo)
	{
#if !defined(_RELEASE)
		if (event == eFE_Initialize && IsPortActive(pActInfo, eIP_Draw))
		{
			m_waitTime = 0.0f;
			pActInfo->pGraph->SetRegularlyUpdated(pActInfo->myID, false);
		}
		else if (event == eFE_Activate && IsPortActive(pActInfo, eIP_Draw))
		{
			IEntity* pEntity = pActInfo->pEntity;
			if (pEntity)
			{
				IPersistantDebug* pPersistentDebug = CCryAction::GetCryAction()->GetIPersistantDebug();
				if (pPersistentDebug)
				{
					SEntityTagParams params;
					params.entity = pEntity->GetId();
					params.text = GetPortString(pActInfo, eIP_Message);
					params.size = GetPortFloat(pActInfo, eIP_FontSize);
					params.color = ColorF(GetPortVec3(pActInfo, eIP_Color), 1.0f);
					params.visibleTime = GetPortFloat(pActInfo, eIP_Time);
					params.fadeTime = GetPortFloat(pActInfo, eIP_FadeTime);
					params.viewDistance = GetPortFloat(pActInfo, eIP_ViewDistance);
					params.staticId = GetPortString(pActInfo, eIP_StaticID);
					params.column = GetPortInt(pActInfo, eIP_Column);
					params.tagContext = "FG_DrawEntityTagAdvanced";

					pPersistentDebug->AddEntityTag(params);

					m_waitTime = gEnv->pTimer->GetFrameStartTime() + (params.fadeTime + params.visibleTime);
					pActInfo->pGraph->SetRegularlyUpdated(pActInfo->myID, true);
				}
			}
		}
		else if (event == eFE_Update)
		{
			if (m_waitTime < gEnv->pTimer->GetFrameStartTime())
			{
				m_waitTime.SetSeconds(0.0f);
				pActInfo->pGraph->SetRegularlyUpdated(pActInfo->myID, false);
				ActivateOutput(pActInfo, eOP_Done, GetPortAny(pActInfo, eIP_Draw));
			}
		}
#endif
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:46,代码来源:FlowDebugNodes.cpp


示例5: GetRtpcID

	void GetRtpcID(SActivationInfo* const pActInfo)  
	{
		string const& rRtpcName = GetPortString(pActInfo, eIn_RtpcName);
		if (!rRtpcName.empty())
		{
			gEnv->pAudioSystem->GetAudioRtpcID(rRtpcName.c_str(), m_nRtpcID);
		}
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:8,代码来源:FlowAudioRtpcNode.cpp


示例6: UpdateObjectDesc

void CFlashUIVariableBaseNode::ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo )
{
	if (event == eFE_Initialize)
	{
		UpdateObjectDesc( GetPortString( pActInfo, GetInputPort(eI_UIVariable)), pActInfo, m_isTemplate );
	}
	else if (event == eFE_Activate)
	{
		if (IsPortActive( pActInfo, GetInputPort(eI_UIVariable)))
		{
			UpdateObjectDesc( GetPortString( pActInfo, GetInputPort(eI_UIVariable)), pActInfo, m_isTemplate );
		}

		if (IsTemplate() && !UpdateTmplDesc( GetPortString( pActInfo, GetInputPort(eI_TemplateInstanceName)), pActInfo ))
			return;

		const int instanceId = GetPortInt( pActInfo, GetInputPort(eI_InstanceID));
		if (IsPortActive ( pActInfo, GetInputPort(eI_Set)))
		{
			const TFlowInputData &data = GetPortAny( pActInfo, GetInputPort(eI_Value));
			TUIData               value;
			ConvertToUIData(data, value, pActInfo);

			SPerInstanceCall1< const TUIData & > caller;
			caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUIVariableBaseNode::SetVariable), value );

			ActivateOutput( pActInfo, eO_OnSet, true );
		}
		if (IsPortActive( pActInfo, GetInputPort(eI_Get)))
		{
			TUIData out;

			SPerInstanceCall1< TUIData & > caller;
			if (!caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUIVariableBaseNode::GetVariable), out, false ))
			{
				UIACTION_WARNING( "FG: UIElement \"%s\" called get Variable for multiple instances! (passed instanceId %i), referenced at node \"%s\"", GetElement()->GetName(),instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));
			}

			string res;
			out.GetValueWithConversion( res );
			ActivateOutput( pActInfo, eO_Value, res );
		}
	}

}
开发者ID:joewan,项目名称:pycmake,代码行数:45,代码来源:FlashUIElementNodes.cpp


示例7: IsPortActive

void CFlowNode_SimulateInput::ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
{
	if(event == eFE_Activate)
	{
		bool isPressPort = IsPortActive(pActInfo, eInputPorts_Press);
		bool isReleasePort = IsPortActive(pActInfo, eInputPorts_Release);
		bool isHoldPort = IsPortActive(pActInfo, eInputPorts_Hold);

		bool triggerResponse = false;
		int playerInputEvent;
		int nodeOutput;

		if(isPressPort)
		{
			triggerResponse = true;
			playerInputEvent = eAAM_OnPress;
			nodeOutput = eOutputPort_Pressed;
		}
		else if(isHoldPort)
		{
			triggerResponse = true;
			playerInputEvent = eAAM_OnHold;
			nodeOutput = eOutputPort_Held;
		}
		else if(isReleasePort)
		{
			triggerResponse = true;
			playerInputEvent = eAAM_OnRelease;
			nodeOutput = eOutputPort_Released;
		}

		if(triggerResponse)
		{
			CActor *pClientActor = static_cast<CActor *>(g_pGame->GetIGameFramework()->GetClientActor());

			if(pClientActor)
			{
				if(pClientActor->GetActorClass() == CPlayer::GetActorClassType())
				{
					CPlayer *pClientPlayer = static_cast<CPlayer *>(pClientActor);
					const char *action = GetPortString(pActInfo, eInputPorts_Action).c_str();
					const float inputValue = GetPortFloat(pActInfo, eInputPorts_Value);

					IPlayerInput *pPlayerInput = pClientPlayer->GetPlayerInput();

					if(pPlayerInput)
					{
						CODECHECKPOINT(SimulateInput_ProcessEvent_SendAction);
						pPlayerInput->OnAction(action, playerInputEvent, isPressPort ? clamp(inputValue, 0.0f, 1.0f) : 0.0f);
					}
				}
			}

			ActivateOutput(pActInfo, nodeOutput, true);
		}
	}
}
开发者ID:super-nova,项目名称:NovaRepo,代码行数:57,代码来源:FeatureTestNode.cpp


示例8: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo)
	{
		if (!m_pDialogMan)
			return;

		switch (event)
		{
		case eFE_Initialize:
			if (m_bDisplayed)
				m_pDialogMan->CancelDialog(m_id);
			m_ActInfo = *pActInfo;
			break;
		case eFE_Activate:
			if (IsPortActive(pActInfo, eI_Display))
			{
				if (m_bDisplayed)
				{
					gEnv->pLog->LogWarning("FG: Dialog is already displayed!");
					ActivateOutput(pActInfo, eO_OnShow, true);
					return;
				}
				EDialogType type = (EDialogType) GetPortInt(pActInfo, eI_Type);
				const string title = GetPortString(pActInfo, eI_Title);
				const string message = GetPortString(pActInfo, eI_Message);
				const string param = GetPortString(pActInfo, eI_Param);
				m_id = m_pDialogMan->DisplayDialog(type, title.c_str(), message.c_str(), param.c_str(), this);
				m_bDisplayed = true;
				ActivateOutput(pActInfo, eO_OnShow, true);
			}
			if (IsPortActive(pActInfo, eI_Cancel))
			{
				if (!m_bDisplayed)
				{
					gEnv->pLog->LogWarning("FG: Dialog is not displayed!");
					ActivateOutput(&m_ActInfo, eO_Param, string(""));
					ActivateOutput(&m_ActInfo, eO_Result, 2);
					return;
				}
				m_pDialogMan->CancelDialog(m_id);
			}
			break;
		}
	}
开发者ID:Orav,项目名称:CryMono,代码行数:43,代码来源:UIDialogs.cpp


示例9: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch(event)
		{
		case eFE_Activate:
			{
				if (IsPortActive(pActInfo, eIP_Get))
				{
					IPlayerProfile* pProfile = NULL;
					if (IPlayerProfileManager *pProfileMan = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager())
					{
						const char* user = pProfileMan->GetCurrentUser();
						pProfile = pProfileMan->GetCurrentProfile(user);
						TFlowInputData data;
						if (!pProfile || pProfile->GetAttribute(GetPortString(pActInfo, eIP_Name), data))
						{
							ActivateOutput(pActInfo, eOP_Value, data);
						}
						else
						{
							ActivateOutput(pActInfo, eOP_Error, 1);
						}
					}
				}

				if (IsPortActive(pActInfo, eIP_Set))
				{
					IPlayerProfile* pProfile = NULL;
					if (IPlayerProfileManager *pProfileMan = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager())
					{
						const char *user = pProfileMan->GetCurrentUser();
						pProfile = pProfileMan->GetCurrentProfile( user );
						if(!pProfile || !pProfile->SetAttribute(GetPortString(pActInfo, eIP_Name), GetPortAny(pActInfo, eIP_Set)))
						{
							ActivateOutput(pActInfo, eOP_Error, 1);
						}
					}
				}
			}
			break;
		}
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:42,代码来源:FlowOnlineStatsNodes.cpp


示例10: switch

void CFlowAddModelToPostRender::ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
{
	switch (event)
	{
	case eFE_Initialize:
		break;
	case eFE_Activate:
		if (IsPortActive(pActInfo, IN_ADD))
		{
			INDENT_LOG_DURING_SCOPE();
			//Create scene
			CMenuRender3DModelMgr *renderModels = CMenuRender3DModelMgr::GetInstance();
			
			if (renderModels)
			{
				//Add model with animation if needed
				const float playSpeed = GetPortFloat(pActInfo, IN_ANIM_SPEED);
				const char * usePlayerModelName = GetPortString(pActInfo, IN_MODEL);
				const char * useAnimation = GetPortString(pActInfo, IN_ANIM);

				CMenuRender3DModelMgr::SModelParams params;
				params.pFilename = usePlayerModelName;
				params.posOffset = GetPortVec3(pActInfo, IN_ENTITYPOS);
				params.rot = Ang3(GetPortVec3(pActInfo, IN_ENTITYROT));
				params.continuousRot = Ang3(GetPortVec3(pActInfo, IN_ENTITYCONTROT));
				params.scale = GetPortFloat(pActInfo, IN_SCALE);
				params.pName = "char";
				params.screenRect[0] = GetPortVec3(pActInfo, IN_SCREENUV).x;
				params.screenRect[1] = GetPortVec3(pActInfo, IN_SCREENUV).y;
				params.screenRect[2] = GetPortVec3(pActInfo, IN_SCREENU2V2).x;
				params.screenRect[3] = GetPortVec3(pActInfo, IN_SCREENU2V2).y;

				if(strcmp(usePlayerModelName, "") != 0)
					characterModelIndex = renderModels->AddModel(params);

				if(strcmp(useAnimation, "") != 0)
					renderModels->UpdateAnim(characterModelIndex, useAnimation, playSpeed);
			}
		}
		break;
	}
}
开发者ID:danielasun,项目名称:dbho-GameSDK,代码行数:42,代码来源:ModelToHudFlowNodes.cpp


示例11: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		if (event == eFE_Activate && IsPortActive(pActInfo, EIP_Trigger))
		{
			IActor* pActor = GetInputActor( pActInfo );
			if (!pActor)
				return;

			IInventory *pInventory = pActor->GetInventory();
			if (!pInventory)
				return;

			const bool& addPack = GetPortBool(pActInfo, EIP_AddToggle);
			const string& packName = GetPortString(pActInfo, EIP_EquipmentPack);
			const bool& selectPrimary = GetPortBool(pActInfo, EIP_SelectPrimary);

			if (pActor->IsPlayer())
				pInventory->RMIReqToServer_AddEquipmentPack( packName.c_str(), addPack, selectPrimary );
			else
			{
				if (gEnv->bServer)
					CCryAction::GetCryAction()->GetIItemSystem()->GetIEquipmentManager()->GiveEquipmentPack( pActor, packName.c_str(), addPack, selectPrimary );
			}
				
			// TODO: instant output activation, with delayed effective change in the inventory, it potentially could cause problems in rare situations
			ActivateOutput(pActInfo, EOP_Done, true);
		}
		else if (event == eFE_PrecacheResources)
		{
			const string& packName = GetPortString(pActInfo, 1);

			if (!packName.empty())
			{
				IGameRules* pGameRules = CCryAction::GetCryAction()->GetIGameRulesSystem()->GetCurrentGameRules();
				CRY_ASSERT_MESSAGE(pGameRules != NULL, "No game rules active, can not precache resources");
				if (pGameRules)
				{
					pGameRules->PrecacheLevelResource(packName.c_str(), eGameResourceType_Loadout);
				}
			}
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:42,代码来源:FlowInventoryNodes.cpp


示例12: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
	{
		m_actInfo = *pActInfo;
		switch (event)
		{
			case eFE_Activate:
			{
				if (GetPortBool(pActInfo, EIP_Enabled)) {
					if (IsPortActive(pActInfo, EIP_Send)) {
						// try to open port socket
						port = GetPortInt(pActInfo, EIP_Port);
						address = GetPortString(pActInfo, EIP_Address);
						string message = GetPortString(pActInfo, EIP_Message);
						SendMessage(port, address, message);
					}
				}
			}
			break;
		}
	}
开发者ID:neonascent,项目名称:FGPS---UDP-listener,代码行数:20,代码来源:FlowUdpNodeMulticastSender.cpp


示例13: OnMessage

	// INetMsgListener
	virtual void OnMessage(const SNetMsgData &data) override
	{
		// Notify if the expected message has arrived
		const string &key = GetPortString(&m_actInfo,IN_MSG);
		if (data.key == key)
		{
			NET_MSG_DISPATCHER_LOG("CFlowNode_MsgReceiver: %s Listener received message [%s->%s]-[%s/%s]", CNetMessageDistpatcher::DbgTranslateLocationToString(), data.DbgTranslateSourceToString(),  data.DbgTranslateTargetToString(), key.c_str(), data.value.c_str());
			ActivateOutput(&m_actInfo, OUT_RECEIVED, true);
			ActivateOutput(&m_actInfo, OUT_VALUE, data.value);
		}
	}
开发者ID:joewan,项目名称:pycmake,代码行数:12,代码来源:FlowNetMsgNodes.cpp


示例14: GetSwitchStateID

	void GetSwitchStateID(SActivationInfo* const pActInfo, uint32 const nStateInputIdx)
	{
		string const& rStateName = GetPortString(pActInfo, nStateInputIdx);
		if (!rStateName.empty() && (m_nSwitchID != INVALID_AUDIO_CONTROL_ID))
		{
			gEnv->pAudioSystem->GetAudioSwitchStateID(
				m_nSwitchID,
				rStateName.c_str(),
				m_aSwitchStates[nStateInputIdx-eIn_SwitchStateNameFirst]);
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:11,代码来源:FlowAudioSwitchNode.cpp


示例15: GetPortString

void CGeomEntity::OnFlowgraphActivation(EntityId entityId, IFlowNode::SActivationInfo* pActInfo, const class CFlowGameEntityNode* pNode)
{
	if (CGeomEntity* pGeomEntity = QueryExtension(entityId))
	{
		if (IsPortActive(pActInfo, eInputPorts_LoadGeometry))
		{
			pGeomEntity->GetEntity()->LoadGeometry(0, GetPortString(pActInfo, eInputPorts_LoadGeometry));
			ActivateOutputPort(entityId, eOutputPorts_Done, TFlowInputData(true));
		}
	}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:11,代码来源:GeomEntity.cpp


示例16: UIACTION_WARNING

void CFlashUIVariableBaseNode::ConvertToUIData( const TFlowInputData &in, TUIData &out, SActivationInfo* pActInfo)
{
	if (!GetObjectDesc())
	{
		UIACTION_WARNING( "FG: No valid Variable \"%s\"! (Referenced at node \"%s\")", GetPortString(pActInfo, GetInputPort(eI_UIVariable)).c_str(), pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));
		return;
	}

	bool        ok      = false;
	const char* vartype = "any";
	switch (GetObjectDesc()->eType)
	{
	case SUIParameterDesc::eUIPT_Bool:
	{
		bool value;
		ok      = in.GetValueWithConversion(value);
		out     = TUIData(value);
		vartype = "bool";
	}
	break;
	case SUIParameterDesc::eUIPT_Int:
	{
		int value;
		ok      = in.GetValueWithConversion(value);
		out     = TUIData(value);
		vartype = "int";
	}
	break;
	case SUIParameterDesc::eUIPT_Float:
	{
		float value;
		ok      = in.GetValueWithConversion(value);
		out     = TUIData(value);
		vartype = "float";
	}
	break;
	case SUIParameterDesc::eUIPT_String: // fall through, just change the type desc
		vartype = "string";
	case SUIParameterDesc::eUIPT_Any:
	default:
	{
		string value;
		ok  = in.GetValueWithConversion(value);
		out = TUIData(value);
	}
	break;
	}

	if (!ok)
	{
		UIACTION_WARNING( "FG: UIElement \"%s\" Variable \"%s\" expected type \"%s\" given value was not compatible! (Referenced at node \"%s\")", GetElement()->GetName(),GetObjectDesc()->sDisplayName, vartype, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));
	}
}
开发者ID:joewan,项目名称:pycmake,代码行数:53,代码来源:FlashUIElementNodes.cpp


示例17: ProcessEvent

  virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
  {
    if (event != eFE_Activate)
      return;

		I3DEngine* pEngine = gEnv->p3DEngine;

		const string& message = GetPortString(pActInfo, EIP_ParamName);
		const float& fParamFloat = GetPortFloat(pActInfo, EIP_ParamFloat);

		pEngine->SetPostEffectParam(message, fParamFloat);
  }
开发者ID:PiratesAhoy,项目名称:HeartsOfOak-Core,代码行数:12,代码来源:GameNodes.cpp


示例18: OnGrammarChange

	virtual void OnGrammarChange(const char * grammarName, eGrammaChange change)
	{
		const string & myGrammarName = GetPortString(&m_actInfo, eI_GrammarName);

		if (myGrammarName == grammarName)
		{
			EOutputs outputPort = change == eGC_Enabled ? eO_Enabled : 
														change == eGC_Disabled ? eO_Disabled : eO_NotLoaded;

			ActivateOutput(&m_actInfo, outputPort, true );
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:12,代码来源:FlowKinectNodesDurango.cpp


示例19: UpdateUIElement

void CFlashUILayerNode::ProcessEvent( EFlowEvent event,SActivationInfo *pActInfo )
{
    if ( event == eFE_Initialize )
    {
        UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
    }
    else if ( event == eFE_Activate )
    {
        if ( IsPortActive( pActInfo, eI_UIElement ) )
        {
            UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
        }

        const int instanceId =  GetPortInt( pActInfo, eI_InstanceID );

        if ( IsPortActive( pActInfo, eI_Get ) )
        {
            int layer = 0;

            SPerInstanceCall1< int& > caller;
            if ( !caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUILayerNode::GetLayer), layer, false) )
            {
                UIACTION_WARNING( "FG: UIElement \"%s\" called get layer for multiple instances! (passed instanceId %i), referenced at node \"%s\"", GetPortString(pActInfo, eI_UIElement).c_str() ,instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ) );
            }

            ActivateOutput( pActInfo, eO_Layer, layer );
            ActivateOutput( pActInfo, eO_OnGet, true );
        }

        if ( IsPortActive( pActInfo, eI_Set ) )
        {
            const int layer = GetPortInt( pActInfo, eI_Layer );

            SPerInstanceCall1< int > caller;
            caller.Execute( GetElement(), instanceId, functor(*this, &CFlashUILayerNode::SetLayer), layer );

            ActivateOutput( pActInfo, eO_OnSet, true );
        }
    }
}
开发者ID:souxiaosou,项目名称:FireNET,代码行数:40,代码来源:FlashUIDisplayNodes.cpp


示例20: ProcessEvent

    virtual void ProcessEvent( EFlowEvent event,SActivationInfo *pActInfo )
    {
        switch (event)
        {
        case eFE_Activate:
        {
            if (!m_file)
            {
                const string& filename = GetPortString(pActInfo, 0);
                if (filename.empty())
                    return;

                if (!(m_file = fopen(filename.c_str(), "w+")))
                    return;

                string name;
                name.reserve(256);

                for (int i = 0; i < 10; i++)
                    if (GetPortString(pActInfo, 1+i*2).length())
                        name += GetPortString(pActInfo, 1+i*2)+",";

                fputs(name.c_str(), m_file);
                fputs("\n", m_file);
            }

            string value;
            value.reserve(256);

            for (int i = 0; i < 10; i++)
                if (GetPortString(pActInfo, 1+i*2).length())
                    value += GetPortString(pActInfo, 2+i*2)+",";

            fputs(value.c_str(), m_file);
            fputs("\n", m_file);
            fflush(m_file);
        }
        break;
        };
    };
开发者ID:souxiaosou,项目名称:FireNET,代码行数:40,代码来源:FlowLogNode.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetPos函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPortInt函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap