Add stringifiers to SenseApi related classes

This commit is contained in:
2025-01-11 06:40:43 -04:00
parent 8aa28a877e
commit c6577b1155
4 changed files with 28 additions and 0 deletions
+15
View File
@@ -51,6 +51,15 @@ public:
std::string name;
// These are the implexors whose APIs this lib exports.
std::vector<ExportedImplexorApiDesc> exportedImplexorApis;
std::string stringify() const {
std::string result = "Name: " + name + "\n";
result += "Exported Implexor APIs:\n";
for (const auto& api : exportedImplexorApis) {
result += " - " + api.name + "\n";
}
return result;
}
};
class SenseApiLib
@@ -111,6 +120,12 @@ public:
* descriptor.
*/
SenseApiDesc senseApiDesc;
std::string stringify() const {
std::string result = "Library Path: " + libraryPath + "\n";
result += "Sense API Descriptor: " + senseApiDesc.stringify() + "\n";
return result;
}
};
} // namespace sense_api