MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::ShapeDefInstruction::Decoded Struct Reference

Contains the parsed instruction type with its data. More...

#include <ShapeDesigner.h>

Public Member Functions

bool valid () const noexcept
 Returns true is the data is valid.
 
template<typename T >
void setPayload (std::optional< T > &&optData)
 Sets the payload.
 

Public Attributes

ShapeDefInstructionType type {}
 Instruction type.
 
InstructionData data {std::monostate{}}
 Data for instruction.
 

Detailed Description

Contains the parsed instruction type with its data.

Member Function Documentation

◆ setPayload()

template<typename T >
void musx::dom::ShapeDefInstruction::Decoded::setPayload ( std::optional< T > &&  optData)
inline

Sets the payload.

Template Parameters
TThe instruction-specific type for the data.
Parameters
optDataThe data supplied from the parse routine.