From 6cb819112cc5709769c871bf19881f46aa123f91 Mon Sep 17 00:00:00 2001 From: Gavin Hayes Date: Thu, 19 Sep 2024 16:30:36 -0400 Subject: [PATCH] feat: include function, param, and return descriptions in impl.cpp --- template/impl.cpp.ejs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/template/impl.cpp.ejs b/template/impl.cpp.ejs index 74738d0..b92ed9d 100644 --- a/template/impl.cpp.ejs +++ b/template/impl.cpp.ejs @@ -1,6 +1,18 @@ #include "pdk.gen.hpp" <% for (const func of schema.exports) { %> +/** + * <%- formatCommentBlock(func.description) %> +<% if (func.input || func.output) { -%> + * +<% } -%> +<% if (func.input) { -%> + * @param input <%- formatCommentBlock(func.input.description) %> +<% } -%> +<% if (func.output) { -%> + * @return <%- formatCommentBlock(func.output.description) %> +<% } -%> +*/ <%- getExportReturnType(func) -%> impl::<%- func.name-%>(<%- getExportParamType(func) -%> <%- getParamName(func) -%>) { <% if (featureFlags['stub-with-code-samples'] && codeSamples(func, 'c++').length > 0) { -%> <%- codeSamples(func, 'c++')[0].source %>