本文整理汇总了C++中Dynamic::DeleteRow方法的典型用法代码示例。如果您正苦于以下问题:C++ Dynamic::DeleteRow方法的具体用法?C++ Dynamic::DeleteRow怎么用?C++ Dynamic::DeleteRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dynamic
的用法示例。
在下文中一共展示了Dynamic::DeleteRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteCases
void DeleteCases()
{
std::string error;
Dynamic table = TABLE;
nkit::TableIndex::Ptr index;
nkit::TableIndex::ConstIterator it;
COMMON_TABLE_INIT(table);
index = table.CreateIndex("name,name1,name3", &error);
// Fail cases tests
NKIT_TEST_ASSERT(index);
NKIT_TEST_ASSERT(index->GetEqual(Dynamic(3), Dynamic(1)) == index->end());
NKIT_TEST_ASSERT(index->GetEqual(Dynamic("A3"), Dynamic(3)) == index->end());
// Good cases tests
for (size_t ops = 0; ops < TABLE_GROW_SIZE; ++ops)
{
DynamicVector vargs;
vargs.push_back(Dynamic("A3"));
vargs.push_back(Dynamic(3));
vargs.push_back(Dynamic(false));
vargs.push_back(Dynamic(1));
vargs.push_back(Dynamic(double(2.0 + ops)));
NKIT_TEST_ASSERT(table.InsertRow(0, vargs));
}
for (size_t ops = 0; ops < TABLE_GROW_SIZE; ++ops)
NKIT_TEST_ASSERT(table.DeleteRow(0));
it = index->GetEqual(Dynamic("A3"), Dynamic(3), Dynamic(1));
NKIT_TEST_ASSERT(it != index->end());
for (; it != index->end(); ++it)
{
#if defined(MY_TRACE_)
print(it[4]);
#endif // MY_TRACE_
}
NKIT_TEST_ASSERT(table == e);
}