sdbus++: async: client: example: add a few comments for clarity
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Idf21e9652c005203a3f563b46605354e4711183d
diff --git a/example/calculator-client.cpp b/example/calculator-client.cpp
index 0fe8420..6bb2bc7 100644
--- a/example/calculator-client.cpp
+++ b/example/calculator-client.cpp
@@ -16,26 +16,32 @@
// been used to combine multiple interfaces into a single client-proxy.
{
+ // Call the Multiply method.
auto _ = co_await c.multiply(7, 6);
std::cout << "Should be 42: " << _ << std::endl;
}
{
+ // Get the LastResult property.
auto _ = co_await c.lastResult();
std::cout << "Should be 42: " << _ << std::endl;
}
{
+ // Call the Clear method.
co_await c.clear();
}
{
+ // Get the LastResult property.
auto _ = co_await c.lastResult();
std::cout << "Should be 0: " << _ << std::endl;
}
{
+ // Set the LastResult property.
co_await c.lastResult(1234);
+ // Get the LastResult property.
auto _ = co_await c.lastResult();
std::cout << "Should be 1234: " << _ << std::endl;
}