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


C++ Connection::GetName方法代码示例

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


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

示例1: Visit

void SaveXmlComponentVisitor::Visit(Connection &connection)
{
	(*file) << " " << XmlTag::startTagConnector << "\n"
		 << "    " << XmlTag::startTagId << connection.GetId() << XmlTag::endTagId << "\n"
		 << "    " << XmlTag::startTagText << connection.GetName() << XmlTag::endTagText << "\n"
		 << "    " << XmlTag::startTagSource << connection.GetConnectComponents().at(0)->GetId() << XmlTag::endTagSource << "\n"
		 << "    " << XmlTag::startTagTarget << connection.GetConnectComponents().at(1)->GetId() << XmlTag::endTagTarget << "\n"
		 << " " << XmlTag::endTagConnector << "\n";
}
开发者ID:smallpigex,项目名称:ERDiagram_POSD_Homework,代码行数:9,代码来源:SaveXmlComponentVisitor.cpp

示例2: HandleGetConnections

bool KernelSML::HandleGetConnections(AgentSML* /*pAgentSML*/, char const* /*pCommandName*/, Connection* /*pCallingConnection*/, AnalyzeXML* /*pIncoming*/, soarxml::ElementXML* pResponse)
{
	// Create the result tag
	TagResult* pTagResult = new TagResult() ;
	pTagResult->AddAttribute(sml_Names::kCommandOutput, sml_Names::kStructuredOutput) ;

	// Walk the list of connections and return their info
	int index = 0 ;
	Connection* pConnection = m_pConnectionManager->GetConnectionByIndex(index) ;

	while (pConnection)
	{
		// Create the connection tag
		soarxml::ElementXML* pTagConnection = new soarxml::ElementXML() ;
		pTagConnection->SetTagName(sml_Names::kTagConnection) ;

		// Fill in the info
		pTagConnection->AddAttribute(sml_Names::kConnectionId, pConnection->GetID()) ;
		pTagConnection->AddAttribute(sml_Names::kConnectionName, pConnection->GetName()) ;
		pTagConnection->AddAttribute(sml_Names::kConnectionStatus, pConnection->GetStatus()) ;
		pTagConnection->AddAttribute(sml_Names::kAgentStatus, pConnection->GetAgentStatus()) ;

		// Add the connection into the result
		pTagResult->AddChild(pTagConnection) ;

		// Get the next connection.  Returns null when go beyond limit.
		// (This provides thread safe access to the list, in case it changes during this enumeration)
		index++ ;
		pConnection = m_pConnectionManager->GetConnectionByIndex(index) ;
	}

	// Add the result tag to the response
	pResponse->AddChild(pTagResult) ;

	// Return true to indicate we've filled in all of the result tag we need
	return true ;

}
开发者ID:IvanLogvinov,项目名称:soar,代码行数:38,代码来源:sml_KernelSMLHandlers.cpp


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