Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
a manager class that invokes the copy constructor on the managed ptr when copied (deep copy) More...
Public Member Functions | |
Buffer () | |
new T More... | |
Buffer (const T &t) | |
new T(t) More... | |
Buffer (const Buffer &src) | |
Buffer (Buffer &&t) | |
Buffer & | operator= (Buffer src) |
~Buffer () | |
delete managed object More... | |
T & | data () const |
Get write access to the data on the heap. More... | |
Friends | |
void | swap (Buffer &first, Buffer &second) |
a manager class that invokes the copy constructor on the managed ptr when copied (deep copy)
this class is most useful as a memory buffer for classes that need some workspace to fulfill their task but do otherwise not change their state. A buffer object can be declared const while the data it holds are still writeable.
T | must be default constructible and copyable |
|
inline |
new T
|
inline |
new T(t)
|
inline |
|
inline |
|
inline |
delete managed object
|
inline |
Get write access to the data on the heap.
|
inline |