YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
#include <textmgr.h>
类 | |
class | Iterator |
目标编码迭代器类型。 更多... | |
Public 类型 | |
typedef pair< vector< ucs2_t > , size_t > | BlockType |
缓冲区块类型。 | |
typedef map< size_t, BlockType > | MapType |
缓冲映射类型。 | |
Public 成员函数 | |
TextFileBuffer (TextFile &) | |
构造:使用文本文件。 | |
virtual | ~TextFileBuffer () |
析构:空实现。 | |
BlockType & | operator[] (size_t) |
块随机访问。 | |
size_t | GetBlockN () const ynothrow |
取缓冲区块数。 | |
Encoding | GetEncoding () const ynothrow |
size_t | GetSize () const ynothrow |
size_t | GetTextSize () const ynothrow |
Iterator | GetBegin () ynothrow |
取文本缓冲区起始迭代器。 | |
Iterator | GetEnd () ynothrow |
取文本缓冲区终止迭代器。 | |
Iterator | GetIterator (size_t) |
取文本字节位置对应的迭代器。 | |
size_t | GetPosition (Iterator) |
取迭代器对应的文本字节位置。 | |
静态 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 |
最大编码每字符的字节数。 | |
typedef pair<vector<ucs2_t>, size_t> YSLib::Text::TextFileBuffer::BlockType |
typedef map<size_t, BlockType> YSLib::Text::TextFileBuffer::MapType |
|
explicit |
|
inlinevirtual |
TextFileBuffer::Iterator TextFileBuffer::GetBegin | ( | ) |
|
inline |
TextFileBuffer::Iterator TextFileBuffer::GetEnd | ( | ) |
取文本缓冲区终止迭代器。
在文件 textmgr.cpp 第 170 行定义.
参考 nBlock.
参考自 GetIterator() , 以及 GetPosition().
TextFileBuffer::Iterator TextFileBuffer::GetIterator | ( | size_t | pos | ) |
取文本字节位置对应的迭代器。
在文件 textmgr.cpp 第 175 行定义.
参考 BlockSize,CHRLib::ConvertCharacter(),YSL_BEGIN::FetchSkipMapperFunc(),fixed_width,CHRLib::GetCountOf(),GetEnd(),YSLib::File::GetPtr(),max_width,nTextSize,YAssert , 以及 YB_LIKELY.
size_t TextFileBuffer::GetPosition | ( | TextFileBuffer::Iterator | i | ) |
取迭代器对应的文本字节位置。
在文件 textmgr.cpp 第 211 行定义.
参考 BlockSize,CHRLib::ConvertCharacter(),YSL_BEGIN::FetchSkipMapperFunc(),ystdex::iterator_transformation::first(),fixed_width,YSLib::Text::TextFileBuffer::Iterator::GetBlockN(),CHRLib::GetCountOf(),GetEnd(),YSLib::Text::TextFileBuffer::Iterator::GetIndexN(),YSLib::File::GetPtr(),max_width,nTextSize,YAssert , 以及 YB_LIKELY.
TextFileBuffer::BlockType & TextFileBuffer::operator[] | ( | size_t | idx | ) |
块随机访问。
在文件 textmgr.cpp 第 128 行定义.
参考 BlockSize,CHRLib::ConvertCharacter(),YSL_BEGIN::FetchMapperFunc(),fixed_width,CHRLib::GetCountOf(),YSLib::File::GetPtr(),Map,nBlock,nTextSize,YAssert,YB_LIKELY , 以及 YB_UNLIKELY.
|
static |
|
private |
固定编码每字符的字节数。
参考自 GetIterator(),GetPosition(),operator[]() , 以及 TextFileBuffer().
|
protected |
|
private |
|
protected |
|
protected |