|
HikoGUI
A low latency retained GUI
|
#include <ttauri/file_view.hpp>
Public Member Functions | |
| file_view (std::shared_ptr< file_mapping > const &mappingObject, size_t offset, size_t size) | |
| file_view (URL const &location, access_mode accessMode=access_mode::open_for_read, size_t offset=0, size_t size=0) | |
| file_view (file_view const &other) noexcept | |
| file_view (file_view &&other) noexcept | |
| file_view & | operator= (file_view const &other) noexcept |
| file_view & | operator= (file_view &&other) noexcept |
| access_mode | accessMode () const noexcept |
| URL const & | location () const noexcept |
| size_t | offset () const noexcept override |
| size_t | size () const noexcept override |
| std::byte * | data () noexcept |
| std::byte const * | data () const noexcept override |
| std::span< std::byte > | bytes () noexcept |
| std::span< std::byte const > | bytes () const noexcept override |
| std::string_view | string_view () noexcept |
| std::string_view | string_view () const noexcept override |
| void | flush (void *base, size_t size) |
| Flush changes in memory to the open file. | |
Public Member Functions inherited from tt::resource_view | |
| resource_view (resource_view const &other)=default | |
| resource_view (resource_view &&other)=default | |
| resource_view & | operator= (resource_view const &other)=default |
| resource_view & | operator= (resource_view &&other)=default |
| operator std::span< std::byte const > () const noexcept | |
Static Public Member Functions | |
| static std::unique_ptr< resource_view > | loadView (URL const &location) |
Map a file into virtual memory.
|
inlinenoexcept |
Access mode of the opened file.
|
inlineoverridevirtualnoexcept |
Span to the mapping into memory.
Implements tt::resource_view.
|
inlinenoexcept |
Span to the mapping into memory.
|
inlineoverridevirtualnoexcept |
Pointer to the mapping into memory.
Implements tt::resource_view.
|
inlinenoexcept |
Pointer to the mapping into memory.
| void tt::file_view::flush | ( | void * | base, |
| size_t | size ) |
Flush changes in memory to the open file.
| base | Start location of the memory to flush. |
| size | Number of bytes from the base of the memory region to flush. |
|
inlinestatic |
Load a view of a resource. This is used when the resource that needs to be opened is a file.
|
inlineoverridevirtualnoexcept |
Offset of the mapping into the file.
Implements tt::resource_view.
|
inlineoverridevirtualnoexcept |
Number of bytes which is mapped to memory.
Implements tt::resource_view.
|
inlineoverridevirtualnoexcept |
String view to the mapping into memory.
Implements tt::resource_view.
|
inlinenoexcept |
String view to the mapping into memory.