YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
#include <textmgr.h>
类 | |
class | iterator |
目标编码迭代器类型。 更多... | |
Public 类型 | |
using | BlockType = pair< vector< ucs2_t >, size_t > |
缓冲区块类型。 更多... | |
using | MapType = map< size_t, BlockType > |
缓冲映射类型。 更多... | |
using | const_iterator = iterator |
Public 成员函数 | |
TextFileBuffer (TextFile &) | |
构造:使用文本文件。 更多... | |
virtual | DefDeDtor (TextFileBuffer) BlockType &operator[](size_t) |
析构:空实现。 更多... | |
DefGetter (const ynothrow, size_t, BlockN, nBlock) DefGetter(const ynothrow | |
取缓冲区块数。 更多... | |
File Encoding | DefGetterMem (const ynothrow, size_t, Size, File) DefGetter(const ynothrow |
File Encoding nTextSize iterator | GetIterator (size_t) |
取文本字节位置对应的迭代器。 更多... | |
size_t | GetPosition (iterator) |
取迭代器对应的文本字节位置。 更多... | |
iterator | begin () ynothrow |
取文本缓冲区起始迭代器。 更多... | |
iterator | end () ynothrow |
取文本缓冲区终止迭代器。 更多... | |
Public 属性 | |
Encoding | |
File Encoding | size_t |
File Encoding | TextSize |
静态 Public 属性 | |
static yconstexpr size_t | BlockSize = 2048U |
默认文本区块大小。 更多... | |
Protected 属性 | |
TextFile & | File |
文本文件引用。 更多... | |
size_t | nTextSize |
文本大小。 更多... | |
size_t | nBlock |
区块数。 更多... | |
MapType | Map |
缓冲映射。 更多... | |
Private 属性 | |
size_t | fixed_width |
固定编码每字符的字节数。 更多... | |
size_t | max_width |
最大编码每字符的字节数。 更多... | |
using YSLib::Text::TextFileBuffer::BlockType = pair<vector<ucs2_t>, size_t> |
using YSLib::Text::TextFileBuffer::MapType = map<size_t, BlockType> |
|
explicit |
TextFileBuffer::iterator YSLib::Text::TextFileBuffer::begin | ( | ) |
|
virtual |
析构:空实现。
块随机访问。
取缓冲区块数。
File Encoding YSLib::Text::TextFileBuffer::DefGetterMem | ( | const ynothrow | , |
size_t | , | ||
Size | , | ||
File | |||
) | const |
TextFileBuffer::iterator YSLib::Text::TextFileBuffer::end | ( | ) |
取文本缓冲区终止迭代器。
在文件 textmgr.cpp 第 171 行定义.
参考 nBlock.
参考自 GetIterator() , 以及 GetPosition().
TextFileBuffer::iterator YSLib::Text::TextFileBuffer::GetIterator | ( | size_t | pos | ) |
取文本字节位置对应的迭代器。
在文件 textmgr.cpp 第 176 行定义.
参考 BlockSize, CHRLib::ConvertCharacter(), end(), fixed_width, max_width, nTextSize, YAssert , 以及 YB_LIKELY.
size_t YSLib::Text::TextFileBuffer::GetPosition | ( | TextFileBuffer::iterator | i | ) |
取迭代器对应的文本字节位置。
在文件 textmgr.cpp 第 212 行定义.
参考 CHRLib::ConvertCharacter(), end(), ystdex::iterator_transformation::first(), fixed_width, max_width, nTextSize, YAssert , 以及 YB_LIKELY.
|
static |
|
private |
|
private |
|
protected |
区块数。
参考自 end(), YSLib::Text::TextFileBuffer::iterator::operator++() , 以及 YSLib::Text::TextFileBuffer::iterator::operator--().
|
protected |