Added sequence diagram option participants_order

This commit is contained in:
Bartek Kryza
2022-12-17 00:42:15 +01:00
parent 6454604595
commit 5d4dfbb4b1
7 changed files with 132 additions and 94 deletions

View File

@@ -252,23 +252,17 @@ The following C++ code:
namespace clanguml {
namespace t20029 {
using encoder_function_t = std::function<std::string(std::string &&)>;
std::string encode_b64(std::string &&content) { return std::move(content); }
template <typename T> class Encoder : public T {
public:
bool send(std::string &&msg)
{
auto encoded = encode(std::move(msg));
return T::send(std::move(encoded));
return T::send(std::move(encode(std::move(msg))));
}
protected:
std::string encode(std::string &&msg) { return encode_b64(std::move(msg)); }
private:
encoder_function_t f_;
};
template <typename T> class Retrier : public T {