本文整理汇总了C++中OutputData::setCarrier方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputData::setCarrier方法的具体用法?C++ OutputData::setCarrier怎么用?C++ OutputData::setCarrier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputData
的用法示例。
在下文中一共展示了OutputData::setCarrier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parsXml
//.........这里部分代码省略.........
output.setPortType(STREAM_PORT);
else if(compareString(data->Attribute("port_type"), "event"))
output.setPortType(EVENT_PORT);
else if(compareString(data->Attribute("port_type"), "service"))
output.setPortType(SERVICE_PORT);
else
{
OSTRINGSTREAM war;
war<<"Unknown port type \'"<<data->Attribute("port_type")<<"\' from "<<szFile<<" at line "\
<<data->Row()<<". Available types : stream, event, service";
logger->addWarning(war);
}
TiXmlElement* element;
if(output.getPortType() != SERVICE_PORT )
{
if((element = (TiXmlElement*) data->FirstChild("type")))
output.setName(parser->parseText(element->GetText()).c_str());
else
{
OSTRINGSTREAM war;
war<<"Output data from "<<szFile<<" at line "\
<<data->Row()<<" has no type.";
logger->addWarning(war);
}
}
else
output.setName("*");
if((element = (TiXmlElement*) data->FirstChild("port")))
{
output.setPort(parser->parseText(element->GetText()).c_str());
output.setCarrier(element->Attribute("carrier"));
}
else
{
OSTRINGSTREAM war;
war<<"Output data from "<<szFile<<" at line "\
<<data->Row()<<" has no port.";
logger->addWarning(war);
}
if((element = (TiXmlElement*) data->FirstChild("description")))
output.setDescription(parser->parseText(element->GetText()).c_str());
module.addOutput(output);
} // end of output data
/* input data */
if(compareString(data->Value(), "input"))
{
InputData input;
if(compareString(data->Attribute("port_type"), "stream") || !data->Attribute("port_type"))
input.setPortType(STREAM_PORT);
else if(compareString(data->Attribute("port_type"), "event"))
input.setPortType(EVENT_PORT);
else if(compareString(data->Attribute("port_type"), "service"))
input.setPortType(SERVICE_PORT);
else
{
OSTRINGSTREAM war;
war<<"Unknown port type \'"<<data->Attribute("port_type")<<"\' from "<<szFile<<" at line "\
<<data->Row()<<". Available types : stream, event, service";
logger->addWarning(war);