本文整理汇总了C++中sequence::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ sequence::clear方法的具体用法?C++ sequence::clear怎么用?C++ sequence::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sequence
的用法示例。
在下文中一共展示了sequence::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cast
/*
* Helper for element and docuemnt constructors to insert sequence
* of atomic values. Returns true if node was actually inserted.
* In this case left pointer is changed to the last inserted indirection.
* In any case at_vals sequence is cleared.
*/
static inline bool
process_atomic_values(xptr& left, const xptr& parent, sequence& at_vals) {
if (at_vals.size() > 0)
{
executor_globals::tmp_op_str_buf.clear();
tuple_cell tcc;
sequence::iterator it = at_vals.begin();
do {
tcc = tuple_cell::make_sure_light_atomic((*it).cells[0]);
tcc = cast(tcc, xs_string);
executor_globals::tmp_op_str_buf.append(tcc);
it++;
}
while (it != at_vals.end());
at_vals.clear();
if(executor_globals::tmp_op_str_buf.get_size() > 0) {
insert_text(indirectionDereferenceCP(left),
XNULL,
indirectionDereferenceCP(parent),
text_source_strbuf(&(executor_globals::tmp_op_str_buf)));
left = get_last_mo_inderection();
return true;
}
}
return false;
}