本文整理汇总了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";
}
示例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 ;
}