Medial Code Documentation
|
Handler for one-shot resource. More...
#include <io.h>
Public Types | |
enum | Kind : std::uint8_t { kMalloc = 0 , kMmap = 1 } |
Public Member Functions | |
virtual void * | Data ()=0 |
template<typename T > | |
T * | DataAs () |
virtual std::size_t | Size () const =0 |
auto | Type () const |
ResourceHandler (Kind kind) | |
ResourceHandler (ResourceHandler const &that)=delete | |
ResourceHandler & | operator= (ResourceHandler const &that)=delete |
ResourceHandler (ResourceHandler &&that)=delete | |
ResourceHandler & | operator= (ResourceHandler &&that)=delete |
bool | IsSameType (ResourceHandler const &that) const |
Wether two resources have the same type. | |
Handler for one-shot resource.
Unlike std::pmr::*
, the resource handler is fixed once it's constructed. Users cannot use mutable operations like resize without acquiring the specific resource first.
|
inline |
Wether two resources have the same type.
(both malloc or both mmap).