Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML for delegation pattern

I would like to modelize the delegation pattern (for objective-C) in UML. What is the correct presentation for it please?

For example:

My class BaseXMLParser have a delegate which conforme to ParserDelegate Interface. Methods in ParserDelegate will be implement in UI class

ps: sorry for my English

Delegation pattern

like image 856
Kenzo Avatar asked Sep 04 '26 08:09

Kenzo


1 Answers

Instead of using <<ParserDelegate>> you should use <<Interface>>, and instead of delegate your interface's name is ParserDelegate. You also don't have to write the methods that are defined in the interface (ParserDelegate) in the implementing class (UI). I would also give the reference from BaseXMLParser to ParserDelegate a direction, since I see no reason that the delegate should call the client class.

like image 94
vainolo Avatar answered Sep 07 '26 09:09

vainolo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!