Documentation: fixed "template<class T> const T" case for ".. ocv:function::" macro
authorAndrey Kamaev <no@email>
Sat, 13 Aug 2011 18:05:11 +0000 (18:05 +0000)
committerAndrey Kamaev <no@email>
Sat, 13 Aug 2011 18:05:11 +0000 (18:05 +0000)
doc/ocv.py
modules/gpu/doc/image_filtering.rst

index 353a67a..59d072b 100644 (file)
@@ -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()
index 9a8fd46..e912287 100644 (file)
@@ -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`