本文整理汇总了C++中Dynamic::GetCellValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Dynamic::GetCellValue方法的具体用法?C++ Dynamic::GetCellValue怎么用?C++ Dynamic::GetCellValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dynamic
的用法示例。
在下文中一共展示了Dynamic::GetCellValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetCases
void SetCases()
{
std::string error;
Dynamic table = TABLE;
nkit::TableIndex::Ptr index;
nkit::TableIndex::ConstIterator it;
DynamicVector vargs;
vargs.push_back(Dynamic("NEW"));
vargs.push_back(Dynamic(0));
vargs.push_back(Dynamic(true));
vargs.push_back(Dynamic(0));
vargs.push_back(Dynamic(0.0));
COMMON_TABLE_INIT(table);
index = table.CreateIndex("name,name1", &error);
NKIT_TEST_ASSERT_WITH_TEXT(index, error);
NKIT_TEST_ASSERT(table.SetRow(table.height() / 2, vargs));
DynamicVector::iterator vit = vargs.begin();
for (size_t col = 0; vit != vargs.end(); ++vit, ++col)
{
#if defined(MY_TRACE_)
print(*vit, "", false);
std::cout << " <> ";
print(table.GetCellValue(table.height() / 2, col));
#endif // MY_TRACE_
NKIT_TEST_ASSERT(*vit == table.GetCellValue(table.height() / 2, col));
} // for
NKIT_TEST_ASSERT(index->GetEqual(Dynamic("NEW"),Dynamic(0)) != index->end());
}
示例2: TableIteratorCases
void TableIteratorCases()
{
std::string error;
Dynamic table = TABLE;
COMMON_TABLE_INIT(table);
Dynamic::TableIterator it = table.begin_t();
Dynamic::TableIterator end = table.end_t();
for (size_t row = 0; it != end; ++it, ++row)
{
for (size_t col = 0; col < table.width(); ++col)
NKIT_TEST_ASSERT(it[col] == table.GetCellValue(row, col));
}
it = table.begin_t();
for (size_t row = 0; it != end; it++, ++row)
{
for (size_t col = 0; col < table.width(); ++col)
NKIT_TEST_ASSERT(it[col] == table.GetCellValue(row, col));
}
}