# eternityradiance/lab1_oop architecture

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

- Interactive diagram: https://gitdiagram.com/eternityradiance/lab1_oop
- Repository: https://github.com/eternityradiance/lab1_oop

## Overview

This is a small C++ equipment model with a console demonstration. The runtime entry point creates equipment, armor, weapons, rifles, and magic weapons, then exercises equipment operations and rifle ammunition behavior. Equipment is the shared abstract base; weapon and armor specialize it, while rifles and magic specialize weapons. The README is empty, and the graph is based on the sampled source; no external services or persistent storage are shown.

Main entry points: [`main.cpp`](https://github.com/eternityradiance/lab1_oop/blob/main/main.cpp) (Demo entry point), [`weapon.cpp`](https://github.com/eternityradiance/lab1_oop/blob/main/weapon.cpp) (Weapon), [`equipment.cpp`](https://github.com/eternityradiance/lab1_oop/blob/main/equipment.cpp) (Equipment base), [`armor.cpp`](https://github.com/eternityradiance/lab1_oop/blob/main/armor.cpp) (Armor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Console demo"]
  node_main["Demo entry point<br/>[main.cpp]"]
end

subgraph group_model["Equipment model"]
  node_equipment["Equipment base<br/>[equipment.cpp]"]
  node_weapon["Weapon<br/>[weapon.cpp]"]
  node_armor["Armor<br/>[armor.cpp]"]
  node_rifles["Rifles<br/>[rifles.cpp]"]
  node_magic["Magic weapons<br/>[magic.cpp]"]
end

node_main -->|"creates items"| node_equipment
node_main -->|"creates weapons"| node_weapon
node_main -->|"creates armor"| node_armor
node_main -->|"uses rifles"| node_rifles
node_main -->|"creates magic"| node_magic
node_weapon -->|"inherits from"| node_equipment
node_armor -->|"inherits from"| node_equipment
node_rifles -->|"inherits from"| node_weapon
node_magic -->|"inherits from"| node_weapon

click node_main "https://github.com/eternityradiance/lab1_oop/blob/main/main.cpp"
click node_equipment "https://github.com/eternityradiance/lab1_oop/blob/main/equipment.cpp"
click node_weapon "https://github.com/eternityradiance/lab1_oop/blob/main/weapon.cpp"
click node_armor "https://github.com/eternityradiance/lab1_oop/blob/main/armor.cpp"
click node_rifles "https://github.com/eternityradiance/lab1_oop/blob/main/rifles.cpp"
click node_magic "https://github.com/eternityradiance/lab1_oop/blob/main/magic.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_main toneBlue
class node_equipment,node_weapon,node_armor,node_rifles,node_magic toneAmber
```

## Components

### Console demo

- [Demo entry point](https://github.com/eternityradiance/lab1_oop/blob/main/main.cpp): `main.cpp`

### Equipment model

- [Equipment base](https://github.com/eternityradiance/lab1_oop/blob/main/equipment.cpp): `equipment.cpp`
- [Weapon](https://github.com/eternityradiance/lab1_oop/blob/main/weapon.cpp): `weapon.cpp`
- [Armor](https://github.com/eternityradiance/lab1_oop/blob/main/armor.cpp): `armor.cpp`
- [Rifles](https://github.com/eternityradiance/lab1_oop/blob/main/rifles.cpp): `rifles.cpp`
- [Magic weapons](https://github.com/eternityradiance/lab1_oop/blob/main/magic.cpp): `magic.cpp`

## Connections

- Demo entry point → Equipment base: creates items (evidence: `main.cpp`)
- Demo entry point → Weapon: creates weapons (evidence: `main.cpp`)
- Demo entry point → Armor: creates armor (evidence: `main.cpp`)
- Demo entry point → Rifles: uses rifles (evidence: `main.cpp`)
- Demo entry point → Magic weapons: creates magic (evidence: `main.cpp`)
- Weapon → Equipment base: inherits from
- Armor → Equipment base: inherits from
- Rifles → Weapon: inherits from
- Magic weapons → Weapon: inherits from
