How zerocloud-jasmine/nanchang-guide works
This is a C++ console prototype for querying and simulating routes among selected Nanchang attractions. The user enters through the console menu, which supports attraction and road management, lookup/filtering, graph traversal, and route requests. Route requests select distance, time, or hop count, then use Dijkstra or Floyd and reconstruct a displayable path. Startup loads runtime data with a documented fallback to defaults; edits can be saved. The README describes a future EasyX interface, but the sampled code does not establish an implemented graphical workflow, so it is omitted.
Main entry points: graph.cpp Weighted graph · interface.cpp Console menu · algorithm.cpp Path reconstruction · storage.cpp Startup loader
Components 13
Console interaction
- Console menu
src/interface.cpp - Spot queries and edits
src/interface.cpp - Road edits
src/interface.cpp - Route request
src/interface.cpp
Attraction graph
- Weighted graph
src/graph.cpp
Traversal and routing
- DFS and BFS
src/algorithm.cpp - Dijkstra routing
src/algorithm.cpp - Floyd routing
src/algorithm.cpp - Path reconstruction
src/algorithm.cpp
Local data
- Startup loader
src/storage.cpp - Text data files
data/default - Runtime data files
data/runtime
Other components
- Visitor
Connections 20
- Visitor → Console menu: uses
README.md - Console menu → Spot queries and edits: dispatches
src/interface.cpp - Console menu → Road edits: dispatches
src/interface.cpp - Console menu → Route request: dispatches
src/interface.cpp - Spot queries and edits → Weighted graph: queries and edits
src/interface.cpp - Road edits → Weighted graph: edits
src/interface.cpp - Route request → Dijkstra routing: runs optionally
src/interface.cpp - Route request → Floyd routing: runs optionally
src/interface.cpp - Route request → Path reconstruction: requests path
src/interface.cpp - Route request → DFS and BFS: requests traversal
README.md - DFS and BFS → Weighted graph: reads graph
src/algorithm.cpp - Dijkstra routing → Weighted graph: reads graph
src/algorithm.cpp - Floyd routing → Weighted graph: reads graph
src/algorithm.cpp - Path reconstruction → Weighted graph: reads graph
src/algorithm.cpp - Path reconstruction → Dijkstra routing: uses results
src/algorithm.cpp - Path reconstruction → Floyd routing: uses results
src/algorithm.cpp - Startup loader → Text data files: loads fallback
README.md - Startup loader → Runtime data files: loads first
README.md - Startup loader → Weighted graph: populates
src/storage.cpp - Console menu → Runtime data files: saves edits
src/interface.cpp