# zelhajou/ft_cpp_modules architecture

> Architecture diagram of the GitHub repository zelhajou/ft_cpp_modules, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zelhajou/ft_cpp_modules
- Repository: https://github.com/zelhajou/ft_cpp_modules

## Overview

##### Main Components Structure

**[Module Layer]**

**[Exercise Layer]**

**[Implementation Layer]**

##### Component Details

a) Module Layer:
- Module topics as labels (e.g., "Module 00: C++ Basics", "Module 01: Memory Management")

b) Exercise Layer:
- Exercise names and main learning objectives

c) Implementation Layer:
- C++ concepts and relationships
- Class hierarchies where relevant (especially in modules 03-04)

##### Specific Design Elements

For each module type, emphasize:

a) Basic Modules (00-01):
- Class structures
- Memory management patterns
- File I/O components

b) OOP Modules (02-04):
- Inheritance hierarchies
- Polymorphic relationships
- Abstract classes and interfaces

c) Template Modules (07-08):
- Demonstrate template patterns
- Generic programming concepts

##### Additional Elements

Include:
- Version information
- Compilation requirements
- Key dependencies

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style definitions
    classDef basic fill:#90EE90,stroke:#333,stroke-width:2px
    classDef intermediate fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef advanced fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef documentation fill:#E6E6FA,stroke:#333,stroke-width:2px
    classDef implementation fill:#ADD8E6,stroke:#333,stroke-width:2px

    %% Documentation Layer
    subgraph Documentation
        CheatSheet["C++ Reference Documentation"]
        Basics["C++ Basics"]:::documentation
        ControlStructures["Control Structures"]:::documentation
        MemoryRef["Memory Management Reference"]:::documentation
        ClassesRef["Classes Reference"]:::documentation
        AdvancedRef["Advanced Concepts"]:::documentation
        
        CheatSheet --> Basics & ControlStructures & MemoryRef & ClassesRef & AdvancedRef
    end

    %% Module Layer
    subgraph Modules
        Mod00["Module 00: C++ Basics"]:::basic
        Mod01["Module 01: Memory Management"]:::basic
        Mod02["Module 02: Orthodox Canonical Form"]:::intermediate
        Mod03["Module 03: Inheritance"]:::intermediate
        Mod04["Module 04: Polymorphism"]:::advanced
        Mod07["Module 07: Templates"]:::advanced
    end

    %% Implementation Layer
    subgraph BasicImplementation
        Megaphone["Megaphone"]:::implementation
        PhoneBook["PhoneBook System"]:::implementation
        Contact["Contact Management"]:::implementation
        
        Mod00 --> Megaphone & PhoneBook & Contact
    end

    subgraph MemoryManagement
        Zombie["Zombie Class"]:::implementation
        ZombieHorde["Zombie Horde"]:::implementation
        
        Mod01 --> Zombie & ZombieHorde
    end

    subgraph ClassStructure
        Fixed["Fixed Point Class"]:::implementation
        FixedExt["Extended Fixed Point"]:::implementation
        
        Mod02 --> Fixed & FixedExt
    end

    subgraph InheritanceHierarchy
        ClapTrap["ClapTrap Base"]:::implementation
        ScavTrap["ScavTrap"]:::implementation
        FragTrap["FragTrap"]:::implementation
        
        Mod03 --> ClapTrap
        ClapTrap --> ScavTrap & FragTrap
    end

    subgraph Polymorphism
        Animal["Animal Base"]:::implementation
        Cat["Cat Class"]:::implementation
        Dog["Dog Class"]:::implementation
        WrongAnimal["Wrong Animal"]:::implementation
        
        Mod04 --> Animal & WrongAnimal
        Animal --> Cat & Dog
    end

    subgraph Templates
        Whatever["Whatever Template"]:::implementation
        Iter["Iter Template"]:::implementation
        Array["Array Template"]:::implementation
        
        Mod07 --> Whatever & Iter & Array
    end

    %% Click events for component mapping
    click Basics "https://github.com/zelhajou/ft_cpp_modules/blob/main/Cheat Sheet/00-cpp-basics.cpp"
    click ControlStructures "https://github.com/zelhajou/ft_cpp_modules/blob/main/Cheat Sheet/01-cpp-control-structures.cpp"
    click MemoryRef "https://github.com/zelhajou/ft_cpp_modules/blob/main/Cheat Sheet/02-cpp-arrays-pointers-and-dynamic-memory.cpp"
    click ClassesRef "https://github.com/zelhajou/ft_cpp_modules/blob/main/Cheat Sheet/03-cpp-classes.cpp"
    click AdvancedRef "https://github.com/zelhajou/ft_cpp_modules/blob/main/Cheat Sheet/04-cpp-advanced.cpp"
    click Megaphone "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 00/ex00/megaphone.cpp"
    click PhoneBook "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 00/ex01/PhoneBook.cpp"
    click Contact "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 00/ex01/Contact.cpp"
    click Zombie "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 01/ex00/Zombie.cpp"
    click ZombieHorde "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 01/ex01/zombieHorde.cpp"
    click Fixed "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 02/ex00/Fixed.cpp"
    click FixedExt "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 02/ex01/Fixed.cpp"
    click ClapTrap "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 03/ex02/ClapTrap.hpp"
    click ScavTrap "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 03/ex02/ScavTrap.hpp"
    click FragTrap "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 03/ex02/FragTrap.hpp"
    click Animal "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 04/ex00/Animal.hpp"
    click Cat "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 04/ex00/Cat.hpp"
    click Dog "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 04/ex00/Dog.hpp"
    click WrongAnimal "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 04/ex00/WrongAnimal.hpp"
    click Whatever "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 07/ex00/whatever.hpp"
    click Iter "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 07/ex01/iter.hpp"
    click Array "https://github.com/zelhajou/ft_cpp_modules/blob/main/module 07/ex02/Array.hpp"
```
