From fad7b35b9add31f453c2da657d9fe91830d5d529 Mon Sep 17 00:00:00 2001 From: hbristow Date: Thu, 8 Aug 2013 03:51:44 +1000 Subject: [PATCH] Updated documentation formatting --- .../matlab/generator/templates/template_doc_base.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/matlab/generator/templates/template_doc_base.m b/modules/matlab/generator/templates/template_doc_base.m index 8cb21b7f7..e94bf0b0f 100644 --- a/modules/matlab/generator/templates/template_doc_base.m +++ b/modules/matlab/generator/templates/template_doc_base.m @@ -6,9 +6,9 @@ {{ doc.long | stripTags | qualify(fun.name) | comment(75, '% ') }} {% endif %} % +{# ----------------------- Returns --------------------- #} {% if fun.rtp|void|not or fun.req|outputs|length or fun.opt|outputs|length %} % Returns: -{% endif %} {% if fun.rtp|void|not %} % LVALUE {% endif %} @@ -21,21 +21,22 @@ {% endif %} {% endfor %} % +{% endif %} +{# ----------------- Required Inputs ------------------- #} {% if fun.req|inputs|length %} % Required Inputs: -{% endif %} {% for arg in fun.req|inputs %} {% set uname = arg.name | upper + ('_IN' if arg.O else '') %} {% if arg.name in doc.params %} {{ (uname + ' ' + doc.params[arg.name]) | stripTags | comment(75, '% ') }} {% else %} -{{ uname }} {% endif %} {% endfor %} % +{% endif %} +{# ------------------ Optional Inputs ------------------- #} {% if fun.opt|inputs|length %} % Optional Inputs: -{% endif %} {% for arg in fun.opt|inputs %} {% set uname = arg.name | upper + ('_IN' if arg.O else '') + ' (default: ' + arg.default + ')' %} {% if arg.name in doc.params %} @@ -45,6 +46,8 @@ {% endif %} {% endfor %} % +{% endif %} +{# ---------------------- See also --------------------- #} {% if 'seealso' in doc %} % See also: {% for item in doc['seealso'] %} cv.{{ item }}{% if not loop.last %}, {% endif %} @@ -52,6 +55,7 @@ cv.{{ item }}{% if not loop.last %}, {% endif %} % {% endif %} +{# ----------------------- Online ---------------------- #} {% set url = 'http://docs.opencv.org/modules/' + doc.module + '/doc/' + (doc.file|filename) + '.html#' + (fun.name|slugify) %} % Online docs: {{url}} % Copyright {{ time.strftime("%Y", time.localtime()) }} The OpenCV Foundation