samedi 26 décembre 2020

Share information between commands with Command design pattern [closed]

I'm building a little project in c++ that uses some commands, so I used a commands design pattern. I have a design problem, I have commands that need some information that other commands create. For Example, the first command is uploading a file. and the second command needs to do work on the file that uploaded in the first command. First, second, and all rest commands inherited from command interface that has the "execute" method. what design pattern should I use to share information between the commands? and please can you give me a little example?

Aucun commentaire:

Enregistrer un commentaire