From 6168eaf745333efc26c06767053e351b8e35914d Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sat, 13 Aug 2011 18:05:11 +0000 Subject: [PATCH] Documentation: fixed "template const T" case for ".. ocv:function::" macro --- doc/ocv.py | 16 +++++++++++++++- modules/gpu/doc/image_filtering.rst | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/ocv.py b/doc/ocv.py index 353a67aaf6..59d072b8cc 100644 --- a/doc/ocv.py +++ b/doc/ocv.py @@ -560,6 +560,18 @@ class ConstDefExpr(WrappingDefExpr): def __unicode__(self): return (self.prefix and u'const %s' or u'%s const') % self.typename + +class ConstTemplateDefExpr(WrappingDefExpr): + + def __init__(self, typename, prefix=False): + WrappingDefExpr.__init__(self, typename) + self.prefix = prefix + + def get_id(self): + return self.typename.get_id() + u'C' + + def __unicode__(self): + return (self.prefix and u'const %s' or u'%s const') % self.typename class CastOpDefExpr(PrimaryDefExpr): @@ -933,9 +945,11 @@ class DefinitionParser(object): else: rv = PathDefExpr(result) is_const = self._peek_const(modifiers) + if is_const: + rv = ConstDefExpr(rv, prefix=True) if modifiers: rv = ModifierDefExpr(rv, modifiers) - return self._attach_crefptr(rv, is_const) + return self._attach_crefptr(rv, False) def _parse_default_expr(self): self.skip_ws() diff --git a/modules/gpu/doc/image_filtering.rst b/modules/gpu/doc/image_filtering.rst index 9a8fd46c7f..e912287fa3 100644 --- a/modules/gpu/doc/image_filtering.rst +++ b/modules/gpu/doc/image_filtering.rst @@ -240,7 +240,7 @@ gpu::boxFilter :param anchor: Anchor point. The default value ``Point(-1, -1)`` means that the anchor is at the kernel center. - .. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it. +.. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it. .. seealso:: :ocv:func:`boxFilter`