Advertisement
Patasuss

Nodey

Dec 20th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. abstract Node {
  2. +ChildIndex_t getNumberOfChildren() const
  3. +Node* getChild(ChildIndex_t) const
  4. +void setChild(ChildIndex_t, UniqueNodePtr)
  5. +ChildIndex_t getIndexOfChild(Node*) const
  6. --
  7. +string getType() const
  8. +void setFolded(bool)
  9. +bool isFolded() const
  10. +string getDescriptionText() const
  11. +void setDescriptionText(string)
  12. --
  13. +UniqueNodePtr clone() const
  14. }
  15.  
  16. class IndexList {
  17. +list<ChildIndex_t> indices;
  18. }
  19.  
  20. interface Document {
  21. +UniqueNodePtr getRootNode()
  22. +IndexList getPathToSelectedNode()
  23. +void setPathToSelectedNode(IndexList)
  24. --
  25. +void executeCommand(UniqueCommandPtr)
  26. +void undoLastCommand()
  27. }
  28. Document --> Node : <<contains>>
  29. Document --> IndexList : <<contains>>
  30.  
  31. interface Command {
  32. +void executeOn(Document*)
  33. }
  34. Command ..> Document : <<modifies>>
  35.  
  36. interface Language {
  37. +string translate(Node*)
  38. +UniqueNodePtr createNodeByType(string)
  39. +UniqueCommandPtr createCommandByName(string)
  40. }
  41. Language ..> Node : <<use/create>>
  42. Language ..> Command : <<create>>
  43.  
  44. interface LanguageLoader {
  45. +UniqueLanguagePtr loadLanguage(string pathToLib)
  46. }
  47. LanguageLoader ..> Language : <<create>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement