# ihedvall/mdflib architecture

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

- Interactive diagram: https://gitdiagram.com/ihedvall/mdflib
- Repository: https://github.com/ihedvall/mdflib

## Overview

##### Project type and purpose
- This is a monorepo for a C++‐based Measurement Data File (MDF) library (mdflib) plus multiple front-ends and language bindings.
- Core functionality: read/write MDF v3 & v4 files.
- Applications and bindings:
- C++ static library (mdflib)
- C++ shared library & .NET/C++-CLI assembly (mdflibrary)
- C# unit‐tests against the .NET assembly
- Python wrapper (pybind11)
- CLI converter (mdf2csv)
- GUI viewer application (mdfviewer)
- Unit tests (C++ GoogleTest)
- (Future) gRPC microservice

##### File structure
- Top-level directories correspond to “containers” in your architecture:
- mdflib           → Core C++ static library & its CMake build
- mdflib_test      → Core C++ GoogleTest suite
- mdflibrary       → C++/CLI shared .NET wrapper
- mdflibrary_example → Example C++ app using the shared library
- mdflibrary_test_net → C# tests using the .NET assembly
- python           → Python wrapper & tests
- mdf2csv          → CLI converter application
- mdfviewer        → GUI application (wxWidgets)
- docs, doxygen    → Documentation site generation
- ci, .github      → CI pipelines (Linux/Windows Docker builds)
- Build scripts and vcpkg.json show third-party dependencies (Zlib, Expat, Boost, wxWidgets, gtest, Doxygen).

##### README for additional insights
- Confirms components and build requirements.
- Emphasizes cross-platform (Windows/Linux) support, CMake usage, and external libs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    CI["CI/CD Pipelines"]:::ci
    Core["Core MDF Library (mdflib)"]:::library
    Shared["C++/CLI Shared Assembly (mdflibrary)"]:::library
    Python["Python Binding (pybind11)"]:::library
    CLI["CLI Converter (mdf2csv)"]:::application
    GUI["GUI Viewer (mdfviewer)"]:::application
    Example["Example C++ App (mdflibrary_example)"]:::application
    TestCXX["C++ Unit Tests (mdflib_test)"]:::test
    TestNET["C# Unit Tests (mdflibrary_test_net)"]:::test
    DOCS["Documentation Site Generation"]:::docs
    DOX["Doxygen Config"]:::docs
    GRPC["gRPC Microservice (Future)"]:::application

    CI -->|"builds"| Core
    CI -->|"builds"| Shared
    CI -->|"builds"| Python
    CI -->|"builds"| CLI
    CI -->|"builds"| GUI
    CI -->|"builds"| Example
    CI -->|"builds"| TestCXX
    CI -->|"builds"| TestNET
    CI -->|"generates"| DOCS

    Shared -->|"depends on"| Core
    Python -->|"depends on"| Core
    CLI -->|"depends on"| Core
    GUI -->|"depends on"| Core
    Example -->|"depends on"| Shared
    GRPC -->|"depends on"| Core

    TestCXX -->|"tests"| Core
    TestNET -->|"tests"| Shared

    DOX -->|"configures"| DOCS

    click Core "https://github.com/ihedvall/mdflib/tree/main/mdflib/"
    click Shared "https://github.com/ihedvall/mdflib/tree/main/mdflibrary/"
    click Python "https://github.com/ihedvall/mdflib/tree/main/python/"
    click CLI "https://github.com/ihedvall/mdflib/tree/main/mdf2csv/"
    click GUI "https://github.com/ihedvall/mdflib/tree/main/mdfviewer/"
    click Example "https://github.com/ihedvall/mdflib/tree/main/mdflibrary_example/"
    click TestCXX "https://github.com/ihedvall/mdflib/tree/main/mdflib_test/"
    click TestNET "https://github.com/ihedvall/mdflib/tree/main/mdflibrary_test_net/"
    click CI "https://github.com/ihedvall/mdflib/tree/main/.github/workflows/"
    click DOCS "https://github.com/ihedvall/mdflib/tree/main/docs/"
    click DOX "https://github.com/ihedvall/mdflib/tree/main/doxygen/"

    classDef library fill:#ADD8E6,stroke:#000,color:#000
    classDef application fill:#90EE90,stroke:#000,color:#000
    classDef test fill:#FFA500,stroke:#000,color:#000
    classDef ci fill:#FFC0CB,stroke:#000,color:#000
    classDef docs fill:#D3D3D3,stroke:#000,color:#000
```
