本文整理汇总了C++中ArrayPtr::end方法的典型用法代码示例。如果您正苦于以下问题:C++ ArrayPtr::end方法的具体用法?C++ ArrayPtr::end怎么用?C++ ArrayPtr::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayPtr
的用法示例。
在下文中一共展示了ArrayPtr::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayArray
//-----------------------------------------------------------------------------
// Tools::displayArray
//-----------------------------------------------------------------------------
std::string Tools::displayArray( const ArrayPtr& arr, int maxCell )
{
ArrayIterator begin = arr->begin();
ArrayIterator end = arr->end();
return Tools::scanValues( begin, end, maxCell );
}
示例2: displayValues
//-----------------------------------------------------------------------------
// Tools::displayValues
//-----------------------------------------------------------------------------
std::string Tools::displayValues(const ArrayPtr& array)
{
std::cout<<"Entering Tools::displayValues"<<std::endl;
std::string str;
ArrayIterator begin = array->begin();
ArrayIterator end = array->end();
str = scanValues(begin, end, 15);
std::cout<<"Leaving Tools::displayValues"<<std::endl;
return str;
}
示例3: nextChunkSize
Arena::Arena(ArrayPtr<byte> scratch)
: nextChunkSize(kj::max(sizeof(ChunkHeader), scratch.size())) {
if (scratch.size() > sizeof(ChunkHeader)) {
ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(scratch.begin());
chunk->end = scratch.end();
chunk->pos = reinterpret_cast<byte*>(chunk + 1);
chunk->next = nullptr; // Never actually observed.
// Don't place the chunk in the chunk list because it's not ours to delete. Just make it the
// current chunk so that we'll allocate from it until it is empty.
currentChunk = chunk;
}
}