How farahelnakhal/lcms works
LCMS is a command-line library catalog. Users enter commands through the main loop; the LCMS operations layer dispatches catalog actions to a hierarchical tree that stores categories and books, with results printed or CSV files imported/exported. The README documents CRUD and search for books and categories, recursive listing, and CSV transfer. The tree and vector excerpts show the storage and traversal design; some operation bodies are unsampled, so only directly evidenced call relationships are shown.
Main entry points: tree.cpp Category tree · lcms.cpp CSV import/export · main.cpp Command loop · book.cpp Book records
Components 12
Command interface
- Command loop
main.cpp
Catalog operations
- Catalog operations
lcms.cpp - Book management
lcms.cpp - Category management
lcms.cpp - Search and listing
lcms.cpp - CSV import/export
lcms.cpp
Catalog model
- Category tree
tree.cpp - Category nodes
tree.cpp - Book records
book.cpp
In-memory storage
- Dynamic vector
myvector.h
Other components
- CLI user
- CSV file
Connections 11
- CLI user → Command loop: enters commands
main.cpp - Command loop → Catalog operations: dispatches commands
main.cpp - Catalog operations → Category tree: creates tree
lcms.cpp - Book management → Category tree: manages books
lcms.cpp - Category management → Category tree: manages categories
README.md - Search and listing → Category tree: searches and lists
lcms.cpp - CSV import/export → Category tree: imports and exports
lcms.cpp - CSV import/export → CSV file: reads or writes
lcms.cpp - Category tree → Category nodes: traverses
tree.cpp - Category nodes → Book records: stores books
- Category nodes → Dynamic vector: stores children and books