Cogs.Core
|
Public Member Functions | |
MMapBackedFileContents (const uint8_t *ptr, size_t size, const FileHandle::Ptr &file, const std::string &path, FileContentsHints hints) | |
Memory::MemoryBuffer | take () override |
Take ownership of underlying memorybuffer if exists. | |
StringView | origin () override |
![]() | |
FileContents (const uint8_t *ptr, size_t size, FileContentsHints hints) | |
FileContents (const FileContents &)=delete | |
FileContents & | operator= (const FileContents &)=delete |
Memory::MemoryBuffer | takeCopy () |
constexpr const void * | data () const |
Access to buffer data. Cast to actual type using static_cast<const MyType*>(..) | |
virtual Memory::MemoryBuffer | take ()=0 |
Take ownership of underlying memorybuffer if exists. | |
virtual StringView | origin ()=0 |
Public Attributes | |
FileHandle::Ptr | file |
std::string | path |
![]() | |
const uint8_t * | ptr |
Start of buffer storing file data. Use. | |
size_t | size |
Number of data bytes. | |
size_t | mimeTypeHash = 0 |
FileContentsHints | hints = FileContentsHints::None |
Additional Inherited Members | |
![]() | |
using | Ptr = std::unique_ptr< FileContents > |
using | Callback = std::function< void(Ptr &&)> |
Definition at line 9 of file MMapBackedFileContents.h.
|
inline |
Definition at line 13 of file MMapBackedFileContents.h.
|
inlineoverridevirtual |
Implements Cogs::FileContents.
Definition at line 22 of file MMapBackedFileContents.h.
|
inlineoverridevirtual |
Take ownership of underlying memorybuffer if exists.
Implements Cogs::FileContents.
Definition at line 21 of file MMapBackedFileContents.h.
FileHandle::Ptr Cogs::MMapBackedFileContents::file |
Definition at line 10 of file MMapBackedFileContents.h.
std::string Cogs::MMapBackedFileContents::path |
Definition at line 11 of file MMapBackedFileContents.h.