|
Alexandria 2.32.0
SDC-CH common library for the Euclid project
|
#include <FileAccessor.h>


Public Types | |
| using | ReleaseDescriptorCallback = std::function<void(TFD&&)> |
| Public Types inherited from Euclid::FilePool::FileAccessorBase | |
| using | SharedMutex = boost::shared_mutex |
| using | SharedLock = boost::shared_lock<SharedMutex> |
| using | UniqueLock = boost::unique_lock<SharedMutex> |
| using | UpgradeLock = boost::upgrade_lock<SharedMutex> |
| using | UpgradeToUniqueLock = boost::upgrade_to_unique_lock<SharedMutex> |
Public Member Functions | |
| virtual | ~FileAccessor ()=default |
| Destructor. | |
| Public Member Functions inherited from Euclid::FilePool::FileAccessorBase | |
| virtual | ~FileAccessorBase ()=default |
| virtual bool | isReadOnly () const =0 |
Public Attributes | |
| TFD | m_fd |
| The wrapped file descriptor. | |
Protected Member Functions | |
| FileAccessor (TFD &&fd, ReleaseDescriptorCallback release_callback) | |
Protected Attributes | |
| ReleaseDescriptorCallback | m_release_callback |
Wraps a file descriptor, so when the instance is destroyed, the callback is called with the wrapped descriptor moved-in
| TFD | File descriptor type |
This is a base class that hides away if the accessor is read-only or write-only, as the locking mechanisms in each case should not bother the calling code
Definition at line 54 of file FileAccessor.h.
| using Euclid::FilePool::FileAccessor< TFD >::ReleaseDescriptorCallback = std::function<void(TFD&&)> |
Definition at line 56 of file FileAccessor.h.
|
virtualdefault |
Destructor.
|
protected |
| TFD Euclid::FilePool::FileAccessor< TFD >::m_fd |
The wrapped file descriptor.
Definition at line 59 of file FileAccessor.h.
|
protected |
Definition at line 67 of file FileAccessor.h.