dispenso
A library for task parallelism
 
Loading...
Searching...
No Matches
dispenso::Resource< T > Class Template Reference

#include <resource_pool.h>

Public Member Functions

 Resource (Resource &&other)
 
Resourceoperator= (Resource &&other)
 
Tget ()
 

Friends

class ResourcePool< T >
 

Detailed Description

template<typename T>
class dispenso::Resource< T >

A RIAA wrapper for a user's type that can manage accessibility and ensures the resource will go back into the ResourcePool upon destruction.

Definition at line 30 of file resource_pool.h.

Constructor & Destructor Documentation

◆ Resource()

template<typename T >
dispenso::Resource< T >::Resource ( Resource< T > &&  other)
inline

Definition at line 32 of file resource_pool.h.

◆ ~Resource()

template<typename T >
dispenso::Resource< T >::~Resource ( )
inline

Definition at line 55 of file resource_pool.h.

Member Function Documentation

◆ get()

template<typename T >
T & dispenso::Resource< T >::get ( )
inline

Access the underlying resource object.

Returns
a reference to the resource.

Definition at line 51 of file resource_pool.h.

◆ operator=()

template<typename T >
Resource & dispenso::Resource< T >::operator= ( Resource< T > &&  other)
inline

Definition at line 36 of file resource_pool.h.

Friends And Related Symbol Documentation

◆ ResourcePool< T >

template<typename T >
friend class ResourcePool< T >
friend

Definition at line 65 of file resource_pool.h.


The documentation for this class was generated from the following file: