Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::Grid2D< T >::Row Struct Reference

Mutable view over a single column in the grid. More...

#include <spk_grid_2d.hpp>

Collaboration diagram for spk::Grid2D< T >::Row:
Collaboration graph

Public Member Functions

Unitoperator[] (size_t y)
 Accesses an element within the column.
const Unitoperator[] (size_t y) const
 Read-only access to an element within the column.

Public Attributes

Unitptr
 Pointer to the first element of the column slice.
size_t len
 Number of elements in the column slice.

Detailed Description

template<typename T>
struct spk::Grid2D< T >::Row

Mutable view over a single column in the grid.

Member Function Documentation

◆ operator[]() [1/2]

template<typename T>
Unit & spk::Grid2D< T >::Row::operator[] ( size_t y)
inline

Accesses an element within the column.

Parameters
yRow index inside the column.
Returns
Reference to the requested cell.

◆ operator[]() [2/2]

template<typename T>
const Unit & spk::Grid2D< T >::Row::operator[] ( size_t y) const
inline

Read-only access to an element within the column.

Parameters
yRow index inside the column.
Returns
Const reference to the requested cell.

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