Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::BufferBase Class Referenceabstract
Inheritance diagram for inviwo::BufferBase:

Public Member Functions

virtual void append (const BufferBase &)=0
 BufferBase (const BufferBase &rhs)=default
 BufferBase (size_t defaultSize, const DataFormatBase *defaultFormat, BufferUsage usage, BufferTarget target)
virtual BufferBase * clone () const override=0
bool empty () const
BufferTarget getBufferTarget () const
BufferUsage getBufferUsage () const
const DataFormatBasegetDataFormat () const
virtual Document getInfo () const =0
size_t getSize () const
size_t getSizeInBytes () const
BufferBase & operator= (const BufferBase &that)=default
void setDataFormat (const DataFormatBase *format)
void setSize (size_t size)
Public Member Functions inherited from inviwo::Data< BufferBase, BufferRepresentation >
void addRepresentation (std::shared_ptr< BufferRepresentation > representation)
void clearRepresentations ()
T * getEditableRepresentation ()
const T * getRepresentation () const
std::shared_ptr< const T > getRepresentationShared () const
bool hasRepresentation () const
bool hasRepresentations () const
void invalidateAllOther (const BufferRepresentation *repr)
void removeOtherRepresentations (const BufferRepresentation *representation)
void removeRepresentation (const BufferRepresentation *representation)
void updateResource (const ResourceMeta &meta) const

Static Public Attributes

static constexpr std::string_view classIdentifier {"org.inviwo.Buffer"}
static constexpr uvec3 colorCode {255, 113, 0}
static constexpr std::string_view dataName {"Buffer"}

Protected Attributes

const DataFormatBasedefaultDataFormat_
size_t defaultSize_
BufferTarget target_
BufferUsage usage_

Additional Inherited Members

Public Types inherited from inviwo::Data< BufferBase, BufferRepresentation >
using repr
using self
Protected Member Functions inherited from inviwo::Data< BufferBase, BufferRepresentation >
decltype(auto) getLastOr (F &&f, T &&fallback) const
Data< BufferBase, BufferRepresentation > & operator= (const Data< BufferBase, BufferRepresentation > &that)
void setLastAndInvalidateOther (F &&f, T &&value)

Member Function Documentation

◆ clone()

virtual BufferBase * inviwo::BufferBase::clone ( ) const
overridepure virtual

◆ setDataFormat()

void inviwo::BufferBase::setDataFormat ( const DataFormatBase * format)

Set the format of the data.

See also
DataFormatBase
Parameters
formatThe format of the data.

◆ setSize()

void inviwo::BufferBase::setSize ( size_t size)

Set the number of elements in the buffer. This is destructive, the data will not be preserved.

Note
Resizes the last valid representation and erases all representations. Last valid representation will remain valid after changing the size.

The documentation for this class was generated from the following file:
  • include/inviwo/core/datastructures/buffer/buffer.h