本文整理汇总了C++中SharedGroup::import_from_handover方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedGroup::import_from_handover方法的具体用法?C++ SharedGroup::import_from_handover怎么用?C++ SharedGroup::import_from_handover使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharedGroup
的用法示例。
在下文中一共展示了SharedGroup::import_from_handover方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_deliver
bool ResultsNotifier::do_deliver(SharedGroup& sg)
{
auto lock = lock_target();
// Target realm being null here indicates that we were unregistered while we
// were in the process of advancing the Realm version and preparing for
// delivery, i.e. the results was destroyed from the "wrong" thread
if (!get_realm()) {
return false;
}
// We can get called before the query has actually had the chance to run if
// we're added immediately before a different set of async results are
// delivered
if (!m_initial_run_complete) {
return false;
}
REALM_ASSERT(!m_query_handover);
if (m_tv_handover) {
m_tv_handover->version = version();
Results::Internal::set_table_view(*m_target_results,
std::move(*sg.import_from_handover(std::move(m_tv_handover))));
}
REALM_ASSERT(!m_tv_handover);
return true;
}
示例2: do_attach_to
void ResultsNotifier::do_attach_to(SharedGroup& sg)
{
REALM_ASSERT(m_query_handover);
m_query = sg.import_from_handover(std::move(m_query_handover));
m_sort = SortDescriptor::create_from_and_consume_patch(m_sort_handover, *m_query->get_table());
m_distinct = SortDescriptor::create_from_and_consume_patch(m_distinct_handover, *m_query->get_table());
}
示例3: deliver
void ResultsNotifier::deliver(SharedGroup& sg)
{
auto lock = lock_target();
// Target realm being null here indicates that we were unregistered while we
// were in the process of advancing the Realm version and preparing for
// delivery, i.e. the results was destroyed from the "wrong" thread
if (!get_realm()) {
return;
}
REALM_ASSERT(!m_query_handover);
if (m_tv_to_deliver) {
Results::Internal::set_table_view(*m_target_results,
std::move(*sg.import_from_handover(std::move(m_tv_to_deliver))));
}
REALM_ASSERT(!m_tv_to_deliver);
}
示例4: do_attach_to
void ResultsNotifier::do_attach_to(SharedGroup& sg)
{
REALM_ASSERT(m_query_handover);
m_query = sg.import_from_handover(std::move(m_query_handover));
}
示例5: do_attach_to
void ObjectNotifier::do_attach_to(SharedGroup& sg)
{
REALM_ASSERT(m_handover);
REALM_ASSERT(!m_row);
m_row = sg.import_from_handover(std::move(m_handover));
}