How machineteto/dsa-word works
This is a small C++ text-editing exercise, demonstrated through a console entry point rather than a full interactive application. The visible workflow builds a line-based document, moves a cursor, inserts characters, and exercises undo/redo while displaying the result. Internally, the editor coordinates document and cursor state with two action stacks; the document is a doubly linked list of line nodes. The headers declare additional editing features, but their implementations are not shown, so they are not mapped as working capabilities.
Main entry points: main.cpp Demo Entry · textEdit.h Text Editor · textDoc.h Text Document · cursor.h Cursor
Components 8
Console Demo
- Demo Entry
main.cpp
Editing
- Text Editor
textEdit.h - Cursor
cursor.h
Document Storage
- Text Document
textDoc.h - Line Node
lineNode.h
Undo History
- Action Stack
actionStack.h - Edit Action
action.h
Other components
- Demo Runner
Connections 11
- Demo Runner → Demo Entry: runs
main.cpp - Demo Entry → Text Editor: exercises
main.cpp - Demo Entry → Text Document: demonstrates
main.cpp - Demo Entry → Cursor: moves
main.cpp - Demo Entry → Action Stack: demonstrates
main.cpp - Text Editor → Text Document: edits
textEdit.h - Text Editor → Cursor: moves
textEdit.h - Text Editor → Action Stack: records history
textEdit.h - Action Stack → Edit Action: stores
actionStack.h - Cursor → Text Document: reads lines
cursor.h - Text Document → Line Node: links lines
textDoc.h