|
| virtual IMemMapper & | Resize (size_t size)=0 |
| | Resize a mapped file. More...
|
| |
| virtual size_t | Size () const noexcept=0 |
| | Get the size of this mapping. More...
|
| |
| virtual const uint8_t * | Get () const noexcept=0 |
| | Obtain a read-only pointer to the mapped data. More...
|
| |
| virtual uint8_t * | Get () noexcept=0 |
| | Obtain a writable pointer to the mapped data. More...
|
| |
◆ Get() [1/2]
| virtual const uint8_t* AssetMap::IMemMapper::Get |
( |
| ) |
const |
|
pure virtualnoexcept |
Obtain a read-only pointer to the mapped data.
- Returns
- A const pointer to the data guaranteed to be readable up to but not including the address at Get() + Size()
Implemented in AssetMap::MemMapper.
◆ Get() [2/2]
| virtual uint8_t* AssetMap::IMemMapper::Get |
( |
| ) |
|
|
pure virtualnoexcept |
Obtain a writable pointer to the mapped data.
- Precondition
- An implementation-defined constructor that opens the mapping in write mode or a call to Resize() must have occurred.
- Returns
- A pointer to the data guaranteed to be readable/writable up to but not including the address at Get() + Size()
Implemented in AssetMap::MemMapper.
◆ Resize()
| virtual IMemMapper& AssetMap::IMemMapper::Resize |
( |
size_t |
size | ) |
|
|
pure virtual |
Resize a mapped file.
- Parameters
-
| size | Desired size. Can be larger or smaller. Must be > 0 |
- Exceptions
-
| std::runtime_error | for any implementation-defined failure. Typically errors in resizing or re-opening the memory mapping. |
- Postcondition
- All pointers & references to mapped data are invalidated. The memory mapped area will be writable after returning. If an exception is thrown, only the destructor is guaranteed to work.
- Returns
- A reference to *this
Implemented in AssetMap::MemMapper.
◆ Size()
| virtual size_t AssetMap::IMemMapper::Size |
( |
| ) |
const |
|
pure virtualnoexcept |
Get the size of this mapping.
- Returns
- The size in bytes of the mapping
Implemented in AssetMap::MemMapper.
The documentation for this class was generated from the following file: