wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ElementInfo< Buzzer > Struct Reference

Static Public Member Functions

static ElementMetadata metadata ()

Static Public Attributes

static constexpr ElementConstraints constraints
static const bool registered

Detailed Description

Definition at line 18 of file Buzzer.cpp.

Member Function Documentation

◆ metadata()

ElementMetadata ElementInfo< Buzzer >::metadata ( )
inlinestatic

Definition at line 32 of file Buzzer.cpp.

References constraints, and metadataFromConstraints().

Member Data Documentation

◆ constraints

ElementConstraints ElementInfo< Buzzer >::constraints
staticconstexpr
Initial value:
{
.type = ElementType::Buzzer,
.group = ElementGroup::Output,
.minInputSize = 1,
.maxInputSize = 1,
.canChangeAppearance = true,
.hasFrequency = true,
.hasLabel = true,
.hasVolume = true,
.rotatesGraphic = false,
}

Definition at line 19 of file Buzzer.cpp.

Referenced by metadata().

◆ registered

const bool ElementInfo< Buzzer >::registered
inlinestatic
Initial value:
= []() {
ElementFactory::registerCreator(constraints.type, [] { return new Buzzer(); });
return true;
}()
static void registerCreator(ElementType type, std::function< GraphicElement *()> creator)
Registers a creator lambda for type, used by buildElement().
static void registerMetadata(const ElementMetadata &meta)
Registers meta in the global map (called once per element type at startup).
static constexpr ElementConstraints constraints
Definition And.cpp:12
static ElementMetadata metadata()
Definition Buzzer.cpp:32

Definition at line 46 of file Buzzer.cpp.


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