# cassandraproject/calcviewwin architecture

> Architecture diagram of the GitHub repository cassandraproject/calcviewwin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cassandraproject/calcviewwin
- Repository: https://github.com/cassandraproject/calcviewwin

## Overview

CALCView is a Windows graphical editor and debugger for Foxboro CALC-family blocks. Users edit block steps and registers, select a block type, then run, step, or stop emulation while inspecting steps, registers, and the stack. The README also describes block parameters and online editing through the ICC Driver Task. The graph distinguishes the document’s orchestration from machine execution and the UI’s inspection surfaces. Some unsampled features are included from README documentation; their internal wiring is not asserted.

Main entry points: [`CALCViewWinDoc.cpp`](https://github.com/cassandraproject/calcviewwin/blob/master/CALCViewWinDoc.cpp) (Block Document), [`MainFrm.cpp`](https://github.com/cassandraproject/calcviewwin/blob/master/MainFrm.cpp) (Application Frame), [`Machine.cpp`](https://github.com/cassandraproject/calcviewwin/blob/master/Machine.cpp) (Block Machine), [`StepsView.cpp`](https://github.com/cassandraproject/calcviewwin/blob/master/StepsView.cpp) (Steps View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editing["Block Editing"]
  node_document["Block Document<br/>[CALCViewWinDoc.cpp]"]
  node_stepedit["Step Editing"]
  node_quicklist["Editable Lists<br/>[QuickList.cpp]"]
end

subgraph group_runtime["Emulation Runtime"]
  node_machine["Block Machine<br/>[Machine.cpp]"]
  node_instruction["Instruction Set"]
  node_memory["Memory and Registers<br/>[Mem_Status.h]"]
  node_emulator["Emulator<br/>[Emulator.cpp]"]
end

subgraph group_inspection["Debugger Views"]
  node_stepview["Steps View<br/>[StepsView.cpp]"]
  node_stepsmodel["Steps Table"]
  node_registerview["Registers View<br/>[RegistersView.cpp]"]
  node_registermodel["Registers Table"]
  node_stackview["Stack View<br/>[StackView.cpp]"]
  node_mainframe["Application Frame<br/>[MainFrm.cpp]"]
end

subgraph group_integration["Configuration and Online"]
  node_parameters["Block Parameters<br/>[ParametersBox.cpp]"]
  node_preferences["Preferences<br/>[Preferences.cpp]"]
  node_connect["Online Editing<br/>[ConnectBox.cpp]"]
end

node_user(("Engineer"))
node_icc["ICC Driver Task"]

node_user -->|"edits blocks"| node_document
node_document -->|"runs emulation"| node_emulator
node_document -->|"passes runtime models"| node_stepsmodel
node_stepsmodel -->|"compiles steps"| node_machine
node_stepsmodel -->|"initializes"| node_machine
node_machine -->|"registers instructions"| node_instruction
node_machine -->|"defines locations"| node_memory
node_document -->|"hosts views"| node_mainframe
node_mainframe -->|"creates view"| node_stepview
node_mainframe -->|"creates view"| node_registerview
node_mainframe -->|"creates view"| node_stackview
node_stepview -->|"reads and edits steps"| node_document
node_registerview -->|"reads register status"| node_document
node_stepview -.->|"renders list"| node_quicklist
node_registerview -.->|"renders list"| node_quicklist
node_document -->|"opens parameters"| node_parameters
node_document -->|"opens online editing"| node_connect
node_connect -->|"runs task"| node_icc
node_user -->|"debug steps"| node_stepview
node_user -->|"inspects registers"| node_registerview
node_user -->|"inspects stack"| node_stackview
node_user -->|"edits online"| node_connect

click node_document "https://github.com/cassandraproject/calcviewwin/blob/master/CALCViewWinDoc.cpp"
click node_stepedit "https://github.com/cassandraproject/calcviewwin/blob/master/Steps_Table_Model.cpp"
click node_quicklist "https://github.com/cassandraproject/calcviewwin/blob/master/QuickList.cpp"
click node_machine "https://github.com/cassandraproject/calcviewwin/blob/master/Machine.cpp"
click node_instruction "https://github.com/cassandraproject/calcviewwin/blob/master/Instruction_Interface.h"
click node_memory "https://github.com/cassandraproject/calcviewwin/blob/master/Mem_Status.h"
click node_emulator "https://github.com/cassandraproject/calcviewwin/blob/master/Emulator.cpp"
click node_stepview "https://github.com/cassandraproject/calcviewwin/blob/master/StepsView.cpp"
click node_stepsmodel "https://github.com/cassandraproject/calcviewwin/blob/master/Steps_Table_Model.cpp"
click node_registerview "https://github.com/cassandraproject/calcviewwin/blob/master/RegistersView.cpp"
click node_registermodel "https://github.com/cassandraproject/calcviewwin/blob/master/Registers_Table_Model.cpp"
click node_stackview "https://github.com/cassandraproject/calcviewwin/blob/master/StackView.cpp"
click node_mainframe "https://github.com/cassandraproject/calcviewwin/blob/master/MainFrm.cpp"
click node_parameters "https://github.com/cassandraproject/calcviewwin/blob/master/ParametersBox.cpp"
click node_preferences "https://github.com/cassandraproject/calcviewwin/blob/master/Preferences.cpp"
click node_connect "https://github.com/cassandraproject/calcviewwin/blob/master/ConnectBox.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_document,node_stepedit,node_quicklist toneBlue
class node_machine,node_instruction,node_memory,node_emulator toneAmber
class node_stepview,node_stepsmodel,node_registerview,node_registermodel,node_stackview,node_mainframe toneMint
class node_parameters,node_preferences,node_connect,node_icc toneRose
class node_user toneIndigo
```

## Components

### Block Editing

- [Block Document](https://github.com/cassandraproject/calcviewwin/blob/master/CALCViewWinDoc.cpp): `CALCViewWinDoc.cpp`
- [Step Editing](https://github.com/cassandraproject/calcviewwin/blob/master/Steps_Table_Model.cpp): `Steps_Table_Model.cpp`
- [Editable Lists](https://github.com/cassandraproject/calcviewwin/blob/master/QuickList.cpp): `QuickList.cpp`

### Emulation Runtime

- [Block Machine](https://github.com/cassandraproject/calcviewwin/blob/master/Machine.cpp): `Machine.cpp`
- [Instruction Set](https://github.com/cassandraproject/calcviewwin/blob/master/Instruction_Interface.h): `Instruction_Interface.h`
- [Memory and Registers](https://github.com/cassandraproject/calcviewwin/blob/master/Mem_Status.h): `Mem_Status.h`
- [Emulator](https://github.com/cassandraproject/calcviewwin/blob/master/Emulator.cpp): `Emulator.cpp`

### Debugger Views

- [Steps View](https://github.com/cassandraproject/calcviewwin/blob/master/StepsView.cpp): `StepsView.cpp`
- [Steps Table](https://github.com/cassandraproject/calcviewwin/blob/master/Steps_Table_Model.cpp): `Steps_Table_Model.cpp`
- [Registers View](https://github.com/cassandraproject/calcviewwin/blob/master/RegistersView.cpp): `RegistersView.cpp`
- [Registers Table](https://github.com/cassandraproject/calcviewwin/blob/master/Registers_Table_Model.cpp): `Registers_Table_Model.cpp`
- [Stack View](https://github.com/cassandraproject/calcviewwin/blob/master/StackView.cpp): `StackView.cpp`
- [Application Frame](https://github.com/cassandraproject/calcviewwin/blob/master/MainFrm.cpp): `MainFrm.cpp`

### Configuration and Online

- [Block Parameters](https://github.com/cassandraproject/calcviewwin/blob/master/ParametersBox.cpp): `ParametersBox.cpp`
- [Preferences](https://github.com/cassandraproject/calcviewwin/blob/master/Preferences.cpp): `Preferences.cpp`
- [Online Editing](https://github.com/cassandraproject/calcviewwin/blob/master/ConnectBox.cpp): `ConnectBox.cpp`

### Other components

- **Engineer**
- **ICC Driver Task**

## Connections

- Engineer → Block Document: edits blocks
- Block Document → Emulator: runs emulation (evidence: `CALCViewWinDoc.cpp`)
- Block Document → Steps Table: passes runtime models (evidence: `CALCViewWinDoc.cpp`)
- Steps Table → Block Machine: compiles steps (evidence: `Steps_Table_Model.cpp`)
- Steps Table → Block Machine: initializes (evidence: `Steps_Table_Model.cpp`)
- Block Machine → Instruction Set: registers instructions (evidence: `Machine.cpp`)
- Block Machine → Memory and Registers: defines locations (evidence: `Machine.cpp`)
- Block Document → Application Frame: hosts views (evidence: `MainFrm.cpp`)
- Application Frame → Steps View: creates view (evidence: `MainFrm.cpp`)
- Application Frame → Registers View: creates view (evidence: `MainFrm.cpp`)
- Application Frame → Stack View: creates view (evidence: `MainFrm.cpp`)
- Steps View → Block Document: reads and edits steps (evidence: `StepsView.cpp`)
- Registers View → Block Document: reads register status (evidence: `RegistersView.cpp`)
- Steps View → Editable Lists: renders list
- Registers View → Editable Lists: renders list
- Block Document → Block Parameters: opens parameters (evidence: `CALCViewWinDoc.cpp`)
- Block Document → Online Editing: opens online editing (evidence: `CALCViewWinDoc.cpp`)
- Online Editing → ICC Driver Task: runs task (evidence: `ConnectBox.cpp`)
- Engineer → Steps View: debug steps
- Engineer → Registers View: inspects registers
- Engineer → Stack View: inspects stack
- Engineer → Online Editing: edits online
