本文整理汇总了C++中Store::get方法的典型用法代码示例。如果您正苦于以下问题:C++ Store::get方法的具体用法?C++ Store::get怎么用?C++ Store::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getCurrentSelection
DataSnapshot::Ptr getCurrentSelection()
{
int row = list.getSelectedRow();
Store* s = Store::getInstance();
if (!s || row < 0 || row > s->size()) return nullptr;
return s->get(row);
}
示例2: main
int main(){
Parser::Parser parser;
Parser::Parser::StringVector v = parser.parseString(",1,2 3,44-5 5", ',');
std::cout << "Test 1\n";
for(Parser::Parser::StringVectorIterator it = v.begin(); it != v.end(); ++it){
std::cout << *it << "\n";
}
std::cout << "test 1 - ok\n";
std::cout << "test 2\n";
Store<BaseType::TypePtr> store;
std::cout << "test 2 - ok\n";
std::cout << "test 3\n";
BaseType::TypePtr type1 = SimpleTypeFactory::getType("ID");
std::cout << "test 3 - ok\n";
std::cout << "test 4\n";
type1->id("pd1Id");
type1->dump();
std::cout << "test 4 - ok\n";
std::cout << "test 5\n";
store.add(type1);
store.get("pd1Id")->dump();
std::cout << "test 5 - ok\n";
std::cout << "test 6\n";
FileTypeDirector fd(store);
fd.createTypes();
std::cout << "test 6 - ok\n";
std::cout << "test 7\n";
BaseType::TypePtr rootType = store.get("cid11");
BaseField::FieldPtr rootField = BaseField::create(rootType);
rootField->dump();
std::cout << "test 7 - ok\n";
std::cout << "test 8\n";
rootType->dump();
std::cout << "test 8 - ok\n";
std::cout << "test 9\n";
rootField->set("123|456", '|');
std::cout << "test 9 - ok\n";
std::cout << "test 10\n";
rootField->dump();
std::cout << "test 10 - ok\n";
std::cout << "test 11\n";
Store<BaseOut::TypePtr> outStore;
FileOutDirector fod(outStore, store);
fod.create();
std::cout << "test 11 - ok\n";
std::cout << "ok\n";
return 0;
}