本文整理汇总了C++中Item::GetEndTime方法的典型用法代码示例。如果您正苦于以下问题:C++ Item::GetEndTime方法的具体用法?C++ Item::GetEndTime怎么用?C++ Item::GetEndTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item::GetEndTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LfcCommandTable
LfcCommandTable * Analyzer::Analyze(LogTable * logTable) {
vector<Item *> * items = logTable->getMyList();
LfcCommandTable * commandList = new LfcCommandTable();
map<FunctionType, State *> objectMap = createStateMap();
int index = -1;
std::vector<Item *>::const_iterator iterator;
for (iterator = items->begin(); iterator != items->end(); ++iterator) {
Item * item = *iterator;
index++;
if (!item->IsAssigned()) {
FunctionType functionName = item->GetCommand()->getName();
if (objectMap.find(functionName) != objectMap.end()) {
item->SetAssigned(true);
this->currentState = objectMap.at(functionName);
int addition = index + 3500;
if (addition > items->size()) {
addition = items->size();
}
std::vector<Item *> subRows(items->begin() + index + 1, items->begin() + addition);
std::vector<Item *>::const_iterator iterator = subRows.begin();
LogTime * backUpEndTime = new LogTime(item->GetEndTime()->miliseconds());
string backUpFilePath = item->GetFilePath();
string backUpInformation = item->GetInformation();
int backUpTid = item->GetTid();
LfcCommand * command = currentState->NextState(iterator, subRows, item);
if (command != NULL) {
commandList->add(command);
currentState->PrintMessage("ANALYZER: ADDED COMMAND " + command->GetStringName(), item);
} else {
item->SetEndTime(backUpEndTime);
item->SetFilePath(backUpFilePath);
item->SetInformation(backUpInformation);
item->SetTid(backUpTid);
item->SetAssigned(false);
currentState->PrintMessage("ANALYZER: RETURNED NULL", item);
}
}
}
}
int notAssigned = 0;
std::vector<Item *>::const_iterator iterator2;
for (iterator2 = items->begin(); iterator2 != items->end(); ++iterator2) {
Item * item = *iterator2;
if (!item->IsAssigned()) {
notAssigned++;
}
}
cout << "not assigned items to command: " << notAssigned << endl;
return commandList;
}