librime: rime::MappedFile Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Protected Member Functions | List of all members
rime::MappedFile Class Reference

`#include <mapped_file.h>`

Inheritance diagram for rime::MappedFile:
[legend]

## Public Member Functions
| MappedFile (const MappedFile &)=delete
MappedFile & | operator= (const MappedFile &)=delete
bool | Exists () const
bool | IsOpen () const
void | Close ()
bool | Remove ()
template<class T>
T * | Find (size_t offset)
const path & | file_path () const
size_t | file_size () const

## Protected Member Functions
| MappedFile (const path &file_path)
virtual | ~MappedFile ()
bool | Create (size_t capacity)
bool | OpenReadOnly ()
bool | OpenReadWrite ()
bool | Flush ()
bool | Resize (size_t capacity)
bool | ShrinkToFit ()
template<class T>
T * | Allocate (size_t count=1)
template<class T>
Array< T > * | CreateArray (size_t array_size)
String * | CreateString (const string &str)
bool | CopyString (const string &src, String *dest)
size_t | capacity () const
char * | address () const

## Constructor & Destructor Documentation

## ◆ MappedFile() [1/2]

rime::MappedFile::MappedFile | ( | const path & | file_path | ) |
| explicitprotected

## ◆ ~MappedFile()

rime::MappedFile::~MappedFile | ( |  | ) |
| protectedvirtual

## ◆ MappedFile() [2/2]

rime::MappedFile::MappedFile | ( | const MappedFile & |  | ) |
| delete

## Member Function Documentation

## ◆ address()

char * rime::MappedFile::address | ( |  | ) | const
| protected

## ◆ Allocate()

template<class T>

T * rime::MappedFile::Allocate | ( | size_t | count = 1 | ) |
| protected

## ◆ capacity()

size_t rime::MappedFile::capacity | ( |  | ) | const
| protected

## ◆ Close()

void rime::MappedFile::Close | ( |  | ) |

## ◆ CopyString()

bool rime::MappedFile::CopyString | ( | const string & | src,
|  | String * | dest )
| protected

## ◆ Create()

bool rime::MappedFile::Create | ( | size_t | capacity | ) |
| protected

## ◆ CreateArray()

template<class T>

Array< T > * rime::MappedFile::CreateArray | ( | size_t | array_size | ) |
| protected

## ◆ CreateString()

String * rime::MappedFile::CreateString | ( | const string & | str | ) |
| protected

## ◆ Exists()

bool rime::MappedFile::Exists | ( |  | ) | const

## ◆ file_path()

const path & rime::MappedFile::file_path | ( |  | ) | const
| inline

## ◆ file_size()

size_t rime::MappedFile::file_size | ( |  | ) | const
| inline

## ◆ Find()

template<class T>

T * rime::MappedFile::Find | ( | size_t | offset | ) |

## ◆ Flush()

bool rime::MappedFile::Flush | ( |  | ) |
| protected

## ◆ IsOpen()

bool rime::MappedFile::IsOpen | ( |  | ) | const

## ◆ OpenReadOnly()

bool rime::MappedFile::OpenReadOnly | ( |  | ) |
| protected

## ◆ OpenReadWrite()

bool rime::MappedFile::OpenReadWrite | ( |  | ) |
| protected

## ◆ operator=()

MappedFile & rime::MappedFile::operator= | ( | const MappedFile & |  | ) |
| delete

## ◆ Remove()

bool rime::MappedFile::Remove | ( |  | ) |

## ◆ Resize()

bool rime::MappedFile::Resize | ( | size_t | capacity | ) |
| protected

## ◆ ShrinkToFit()

bool rime::MappedFile::ShrinkToFit | ( |  | ) |
| protected

The documentation for this class was generated from the following files:

- mapped_file.h
- mapped_file.cc