Blender V5.3
blender::gpu::shader::parser::MutableSpan< T > Struct Template Reference

#include <utils.hh>

Public Member Functions

T & operator[] (const int64_t index)
const T & operator[] (const int64_t index) const
T * data ()
uint64_t size () const
T back () const
T * begin ()
T * end ()
const T * begin () const
const T * end () const
void shrink (int64_t new_size)

Public Attributes

T * data_
uint64_t size_

Detailed Description

template<typename T>
struct blender::gpu::shader::parser::MutableSpan< T >

Poor man's MutableSpan.

Definition at line 69 of file gpu/shader_tool/utils.hh.

Member Function Documentation

◆ back()

template<typename T>
T blender::gpu::shader::parser::MutableSpan< T >::back ( ) const
inline

Definition at line 92 of file gpu/shader_tool/utils.hh.

References size_, and T.

◆ begin() [1/2]

template<typename T>
T * blender::gpu::shader::parser::MutableSpan< T >::begin ( )
inline

Definition at line 97 of file gpu/shader_tool/utils.hh.

References data_, and T.

◆ begin() [2/2]

template<typename T>
const T * blender::gpu::shader::parser::MutableSpan< T >::begin ( ) const
inline

Definition at line 106 of file gpu/shader_tool/utils.hh.

References data_, and T.

◆ data()

template<typename T>
T * blender::gpu::shader::parser::MutableSpan< T >::data ( )
inline

Definition at line 82 of file gpu/shader_tool/utils.hh.

References data_, and T.

Referenced by blender::gpu::tests::build_vertices().

◆ end() [1/2]

template<typename T>
T * blender::gpu::shader::parser::MutableSpan< T >::end ( )
inline

Definition at line 101 of file gpu/shader_tool/utils.hh.

References data_, size_, and T.

◆ end() [2/2]

template<typename T>
const T * blender::gpu::shader::parser::MutableSpan< T >::end ( ) const
inline

Definition at line 110 of file gpu/shader_tool/utils.hh.

References data_, size_, and T.

◆ operator[]() [1/2]

template<typename T>
T & blender::gpu::shader::parser::MutableSpan< T >::operator[] ( const int64_t index)
inline

Definition at line 73 of file gpu/shader_tool/utils.hh.

References data_, and T.

◆ operator[]() [2/2]

template<typename T>
const T & blender::gpu::shader::parser::MutableSpan< T >::operator[] ( const int64_t index) const
inline

Definition at line 77 of file gpu/shader_tool/utils.hh.

References data_, and T.

◆ shrink()

template<typename T>
void blender::gpu::shader::parser::MutableSpan< T >::shrink ( int64_t new_size)
inline

Set span size to a smaller size, this invokes undefined behavior when n is negative or bigger than the current span.

Definition at line 119 of file gpu/shader_tool/utils.hh.

References size_.

◆ size()

template<typename T>
uint64_t blender::gpu::shader::parser::MutableSpan< T >::size ( ) const
inline

Definition at line 87 of file gpu/shader_tool/utils.hh.

References size_.

Member Data Documentation

◆ data_

template<typename T>
T* blender::gpu::shader::parser::MutableSpan< T >::data_

Definition at line 70 of file gpu/shader_tool/utils.hh.

Referenced by begin(), begin(), data(), end(), end(), operator[](), and operator[]().

◆ size_

template<typename T>
uint64_t blender::gpu::shader::parser::MutableSpan< T >::size_

Definition at line 71 of file gpu/shader_tool/utils.hh.

Referenced by back(), end(), end(), shrink(), and size().


The documentation for this struct was generated from the following file: