Provides easy way to lock a pointer to the memory.
More...
#include <FileMappedStorage.h>
Provides easy way to lock a pointer to the memory.
◆ Lock() [1/2]
◆ Lock() [2/2]
Constructor.
- Parameters
-
ds | Data store instance. |
seg_idx | Designated segment. |
◆ ~Lock()
sf::FileMappedStorage::Lock::~Lock |
( |
| ) |
|
|
inline |
◆ acquire()
bool sf::FileMappedStorage::Lock::acquire |
( |
size_type |
seg_idx | ) |
|
Tries to lock the segment index of the data store and returns true when successful.
- Parameters
-
- Returns
- Return true when acquired.
◆ data()
void * sf::FileMappedStorage::Lock::data |
( |
size_type |
blk_ofs | ) |
|
Returns pointer to .
- Parameters
-
- Returns
- Data pointer
◆ isAcquired()
bool sf::FileMappedStorage::Lock::isAcquired |
( |
| ) |
const |
|
inline |
Gets the segment acquired status.
- Returns
- True when acquired.
◆ operator bool()
sf::FileMappedStorage::Lock::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Gets the segment acquired status.
- Returns
- True when acquired.
◆ ptr()
template<typename T = void*>
T * sf::FileMappedStorage::Lock::ptr |
( |
size_type |
blk_ofs | ) |
|
|
inline |
Typed template method.
- Template Parameters
-
T | Type of the return value. |
- Parameters
-
blk_ofs | offset in to the data. |
- Returns
- Typed pointer.
◆ release()
void sf::FileMappedStorage::Lock::release |
( |
| ) |
|
Unlocks memory locked by the segment.
The documentation for this class was generated from the following file: