# sskeme/eeee346-f26-hw4 architecture

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

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

## Overview

This small C++ assignment is a command-line string utility. The user selects concatenation, substring, reversal, or leading-space trimming; main.cpp dispatches to the corresponding handler, which reads input, calls the matching function in string_functions.cpp, and prints the result. The README documents these operations; the sampled source confirms the dispatch and implemented concat function, while the other three function bodies are TODOs. Sampled evidence does not show additional runtime layers.

Main entry points: [`main.cpp`](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp) (Operation dispatcher), [`string_functions.cpp`](https://github.com/sskeme/eeee346-f26-hw4/blob/main/string_functions.cpp) (String functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_dispatcher["Operation dispatcher<br/>[main.cpp]"]
node_concat_handler["Concat handler<br/>[main.cpp]"]
node_substring_handler["Substring handler<br/>[main.cpp]"]
node_reverse_handler["Reverse handler<br/>[main.cpp]"]
node_ltrim_handler["Ltrim handler<br/>[main.cpp]"]
node_string_functions["String functions"]
node_terminal(("Terminal output"))

node_user -->|"enters operation"| node_dispatcher
node_dispatcher -->|"dispatches"| node_concat_handler
node_dispatcher -->|"dispatches"| node_substring_handler
node_dispatcher -->|"dispatches"| node_reverse_handler
node_dispatcher -->|"dispatches"| node_ltrim_handler
node_concat_handler -->|"calls concat"| node_string_functions
node_substring_handler -->|"calls substring"| node_string_functions
node_reverse_handler -->|"calls reverse"| node_string_functions
node_ltrim_handler -->|"calls ltrim"| node_string_functions
node_concat_handler -->|"prints result"| node_terminal
node_substring_handler -->|"prints result"| node_terminal
node_reverse_handler -->|"prints result"| node_terminal
node_ltrim_handler -->|"prints result"| node_terminal

click node_dispatcher "https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp"
click node_concat_handler "https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp"
click node_substring_handler "https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp"
click node_reverse_handler "https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp"
click node_ltrim_handler "https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp"
click node_string_functions "https://github.com/sskeme/eeee346-f26-hw4/blob/main/string_functions.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_user toneBlue
class node_dispatcher,node_string_functions toneTeal
class node_concat_handler,node_substring_handler,node_reverse_handler,node_ltrim_handler toneMint
class node_terminal toneIndigo
```

## Components

### Other components

- **User**
- [Operation dispatcher](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp): `main.cpp`
- [Concat handler](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp): `main.cpp`
- [Substring handler](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp): `main.cpp`
- [Reverse handler](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp): `main.cpp`
- [Ltrim handler](https://github.com/sskeme/eeee346-f26-hw4/blob/main/main.cpp): `main.cpp`
- [String functions](https://github.com/sskeme/eeee346-f26-hw4/blob/main/string_functions.cpp): `string_functions.cpp`
- **Terminal output**

## Connections

- User → Operation dispatcher: enters operation
- Operation dispatcher → Concat handler: dispatches
- Operation dispatcher → Substring handler: dispatches
- Operation dispatcher → Reverse handler: dispatches
- Operation dispatcher → Ltrim handler: dispatches
- Concat handler → String functions: calls concat
- Substring handler → String functions: calls substring
- Reverse handler → String functions: calls reverse
- Ltrim handler → String functions: calls ltrim
- Concat handler → Terminal output: prints result
- Substring handler → Terminal output: prints result
- Reverse handler → Terminal output: prints result
- Ltrim handler → Terminal output: prints result
