Owning contiguous buffer with an explicit logical element count.
More...
#include <src/utility.h>
|
| T * | begin () |
| | Return an iterator to the first byte in the buffer view.
|
| const T * | begin () const |
| | Return an iterator to the first byte in the buffer view.
|
| | buffer_t (buffer_t &&o) noexcept |
| | Move an owning contiguous buffer and leave the source logically empty.
|
| | buffer_t (const buffer_t &o) |
| | Copy the source buffer's logical range into an independent allocation.
|
| | buffer_t (size_t elements) |
| | Construct an owning contiguous buffer.
|
| | buffer_t (size_t elements, const T &t) |
| | Construct an owning contiguous buffer.
|
| T * | end () |
| | Return an iterator one past the final byte in the buffer view.
|
| const T * | end () const |
| | Return an iterator one past the final byte in the buffer view.
|
| void | fake_resize (std::size_t els) |
| | Update the logical element count without reallocating storage.
|
| buffer_t & | operator= (buffer_t &&o) noexcept |
| | Exchange allocations and logical counts with the source buffer.
|
| T & | operator[] (size_t el) |
| | Access an element in the owning buffer.
|
| const T & | operator[] (size_t el) const |
| | Access an element in the owning buffer.
|
| size_t | size () const |
| | Return the serialized size of the current object.
|
template<class T>
class util::buffer_t< T >
Owning contiguous buffer with an explicit logical element count.
◆ buffer_t() [1/4]
Move an owning contiguous buffer and leave the source logically empty.
- Parameters
-
| o | Source object used for comparison or assignment. |
◆ buffer_t() [2/4]
Copy the source buffer's logical range into an independent allocation.
- Parameters
-
| o | Source object used for comparison or assignment. |
◆ buffer_t() [3/4]
Construct an owning contiguous buffer.
- Parameters
-
| elements | Elements copied into the buffer. |
◆ buffer_t() [4/4]
Construct an owning contiguous buffer.
- Parameters
-
| elements | Elements copied into the buffer. |
| t | Initial value used to populate the GPU buffer. |
◆ begin() [1/2]
Return an iterator to the first byte in the buffer view.
- Returns
- Iterator to the first element.
◆ begin() [2/2]
Return an iterator to the first byte in the buffer view.
- Returns
- Iterator to the first element.
◆ end() [1/2]
Return an iterator one past the final byte in the buffer view.
- Returns
- Iterator one past the last element.
◆ end() [2/2]
Return an iterator one past the final byte in the buffer view.
- Returns
- Iterator one past the last element.
◆ fake_resize()
Update the logical element count without reallocating storage.
- Parameters
-
| els | Elements used to initialize the buffer. |
◆ operator=()
Exchange allocations and logical counts with the source buffer.
- Parameters
-
| o | Source object used for comparison or assignment. |
- Returns
- Reference returned by the operator overload.
◆ operator[]() [1/2]
Access an element in the owning buffer.
- Parameters
-
| el | Zero-based element index. |
- Returns
- Mutable reference to the requested element.
◆ operator[]() [2/2]
Access an element in the owning buffer.
- Parameters
-
| el | Zero-based element index. |
- Returns
- Const reference to the requested element.
◆ size()
Return the serialized size of the current object.
- Returns
- Number of elements currently stored.
The documentation for this class was generated from the following file: