LLDB mainline
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
lldb_private::FileCache Class Reference

#include <FileCache.h>

Public Member Functions

lldb::user_id_t OpenFile (const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error)
 
bool CloseFile (lldb::user_id_t fd, Status &error)
 
uint64_t WriteFile (lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error)
 
uint64_t ReadFile (lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error)
 

Static Public Member Functions

static FileCacheGetInstance ()
 

Private Types

typedef std::map< lldb::user_id_t, lldb::FileUPFDToFileMap
 

Private Member Functions

 FileCache ()=default
 

Private Attributes

FDToFileMap m_cache
 

Static Private Attributes

static FileCachem_instance = nullptr
 

Detailed Description

Definition at line 22 of file FileCache.h.

Member Typedef Documentation

◆ FDToFileMap

Definition at line 26 of file FileCache.h.

Constructor & Destructor Documentation

◆ FileCache()

lldb_private::FileCache::FileCache ( )
privatedefault

Referenced by GetInstance().

Member Function Documentation

◆ CloseFile()

bool FileCache::CloseFile ( lldb::user_id_t  fd,
Status error 
)

Definition at line 43 of file FileCache.cpp.

References error(), m_cache, and UINT64_MAX.

Referenced by lldb_private::Platform::CloseFile().

◆ GetInstance()

FileCache & FileCache::GetInstance ( )
static

◆ OpenFile()

lldb::user_id_t FileCache::OpenFile ( const FileSpec file_spec,
File::OpenOptions  flags,
uint32_t  mode,
Status error 
)

◆ ReadFile()

uint64_t FileCache::ReadFile ( lldb::user_id_t  fd,
uint64_t  offset,
void *  dst,
uint64_t  dst_len,
Status error 
)

Definition at line 90 of file FileCache.cpp.

References error(), m_cache, and UINT64_MAX.

Referenced by lldb_private::Platform::ReadFile().

◆ WriteFile()

uint64_t FileCache::WriteFile ( lldb::user_id_t  fd,
uint64_t  offset,
const void *  src,
uint64_t  src_len,
Status error 
)

Definition at line 63 of file FileCache.cpp.

References error(), m_cache, and UINT64_MAX.

Referenced by lldb_private::Platform::WriteFile().

Member Data Documentation

◆ m_cache

FDToFileMap lldb_private::FileCache::m_cache
private

Definition at line 43 of file FileCache.h.

Referenced by CloseFile(), OpenFile(), ReadFile(), and WriteFile().

◆ m_instance

FileCache * FileCache::m_instance = nullptr
staticprivate

Definition at line 41 of file FileCache.h.

Referenced by GetInstance().


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