Inviwo  0.9.10.1
Inviwo documentation
inviwo::BufferBase Class Referenceabstract
+ Inheritance diagram for inviwo::BufferBase:

Public Member Functions

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

Static Public Attributes

static uvec3 colorCode = uvec3(255, 113, 0)
 
static const std::string classIdentifier = "org.inviwo.Buffer"
 
static const std::string dataName = "Buffer"
 

Protected Attributes

size_t defaultSize_
 
BufferUsage usage_
 
BufferTarget target_
 
const DataFormatBasedefaultDataFormat_
 
- Protected Attributes inherited from inviwo::Data< BufferBase, BufferRepresentation >
std::mutex mutex_
 
std::unordered_map< std::type_index, std::shared_ptr< BufferRepresentation > > representations_
 
std::shared_ptr< BufferRepresentationlastValidRepresentation_
 

Additional Inherited Members

- Public Types inherited from inviwo::Data< BufferBase, BufferRepresentation >
using self = BufferBase
 
using repr = BufferRepresentation
 
- Protected Member Functions inherited from inviwo::Data< BufferBase, BufferRepresentation >
 Data (const Data< BufferBase, BufferRepresentation > &rhs)
 
Data< BufferBase, BufferRepresentation > & operator= (const Data< BufferBase, BufferRepresentation > &rhs)
 
const T * getValidRepresentation () const
 
void copyRepresentationsTo (Data< BufferBase, BufferRepresentation > *targetData) const
 
std::shared_ptr< BufferRepresentationaddRepresentationInternal (std::shared_ptr< BufferRepresentation > representation) const
 

Member Function Documentation

◆ 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 files: