distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::SwapPopQueueFunctor< T > Class Template Reference

#include "distortos/internal/synchronization/SwapPopQueueFunctor.hpp"

Inheritance diagram for distortos::internal::SwapPopQueueFunctor< T >:
[legend]
Collaboration diagram for distortos::internal::SwapPopQueueFunctor< T >:
[legend]

Public Member Functions

constexpr SwapPopQueueFunctor (T &value)
 SwapPopQueueFunctor's constructor. More...
 
void operator() (void *const storage) const override
 Swaps the element in the queue's storage with the value provided by user and destroys this value when no longer needed. More...
 

Private Attributes

T & value_
 reference to object that will be used to return popped value More...
 

Detailed Description

template<typename T>
class distortos::internal::SwapPopQueueFunctor< T >

SwapPopQueueFunctor is a functor used for popping of data from the queue using swap

Template Parameters
Tis the type of data popped from the queue

Constructor & Destructor Documentation

◆ SwapPopQueueFunctor()

template<typename T >
constexpr distortos::internal::SwapPopQueueFunctor< T >::SwapPopQueueFunctor ( T &  value)
inlineexplicit

SwapPopQueueFunctor's constructor.

Parameters
[out]valueis a reference to object that will be used to return popped value, its contents are swapped with the value in the queue's storage and destructed when no longer needed

Member Function Documentation

◆ operator()()

template<typename T >
void distortos::internal::SwapPopQueueFunctor< T >::operator() ( void *const  storage) const
inlineoverride

Swaps the element in the queue's storage with the value provided by user and destroys this value when no longer needed.

Parameters
[in,out]storageis a pointer to storage with element
Here is the call graph for this function:

Member Data Documentation

◆ value_

template<typename T >
T& distortos::internal::SwapPopQueueFunctor< T >::value_
private

reference to object that will be used to return popped value


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