The BLOCKS SDK
LEDGrid Class Referenceabstract

Description

Represents a 2D grid of LEDs on a block device.

Public Member Functions

 LEDGrid (Block &)
 
virtual ~LEDGrid ()
 Destructor. More...
 
virtual int getNumColumns () const =0
 Returns the number of columns in the LED grid. More...
 
virtual int getNumRows () const =0
 Returns the number of rows in the LED grid. More...
 
void setRenderer (Renderer::Ptr newRenderer) noexcept
 Set the visualiser that will create visuals for this block (nullptr for none). More...
 
Renderer::Ptr getRenderer () const noexcept
 Returns the visualiser currently attached to this block (nullptr for none). More...
 

Public Attributes

Blockblock
 The device that this LEDGrid belongs to. More...
 

Classes

struct  Renderer
 

Constructor & Destructor Documentation

§ LEDGrid()

LEDGrid::LEDGrid ( Block )

§ ~LEDGrid()

virtual LEDGrid::~LEDGrid ( )
virtual

Destructor.

Member Function Documentation

§ getNumColumns()

virtual int LEDGrid::getNumColumns ( ) const
pure virtual

Returns the number of columns in the LED grid.

§ getNumRows()

virtual int LEDGrid::getNumRows ( ) const
pure virtual

Returns the number of rows in the LED grid.

§ setRenderer()

void LEDGrid::setRenderer ( Renderer::Ptr  newRenderer)
noexcept

Set the visualiser that will create visuals for this block (nullptr for none).

Note that the LEDGrid will NOT take ownership of this object, so the caller must ensure that it doesn't get deleted while in use here.

§ getRenderer()

Renderer::Ptr LEDGrid::getRenderer ( ) const
noexcept

Returns the visualiser currently attached to this block (nullptr for none).

Member Data Documentation

§ block

Block& LEDGrid::block

The device that this LEDGrid belongs to.


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