Add stringifiers to SenseApi related classes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user