FST  openfst-1.7.1
OpenFst Library
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
fst::MappedFile Class Reference

#include <mapped-file.h>

Public Member Functions

 ~MappedFile ()
 
void * mutable_data () const
 
const void * data () const
 

Static Public Member Functions

static MappedFileMap (std::istream *istrm, bool memorymap, const string &source, size_t size)
 
static MappedFileMapFromFileDescriptor (int fd, int pos, size_t size)
 
static MappedFileAllocate (size_t size, int align=kArchAlignment)
 
static MappedFileBorrow (void *data)
 

Static Public Attributes

static constexpr int kArchAlignment = 16
 
static constexpr size_t kMaxReadChunk = 256 * 1024 * 1024
 

Detailed Description

Definition at line 30 of file mapped-file.h.

Constructor & Destructor Documentation

fst::MappedFile::~MappedFile ( )

Definition at line 23 of file mapped-file.cc.

Member Function Documentation

MappedFile * fst::MappedFile::Allocate ( size_t  size,
int  align = kArchAlignment 
)
static

Definition at line 105 of file mapped-file.cc.

MappedFile * fst::MappedFile::Borrow ( void *  data)
static

Definition at line 120 of file mapped-file.cc.

const void* fst::MappedFile::data ( ) const
inline

Definition at line 36 of file mapped-file.h.

MappedFile * fst::MappedFile::Map ( std::istream *  istrm,
bool  memorymap,
const string &  source,
size_t  size 
)
static

Definition at line 38 of file mapped-file.cc.

MappedFile * fst::MappedFile::MapFromFileDescriptor ( int  fd,
int  pos,
size_t  size 
)
static

Definition at line 85 of file mapped-file.cc.

void* fst::MappedFile::mutable_data ( ) const
inline

Definition at line 34 of file mapped-file.h.

Member Data Documentation

constexpr int fst::MappedFile::kArchAlignment = 16
static

Definition at line 68 of file mapped-file.h.

constexpr size_t fst::MappedFile::kMaxReadChunk = 256 * 1024 * 1024
static

Definition at line 70 of file mapped-file.h.


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