# sskeme/eeee346-f26-hw5 architecture

> Architecture diagram of the GitHub repository sskeme/eeee346-f26-hw5, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sskeme/eeee346-f26-hw5
- Repository: https://github.com/sskeme/eeee346-f26-hw5

## Overview

This is a small C++ character ring-buffer program. The user supplies a capacity and message; main creates the buffer, inserts each character, displays status, drains the oldest characters, and resets it. The implementation maintains the circular-buffer state and overwrites the oldest character when full, as documented in the README. The graph stays compact; its runtime call flow is visible in main.cpp, while buffer behavior is documented in the header and README.

Main entry points: [`main.cpp`](https://github.com/sskeme/eeee346-f26-hw5/blob/main/main.cpp) (Program flow), [`CharCircularBuffer.cpp`](https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.cpp) (Buffer operations), [`CharCircularBuffer.h`](https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.h) (Buffer interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_main["Program flow<br/>[main.cpp]"]
node_buffer_impl["Buffer operations"]
node_buffer_api["Buffer interface"]

node_user -->|"provides input"| node_main
node_main -->|"calls operations"| node_buffer_impl
node_buffer_impl -->|"defines interface"| node_buffer_api
node_main -->|"prints results"| node_user

click node_main "https://github.com/sskeme/eeee346-f26-hw5/blob/main/main.cpp"
click node_buffer_impl "https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.cpp"
click node_buffer_api "https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.h"

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_user toneBlue
class node_main,node_buffer_impl,node_buffer_api toneTeal
```

## Components

### Other components

- **User**
- [Program flow](https://github.com/sskeme/eeee346-f26-hw5/blob/main/main.cpp): `main.cpp`
- [Buffer operations](https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.cpp): `CharCircularBuffer.cpp`
- [Buffer interface](https://github.com/sskeme/eeee346-f26-hw5/blob/main/CharCircularBuffer.h): `CharCircularBuffer.h`

## Connections

- User → Program flow: provides input (evidence: `README.md`)
- Program flow → Buffer operations: calls operations (evidence: `main.cpp`)
- Buffer operations → Buffer interface: defines interface (evidence: `CharCircularBuffer.cpp`)
- Program flow → User: prints results (evidence: `main.cpp`)
