Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 563 Bytes

README.md

File metadata and controls

37 lines (30 loc) · 563 Bytes

Observer

classDiagram
direction LR
class IObserver {
  <<Interface>>
  update(const std::string& msg) void
}

class ISubject {
  <<Interface>>
  attach(IObserver* observer) void
  detach(IObserver* observer) void
  notify() void
}

class Subject {
  -std::string msg_
  -std::list~IObserver*~ observers_
  +genMsg(const std::string& msg) void
}

ISubject <|.. Subject
Subject "1" *.. "0..n" IObserver

class Observer {
  -ISubject subject_
  -int count_$
  -int num_
  +stopWatch() void
}

IObserver <|.. Observer
Observer "1" *.. "1" ISubject

Loading