litert::
MutableBufferRef
#include <litert_buffer_ref.h>
A writable, non-owning version of BufferRef
.
Summary
ByteT
Inheritance
Inherits from: litert::BufferRef< ByteT >Direct Known Subclasses: litert::OwningBufferRef< ByteT, Allocator >
Constructors and Destructors
MutableBufferRef
(ByteT *data, size_t size, size_t offset)
MutableBufferRef
(void *data, size_t size, size_t offset)
MutableBufferRef
(absl::Span< ByteT > data)
MutableBufferRef
(absl::Span< const ByteT > data)
MutableBufferRef
(const ByteT *, size_t, size_t)
MutableBufferRef
(const void *, size_t, size_t)
MutableBufferRef
(const MutableBufferRef
& other)
Public types
std::tuple< ByteT *const, const size_t, const size_t >
Public functions
Data
()
ByteT *
Get
()
TupleT
Span
()
absl::Span< ByteT >
StrData
()
char *
WriteInto
(absl::string_view str, size_t offset)
bool
operator=
(const MutableBufferRef
& other)=default
Protected functions
TypeName
() const override
virtual absl::string_view
Public types
TupleT
std :: tuple < ByteT * const , const size_t , const size_t > TupleT
Public functions
Data
ByteT * Data()
Returns a mutable pointer to the start of the actual data.
Get
TupleT Get()
Returns the buffer info as a tuple.
MutableBufferRef
MutableBufferRef()
Constructs a null buffer.
MutableBufferRef
MutableBufferRef( ByteT *data, size_t size, size_t offset )
Creates a mutable view from a pre-allocated non-const buffer.
MutableBufferRef
MutableBufferRef( void *data, size_t size, size_t offset )
MutableBufferRef
MutableBufferRef( absl::Span< ByteT > data )
MutableBufferRef
MutableBufferRef ( absl :: Span < const ByteT > data ) = delete
MutableBufferRef
MutableBufferRef ( const ByteT * , size_t , size_t ) = delete
MutableBufferRef
MutableBufferRef ( const void * , size_t , size_t ) = delete
MutableBufferRef
MutableBufferRef ( const MutableBufferRef & other ) = default
Span
absl::Span< ByteT > Span()
Returns a mutable span of the actual data.
StrData
char * StrData()
Returns a mutable char pointer to the start of the actual data.
WriteInto
bool WriteInto( absl::string_view str, size_t offset )
Writes a string into the buffer at a specified offset.
str
|
The string to write.
|
offset
|
The offset at which to start writing.
|
true
if the entire string fits and is written, false
otherwise.operator=
MutableBufferRef & operator = ( const MutableBufferRef & other ) = default
Protected functions
TypeName
virtual absl :: string_view TypeName () const override
Returns the debug name of the class.

