Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @startuml
- interface DisplayPrompt <<interface>> {
- string command
- string prompt
- string output
- __
- virtual void display()
- }
- class ParseCmd {
- string command
- vector <Command> parsed_commands
- __
- void parseCmd(command, parsed_commands)
- void runCmd(parsed_commands)
- }
- class Command {
- string verb
- vector <string> parameters
- __
- void thisTask()
- }
- class Command_Connector {
- type connector
- Command prevCmd
- Command nextCmd
- __
- runAnd(prevCmd, nextCmd)
- runOr(prevCmd, nextCmd)
- }
- class CommandMap {
- std::map <string, enum> verblist
- std::map <enum, functions> functions
- }
- class Print {
- string output
- __
- void display()
- }
- class ShowPrompt {
- string prompt
- __
- void display()
- }
- class ShowOutput {
- string output
- __
- void display()
- }
- CommandMap "1" *-- "many" Command : aggregates >
- DisplayPrompt --> ParseCmd
- Command --|> Command_Connector
- ParseCmd --> CommandMap
- Print --|> ShowPrompt
- Print --|> ShowOutput
- Command --> ShowOutput : displays output via >
- DisplayPrompt --> Print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement