本文整理汇总了C++中Timeline::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Timeline::end方法的具体用法?C++ Timeline::end怎么用?C++ Timeline::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timeline
的用法示例。
在下文中一共展示了Timeline::end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testFind
void testFind(const Timeline<int>& timeline, FindMode findMode, const initializer_list<Timed<int>*> expectedResults) {
int i = -1;
for (Timed<int>* expectedResult : expectedResults) {
auto it = timeline.find(centiseconds(++i), findMode);
if (expectedResult != nullptr) {
EXPECT_NE(it, timeline.end()) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
if (it != timeline.end()) {
EXPECT_EQ(*expectedResult, *it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
}
} else {
EXPECT_EQ(timeline.end(), it) << "Timeline: " << timeline << "; findMode: " << static_cast<int>(findMode) << "; i: " << i;
}
}
}
示例2: Get
bool Timelines::Get(const string& key, Timeline& results) {
int size = (int)sizeof(double);
void* records = tcbdbget(this->database, key.c_str(), key.size(), &size);
if(records != NULL) {
size_t count = size / sizeof(double);
results.insert(results.end(), (double*)records, (double*)records + count);
free(records);
return true;
} else {
return false;
}
}