|
| | Buffer (const T *data, Typing::USize size) |
| | Constructs the buffer from existing raw memory.
|
| | Buffer (const Buffer< T > &other) |
| | Copy constructor.
|
| | Buffer (Buffer< T > &&other) |
| | Move constructor.
|
|
| ~Buffer () |
| | Destructor.
|
| Buffer< T > & | copy (this const Buffer< T > &self, Buffer< T > &dest, Typing::USize size) |
| | Copies some objects from here to another buffer.
|
| Buffer< T > & | set (this Buffer< T > &self, T c, Typing::USize size) |
| | Sets some objects from this buffer to a given value.
|
| Buffer< T > & | move (this const Buffer< T > &self, Buffer< T > &dest, Typing::USize size) |
| | Moves some objects from here to another buffer.
|
| int | compare (this const Buffer< T > &self, const Buffer< T > &other, Typing::USize size) |
| | Compares some objects between this buffer and another one.
|
| const T * | get (this const Buffer< T > &self) |
| | Gets a constant pointer to the raw memory.
|
| Typing::USize | size (this const Buffer< T > &self) |
| | Gets the size of the buffer.
|
| const T * | begin (this const Buffer< T > &self) |
| | Gets a constant pointer to the base of the raw buffer.
|
| const T * | end (this const Buffer< T > &self) |
| | Gets a constant pointer to the end of the raw buffer.
|
| void | resize (this Buffer< T > &self, Typing::USize new_size) |
| | Resizes the buffer.
|
| bool | operator== (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if a buffer has same size and same content.
|
| bool | operator!= (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if a buffer does not have same size or same content.
|
| bool | operator< (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if this buffer is smaller than another.
|
| bool | operator> (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if this buffer is bigger than another.
|
| bool | operator<= (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if this buffer is smaller than or equals another.
|
| bool | operator>= (this const Buffer< T > &self, const Buffer< T > &other) |
| | Checks if this buffer is bigger than or equals another.
|
| T & | operator[] (this Buffer< T > &self, Typing::USize index) |
| | Gets an object from the buffer.
|
| const T & | operator[] (this const Buffer< T > &self, Typing::USize index) |
| | Gets an object from the buffer.
|
| Buffer< T > & | operator= (this Buffer< T > &self, const Buffer< T > &other) |
| | Copy assignment operator.
|
| Buffer< T > & | operator= (this Buffer< T > &self, Buffer< T > &&other) |
| | Move assignment operator.
|
template<typename T>
class Melon::Memory::Buffer< T >
Container for raw memory.
This container stores allocated raw memory and the size of the allocated area. If T is not trivially constructible, its constructor will never be called internally.