FST  openfst-1.8.3
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 std::string &source, size_t size)
 
static MappedFileMapFromFileDescriptor (int fd, size_t pos, size_t size)
 
static MappedFileAllocate (size_t size, size_t align=kArchAlignment)
 
template<typename T >
static MappedFileAllocateType (size_t count)
 
static MappedFileBorrow (void *data)
 

Static Public Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

fst::MappedFile::~MappedFile ( )

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

Member Function Documentation

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

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

template<typename T >
static MappedFile* fst::MappedFile::AllocateType ( size_t  count)
inlinestatic

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

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

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

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

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

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

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

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

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

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

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

Member Data Documentation

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

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

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

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


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