Documentation: added support for multiple superclasses
This commit is contained in:
parent
bb69e03f12
commit
dad75658f2
37
doc/ocv.py
37
doc/ocv.py
@ -704,9 +704,9 @@ class FuncDefExpr(NamedDefExpr):
|
|||||||
|
|
||||||
class ClassDefExpr(NamedDefExpr):
|
class ClassDefExpr(NamedDefExpr):
|
||||||
|
|
||||||
def __init__(self, name, visibility, static, parent = None):
|
def __init__(self, name, visibility, static, parents = None):
|
||||||
NamedDefExpr.__init__(self, name, visibility, static)
|
NamedDefExpr.__init__(self, name, visibility, static)
|
||||||
self.parent = parent
|
self.parents = parents
|
||||||
|
|
||||||
def get_id(self):
|
def get_id(self):
|
||||||
return self.name.get_id()
|
return self.name.get_id()
|
||||||
@ -1098,15 +1098,19 @@ class DefinitionParser(object):
|
|||||||
typename = self._parse_type()
|
typename = self._parse_type()
|
||||||
parent = None
|
parent = None
|
||||||
self.skip_ws()
|
self.skip_ws()
|
||||||
|
parents = []
|
||||||
if self.skip_string(':'):
|
if self.skip_string(':'):
|
||||||
self.skip_ws()
|
while not self.eof:
|
||||||
classname_pos = self.pos
|
self.skip_ws()
|
||||||
pvisibility, pstatic = self._parse_visibility_static()
|
classname_pos = self.pos
|
||||||
if pstatic:
|
pvisibility, pstatic = self._parse_visibility_static()
|
||||||
self.fail('unsepected static keyword, got %r' %
|
if pstatic:
|
||||||
self.definition[self.classname_pos:])
|
self.fail('unsepected static keyword, got %r' %
|
||||||
parent = ClassDefExpr(self._parse_type(), pvisibility, pstatic)
|
self.definition[self.classname_pos:])
|
||||||
return ClassDefExpr(typename, visibility, static, parent)
|
parents.append(ClassDefExpr(self._parse_type(), pvisibility, pstatic))
|
||||||
|
if not self.skip_string(','):
|
||||||
|
break
|
||||||
|
return ClassDefExpr(typename, visibility, static, parents)
|
||||||
|
|
||||||
def read_rest(self):
|
def read_rest(self):
|
||||||
rv = self.definition[self.pos:]
|
rv = self.definition[self.pos:]
|
||||||
@ -1252,10 +1256,15 @@ class OCVClassObject(OCVObject):
|
|||||||
self.attach_modifiers(signode, cls)
|
self.attach_modifiers(signode, cls)
|
||||||
signode += addnodes.desc_annotation(self.__class__.object_annotation, self.__class__.object_annotation)
|
signode += addnodes.desc_annotation(self.__class__.object_annotation, self.__class__.object_annotation)
|
||||||
self.attach_name(signode, cls.name)
|
self.attach_name(signode, cls.name)
|
||||||
if cls.parent:
|
first_parent = True
|
||||||
signode += nodes.Text(' : ')
|
for p in cls.parents:
|
||||||
self.attach_modifiers(signode, cls.parent, None)
|
if first_parent:
|
||||||
self.attach_name(signode, cls.parent.name)
|
signode += nodes.Text(' : ')
|
||||||
|
first_parent = False
|
||||||
|
else:
|
||||||
|
signode += nodes.Text(', ')
|
||||||
|
self.attach_modifiers(signode, p, None)
|
||||||
|
self.attach_name(signode, p.name)
|
||||||
|
|
||||||
class OCVStructObject(OCVClassObject):
|
class OCVStructObject(OCVClassObject):
|
||||||
object_annotation = "struct "
|
object_annotation = "struct "
|
||||||
|
@ -33,7 +33,7 @@ Estimates seams.
|
|||||||
|
|
||||||
detail::NoSeamFinder
|
detail::NoSeamFinder
|
||||||
--------------------
|
--------------------
|
||||||
.. ocv:class:: detail::NoSeamFinder : public SeamFinder
|
.. ocv:class:: detail::NoSeamFinder : public detail::SeamFinder
|
||||||
|
|
||||||
Stub seam estimator which does nothing. ::
|
Stub seam estimator which does nothing. ::
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Stub seam estimator which does nothing. ::
|
|||||||
|
|
||||||
detail::PairwiseSeamFinder
|
detail::PairwiseSeamFinder
|
||||||
--------------------------
|
--------------------------
|
||||||
.. ocv:class:: detail::PairwiseSeamFinder : public SeamFinder
|
.. ocv:class:: detail::PairwiseSeamFinder : public detail::SeamFinder
|
||||||
|
|
||||||
Base class for all pairwise seam estimators. ::
|
Base class for all pairwise seam estimators. ::
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Resolves masks intersection of two specified images in the given ROI.
|
|||||||
|
|
||||||
detail::VoronoiSeamFinder
|
detail::VoronoiSeamFinder
|
||||||
-------------------------
|
-------------------------
|
||||||
.. ocv:class:: detail::VoronoiSeamFinder : public PairwiseSeamFinder
|
.. ocv:class:: detail::VoronoiSeamFinder : public detail::PairwiseSeamFinder
|
||||||
|
|
||||||
Voronoi diagram-based seam estimator. ::
|
Voronoi diagram-based seam estimator. ::
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ Base class for all minimum graph-cut-based seam estimators. ::
|
|||||||
|
|
||||||
detail::GraphCutSeamFinder
|
detail::GraphCutSeamFinder
|
||||||
--------------------------
|
--------------------------
|
||||||
.. ocv:class:: detail::GraphCutSeamFinder : public GraphCutSeamFinderBase, public SeamFinder
|
.. ocv:class:: detail::GraphCutSeamFinder : public detail::GraphCutSeamFinderBase, public detail::SeamFinder
|
||||||
|
|
||||||
Minimum graph cut-based seam estimator. See details in [V03]_. ::
|
Minimum graph cut-based seam estimator. See details in [V03]_. ::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user