本文整理汇总了C++中Events::ReadEventsSourceFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Events::ReadEventsSourceFile方法的具体用法?C++ Events::ReadEventsSourceFile怎么用?C++ Events::ReadEventsSourceFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::ReadEventsSourceFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
int BasicEventSyntaxCheckerAppLayer::run(int argc, char * argv[])
{
//printf("BasicEventSyntaxCheckerAppLayer - version: %d.%d.%d (%s)\n",
// BASICEVENTSYNTAXCHECKER_MAJOR,
// BASICEVENTSYNTAXCHECKER_MINOR,
// BASICEVENTSYNTAXCHECKER_PATCH,
// BASICEVENTSYNTAXCHECKER_DebugFlag);
//printf("\n");
BasicEventHandling_ns::EventHandler_stderr handler_stderr;
handler_stderr.open(argv[0]);
std::string strEventDefSourceFile;
BasicEventSyntaxChecker checker;
checker.set_event_handler(&handler_stderr);
if (!checker.get_params(argc,
argv,
strEventDefSourceFile))
{
return 1;
}
Events events;
events.set_event_handler(&handler_stderr);
if (!events.ReadEventsSourceFile(strEventDefSourceFile))
{
return 2;
}
if (!checker.CreateEventsCPP(strEventDefSourceFile))
{
return 3;
}
return 0;
}
示例2: run
int Raise_event_calls_reportAppLayer::run(int argc, char * argv[])
{
printf("Raise_event_calls_reportAppLayer - version: %d.%d.%d (%s)\n",
RAISE_EVENT_CALLS_REPORT_MAJOR,
RAISE_EVENT_CALLS_REPORT_MINOR,
RAISE_EVENT_CALLS_REPORT_PATCH,
RAISE_EVENT_CALLS_REPORT_DebugFlag);
printf("\n");
BasicEventHandling_ns::EventHandler_stderr handler_stderr;
handler_stderr.open(argv[0]);
std::string strEventDefSourceFile;
std::string strRaiseEventSourceFile;
Report report;
report.set_event_handler(&handler_stderr);
if (!report.get_params(argc,
argv,
strEventDefSourceFile,
strRaiseEventSourceFile))
{
return -1;
}
std::list<std::string> listEventDefSourceFile;
if (!report.parse_eventdef_source_file(strEventDefSourceFile, listEventDefSourceFile))
{
return -1;
}
Events events;
events.set_event_handler(&handler_stderr);
std::list<std::string>::iterator it;
for (it = listEventDefSourceFile.begin(); it != listEventDefSourceFile.end(); it++)
{
events.ReadEventsSourceFile(it->c_str());
}
std::list<std::string> listRaiseEventSourceFile;
if (!report.parse_raiseevent_source_file(strRaiseEventSourceFile, listRaiseEventSourceFile))
{
return -1;
}
std::vector<EventCall> vectEventCall;
for (it = listRaiseEventSourceFile.begin(); it != listRaiseEventSourceFile.end(); it++)
{
if (report.extract_raise_event_calls(*it, vectEventCall))
{
report.show_calls(*it, vectEventCall, events);
}
vectEventCall.clear();
}
std::cout << std::endl;
return 0;
}