本文整理汇总了C++中ObjectFactory::createMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectFactory::createMessage方法的具体用法?C++ ObjectFactory::createMessage怎么用?C++ ObjectFactory::createMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory::createMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayRequirements
void Display::displayRequirements(CmdParser c)
{
try
{
Verbose v(true);
Verbose::show("******** REQUIREMENT 4 ********");
Verbose::show("Refer to files Message.h and Message.cpp\n");
Verbose::show("******** REQUIREMENT 6 ********");
Verbose::show("Refer to files Communiation.h and Communication.cpp\n");
Verbose::show("******** REQUIREMENT 8 ********");
Verbose::show("Refer to files Executive.h, Display.h, Display.cpp and Executive.cpp\n");
Verbose::show("******** DEMONSTRATING REQUIREMENT 3, 5 & 7 ********\n");
ObjectFactory of;
IRecvr *recv = of.createRecvr(stoi(c.getSelfPortNo()));
ISendr *sender = of.createSendr();
IMessage *msg = of.createMessage();
Peer *peer_ = new Peer(sender,recv,msg);
peer_->start();
std::cout.flush();
Verbose::show("\n\n Press Enter to Exit.");
std::cin.get();
peer_->stop();
}
catch (exception ex)
{
string s = ex.what();
Verbose::show("Exception thrown: "+s);
}
}