wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
Enums Class Reference

Preferred way to indicate the element types and groups (input, output, etc). More...

#include <Enums.h>

Public Types

enum class  ElementGroup {
  Gate = 4 , IC = 2 , Input = 3 , Memory = 5 ,
  Mux = 7 , Other = 1 , Output = 6 , StaticInput = 8 ,
  Unknown = 0
}
 Logical grouping used to organise elements in the UI palette. More...
enum class  ElementType {
  And = 5 , AudioBox = 31 , Buzzer = 26 , Clock = 9 ,
  DFlipFlop = 17 , DLatch = 15 , Demux = 25 , Display14 = 27 ,
  Display16 = 33 , Display7 = 14 , IC = 22 , InputButton = 1 ,
  InputGnd = 13 , InputRotary = 21 , InputSwitch = 2 , InputVcc = 12 ,
  JKFlipFlop = 18 , JKLatch = 16 , Led = 3 , Line = 29 ,
  Mux = 24 , Nand = 7 , Node = 23 , Nor = 8 ,
  Not = 4 , Or = 6 , SRFlipFlop = 19 , SRLatch = 32 ,
  TFlipFlop = 20 , Text = 28 , TruthTable = 30 , Unknown = 0 ,
  Xnor = 11 , Xor = 10
}
 Numeric identifiers for every concrete element type. More...
enum class  Status { Unknown = -1 , Inactive = 0 , Active = 1 , Error = 2 }
enum class  WirelessMode { None = 0 , Tx = 1 , Rx = 2 }
 Wireless routing mode for Node elements. More...

Public Member Functions

 Enums ()=delete

Static Public Member Functions

static ElementType nextElmType (ElementType type)
 Returns the ElementType that follows type in the defined sequence.
static ElementType prevElmType (ElementType type)
 Returns the ElementType that precedes type in the defined sequence.

Detailed Description

Preferred way to indicate the element types and groups (input, output, etc).

Definition at line 15 of file Enums.h.

Member Enumeration Documentation

◆ ElementGroup

enum class Enums::ElementGroup
strong

Logical grouping used to organise elements in the UI palette.

Enumerator
Gate 

Combinational logic gates (AND, OR, NOT, etc.).

IC 

Integrated circuits (sub-circuit files).

Input 

User-interactive inputs (buttons, switches, rotary).

Memory 

Sequential elements (flip-flops, latches).

Mux 

Multiplexers and demultiplexers.

Other 

Miscellaneous elements (nodes, lines, text, truth tables).

Output 

Output indicators (LEDs, displays, buzzers).

StaticInput 

Constant-value inputs (VCC, GND).

Unknown 

Placeholder for unrecognised groups.

Definition at line 80 of file Enums.h.

◆ ElementType

enum class Enums::ElementType
strong

Numeric identifiers for every concrete element type.

Enumerator
And 

AND gate.

AudioBox 

Audio playback element.

Buzzer 

Buzzer output element.

Clock 

Clock signal generator with configurable frequency.

DFlipFlop 

D (data) flip-flop — edge-triggered.

DLatch 

D (data) latch — level-sensitive.

Demux 

Demultiplexer — routes one input to one of N outputs.

Display14 

14-segment alphanumeric display.

Display16 

16-segment alphanumeric display.

Display7 

7-segment numeric display.

IC 

Integrated circuit (sub-circuit loaded from a .panda file).

InputButton 

Momentary push-button input (active while pressed).

InputGnd 

Constant logic low (GND) source.

InputRotary 

Rotary switch input with multiple positions.

InputSwitch 

Toggle switch input (latched on/off).

InputVcc 

Constant logic high (VCC) source.

JKFlipFlop 

JK flip-flop — edge-triggered.

JKLatch 
Deprecated
JKLatch no longer exists; kept for backward compatibility.
Led 

LED output indicator.

Line 

Decorative line (no logical function).

Mux 

Multiplexer — selects one of N inputs to output.

Nand 

NAND gate.

Node 

Wire junction node (also used for wireless Tx/Rx).

Nor 

NOR gate.

Not 

NOT gate (inverter).

Or 

OR gate.

SRFlipFlop 

SR flip-flop — edge-triggered.

SRLatch 

SR latch — level-sensitive.

TFlipFlop 

T (toggle) flip-flop — edge-triggered.

Text 

Text annotation (no logical function).

TruthTable 

User-defined truth table element.

Unknown 

Placeholder for unrecognised or uninitialised types.

Xnor 

XNOR gate (exclusive NOR).

Xor 

XOR gate (exclusive OR).

Definition at line 41 of file Enums.h.

◆ Status

enum class Enums::Status
strong

Signal status on a port or connection.

Four-state logic (inspired by VHDL std_logic): Unknown — undriven / floating / not yet resolved (U) Inactive — logic low (0) Active — logic high (1) Error — bus conflict / indeterminate (X)

Enumerator
Unknown 
Inactive 
Active 
Error 

Definition at line 29 of file Enums.h.

◆ WirelessMode

enum class Enums::WirelessMode
strong

Wireless routing mode for Node elements.

Enumerator
None 

Normal pass-through node (no wireless routing).

Tx 

Transmitter: broadcasts input signal to all Rx nodes sharing the same label.

Rx 

Receiver: receives signal from the Tx node that shares the same label.

Definition at line 33 of file Enums.h.

Constructor & Destructor Documentation

◆ Enums()

Enums::Enums ( )
delete

Member Function Documentation

◆ nextElmType()

ElementType Enums::nextElmType ( ElementType type)
static

Returns the ElementType that follows type in the defined sequence.

Parameters
typeCurrent element type.

Definition at line 49 of file Enums.cpp.

Referenced by PropertyShortcutHandler::nextElement().

◆ prevElmType()

ElementType Enums::prevElmType ( ElementType type)
static

Returns the ElementType that precedes type in the defined sequence.

Parameters
typeCurrent element type.

Definition at line 57 of file Enums.cpp.

Referenced by PropertyShortcutHandler::prevElement().


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