wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ElementInfo< InputSwitch > 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 17 of file InputSwitch.cpp.

Member Function Documentation

◆ metadata()

ElementMetadata ElementInfo< InputSwitch >::metadata ( )
inlinestatic

Definition at line 30 of file InputSwitch.cpp.

References constraints, and metadataFromConstraints().

Member Data Documentation

◆ constraints

ElementConstraints ElementInfo< InputSwitch >::constraints
staticconstexpr
Initial value:
{
.type = ElementType::InputSwitch,
.group = ElementGroup::Input,
.minOutputSize = 1,
.maxOutputSize = 1,
.canChangeAppearance = true,
.hasTrigger = true,
.hasLabel = true,
.rotatesGraphic = false,
}

Definition at line 18 of file InputSwitch.cpp.

Referenced by metadata().

◆ registered

const bool ElementInfo< InputSwitch >::registered
inlinestatic
Initial value:
= []() {
ElementFactory::registerCreator(constraints.type, [] { return new InputSwitch(); });
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 at line 44 of file InputSwitch.cpp.


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