Introduce support for asynchronous server-side methods (#12)

* Add preliminary changes for async server methods

* Refactor the Message concept and break it into distinctive types

* Continue working on async server methods (high-level API mainly)

* Continue developing support for async server

* Finishing async server methods

* Finishing async server methods (fixing tests & cleaning up)

* A little code cleaning

* Add unit tests for type traits of free functions

* Support for generating async server methods in stub headers

* Update ChangeLog for v0.3.0

* Update the tutorial with how to use async server-side methods

* Update the TOC in sdbus-c++ tutorial

* Update numbering in TOC

* Remove unnecessary code

* Final cleanups
This commit is contained in:
Stanislav Angelovič
2018-07-02 11:22:00 +02:00
committed by Lukáš Ďurfina
parent b041f76bfc
commit d8fd053714
33 changed files with 866 additions and 223 deletions
+8 -3
View File
@@ -126,12 +126,15 @@ std::tuple<std::string, std::string, std::string> BaseGenerator::argsToNamesAndT
/**
*
*/
std::string BaseGenerator::outArgsToType(const Nodes& args) const
std::string BaseGenerator::outArgsToType(const Nodes& args, bool bareList) const
{
std::ostringstream retTypeSS;
if (args.size() == 0)
{
if (bareList)
return "";
retTypeSS << "void";
}
else if (args.size() == 1)
@@ -141,7 +144,8 @@ std::string BaseGenerator::outArgsToType(const Nodes& args) const
}
else if (args.size() >= 2)
{
retTypeSS << "std::tuple<";
if (!bareList)
retTypeSS << "std::tuple<";
bool firstArg = true;
for (const auto& arg : args)
@@ -150,7 +154,8 @@ std::string BaseGenerator::outArgsToType(const Nodes& args) const
retTypeSS << signature_to_type(arg->get("type"));
}
retTypeSS << ">";
if (!bareList)
retTypeSS << ">";
}
return retTypeSS.str();