flyweight.txt 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @startuml
  2. /' FLYWEIGHT '/
  3. class FlyweightFactory {
  4. - unordered_map
  5. + getFlyweight()
  6. + listFlyweights()
  7. }
  8. interface Flyweight {
  9. # operation(in extrinsicState)
  10. }
  11. class Client
  12. class ConcreteFlyweight {
  13. - intrinsicState
  14. + operation(in extrinsicState)
  15. }
  16. class UnsharedConcreteFlyweight {
  17. - allState
  18. + operation(in extrinsicState)
  19. }
  20. hide empty members
  21. FlyweightFactory *- Flyweight
  22. Flyweight <|-- ConcreteFlyweight
  23. Flyweight <|-- UnsharedConcreteFlyweight
  24. FlyweightFactory <-- Client
  25. ConcreteFlyweight <-- Client
  26. UnsharedConcreteFlyweight <-- Client
  27. note as N1
  28. <b><color:royalBlue>Flyweight</color></b>
  29. <b>Type:</b> Structural
  30. Enregistre les objets dans une structure de données,
  31. capable de supporter un effectif vaste d'objet du même
  32. type.
  33. end note
  34. @enduml