|
Cogs.Core
|
Public Member Functions | |
| MemoryBufferBackedFileContents (Memory::MemoryBuffer &&buffer, const std::string &path, FileContentsHints hints) | |
| Create a file contents object that takes ownership of an existing memorybuffer. | |
| MemoryBufferBackedFileContents (size_t size, const std::string &path, FileContentsHints hints) | |
| MemoryBufferBackedFileContents (void *data, size_t size, FileContentsHints hints) | |
| Memory::MemoryBuffer | take () override |
| Take ownership of underlying memorybuffer if exists. | |
| StringView | origin () override |
Public Member Functions inherited from Cogs::FileContents | |
| 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 | |
| Memory::MemoryBuffer | bytes |
| std::string | path |
Public Attributes inherited from Cogs::FileContents | |
| 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 | |
Public Types inherited from Cogs::FileContents | |
| using | Ptr = std::unique_ptr< FileContents > |
| using | Callback = std::function< void(Ptr &&)> |
Definition at line 6 of file MemoryBufferBackedFileContents.h.
|
inline |
Create a file contents object that takes ownership of an existing memorybuffer.
Definition at line 11 of file MemoryBufferBackedFileContents.h.
|
inline |
Definition at line 17 of file MemoryBufferBackedFileContents.h.
|
inline |
Definition at line 21 of file MemoryBufferBackedFileContents.h.
|
inlineoverridevirtual |
Implements Cogs::FileContents.
Definition at line 27 of file MemoryBufferBackedFileContents.h.
|
inlineoverridevirtual |
Take ownership of underlying memorybuffer if exists.
Implements Cogs::FileContents.
Definition at line 26 of file MemoryBufferBackedFileContents.h.
| Memory::MemoryBuffer Cogs::MemoryBufferBackedFileContents::bytes |
Definition at line 7 of file MemoryBufferBackedFileContents.h.
| std::string Cogs::MemoryBufferBackedFileContents::path |
Definition at line 8 of file MemoryBufferBackedFileContents.h.