OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::double_buffer< T > Class Template Reference

Class holding two instances of type T and allows to switch them. More...

#include <eagine/double_buffer.hpp>

Public Member Functions

 double_buffer ()=default
 Default constructor.
 
 double_buffer (const T &initial)
 Constructor setting the initial value for both buffers.
 
void swap () noexcept
 Swaps the front and the back buffers. More...
 
auto front () noexcept -> T &
 Returns a reference to the current "front" instance.
 
auto front () const noexcept -> const T &
 Returns a const reference to the current "front" instance.
 
auto back () noexcept -> T &
 Returns a reference to the current "back" instance.
 
auto back () const noexcept -> const T &
 Returns a const reference to the current "back" instance.
 

Detailed Description

template<typename T>
class eagine::double_buffer< T >

Class holding two instances of type T and allows to switch them.

Member Function Documentation

◆ swap()

template<typename T >
void eagine::double_buffer< T >::swap ( )
inlinenoexcept

Swaps the front and the back buffers.

See also
front
back

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).