本文整理汇总了C++中CActionCollectionPtr::end方法的典型用法代码示例。如果您正苦于以下问题:C++ CActionCollectionPtr::end方法的具体用法?C++ CActionCollectionPtr::end怎么用?C++ CActionCollectionPtr::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActionCollectionPtr
的用法示例。
在下文中一共展示了CActionCollectionPtr::end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reloadFromRawlog
/* ------------------------------------------------------------
reloadFromRawlog
------------------------------------------------------------ */
void CRawlogTreeView::reloadFromRawlog( int hint_rawlog_items )
{
// Recompute the total height of the scroll area:
// We also compute a list for each index with:
// - Pointer to data
// - level in the hierarchy (0,1,2)
// --------------------------------------------------------
if (m_rawlog)
{
if (hint_rawlog_items<0)
m_tree_nodes.reserve( m_rawlog->size()+100 );
else m_tree_nodes.reserve( hint_rawlog_items+100 );
}
// Create a "tree node" for each element in the rawlog:
// ---------------------------------------------------------
m_tree_nodes.clear();
m_rawlog_start = INVALID_TIMESTAMP;
m_rawlog_last = INVALID_TIMESTAMP;
// Root:
m_tree_nodes.push_back( TNodeData() );
TNodeData &d = m_tree_nodes.back();
d.level = 0;
// CVectorDouble tims;
if (m_rawlog)
{
CRawlog::iterator end_it = m_rawlog->end();
size_t rawlog_index = 0;
for (CRawlog::iterator it=m_rawlog->begin();it!=end_it;it++,rawlog_index++)
{
m_tree_nodes.push_back( TNodeData() );
TNodeData &d = m_tree_nodes.back();
d.level = 1;
d.data = (*it);
d.index = rawlog_index;
// For containers, go recursively:
if ( (*it)->GetRuntimeClass()==CLASS_ID(CSensoryFrame))
{
CSensoryFramePtr sf = CSensoryFramePtr( *it );
for (CSensoryFrame::iterator o=sf->begin();o!=sf->end();++o)
{
m_tree_nodes.push_back( TNodeData() );
TNodeData &d = m_tree_nodes.back();
d.level = 2;
d.data = (*o);
if ((*o)->timestamp!=INVALID_TIMESTAMP)
{
m_rawlog_last = (*o)->timestamp;
if (m_rawlog_start == INVALID_TIMESTAMP)
m_rawlog_start = (*o)->timestamp;
}
}
}
else
if ( (*it)->GetRuntimeClass()==CLASS_ID(CActionCollection))
{
CActionCollectionPtr acts = CActionCollectionPtr( *it );
for (CActionCollection::iterator a=acts->begin();a!=acts->end();++a)
{
m_tree_nodes.push_back( TNodeData() );
TNodeData &d = m_tree_nodes.back();
d.level = 2;
d.data = (*a);
if ((*a)->timestamp!=INVALID_TIMESTAMP)
{
m_rawlog_last = (*a)->timestamp;
if (m_rawlog_start == INVALID_TIMESTAMP)
m_rawlog_start = (*a)->timestamp;
}
}
}
else
if ( (*it)->GetRuntimeClass()->derivedFrom( CLASS_ID(CObservation) ))
{
CObservationPtr o = CObservationPtr(*it);
if (o->timestamp!=INVALID_TIMESTAMP)
{
m_rawlog_last = o->timestamp;
if (m_rawlog_start == INVALID_TIMESTAMP)
m_rawlog_start = o->timestamp;
//tims.push_back( mrpt::system::timeDifference(m_rawlog_start, o->timestamp));
}
}
}
}
// mrpt::system::vectorToTextFile(tims,"tims.txt");
//.........这里部分代码省略.........