- if not docHelper: docHelper = "Creates new algorithm."
- output.append( " ## %s" % docHelper )
- output.append( " #" )
- output.append( " # This method is dynamically added to %Mesh class by the meshing plug-in(s). " )
- output.append( " #" )
- output.append( " # If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." )
- output.append( " # Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." )
- output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" )
- output.append( " # @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" )
- output.append( " # @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " )
- output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) )
- output.append( " def %s(algo_type, geom_shape=0):" % method )
- output.append( " pass" )
+ if not docHelper: docHelper = "Create new algorithm."
+ if format == "doxygen":
+ output.append( " ## %s" % docHelper )
+ output.append( " #" )
+ output.append( " # This method is dynamically added to %Mesh class by the meshing plug-in(s). " )
+ output.append( " #" )
+ output.append( " # If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." )
+ output.append( " # Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." )
+ output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in" )
+ output.append( " # @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" )
+ output.append( " # @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " )
+ output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) )
+ output.append( " def %s(algo_type, geom_shape=0):" % method )
+ output.append( " pass" )
+ elif format == "sphinx":
+ output.append( ' def %s(algo_type, geom_shape=0):' % method )
+ output.append( ' """' )
+ output.append( ' %s' % docHelper )
+ output.append( ' ' )
+ output.append( ' This method is dynamically added to :class:`Mesh <smeshBuilder.Mesh>` class by the meshing plug-in(s). ' )
+ output.append( ' ' )
+ output.append( ' If the optional *geom_shape* parameter is not set, this algorithm is global (applied to whole mesh).' )
+ output.append( ' Otherwise, this algorithm defines a submesh based on *geom_shape* subshape.' )
+ output.append( ' ' )
+ output.append( ' Parameters:' )
+ output.append( ' algo_type: type of algorithm to be created; allowed values are specified by classes implemented by plug-in' )
+ output.append( ' geom_shape (GEOM_Object): if defined, the subshape to be meshed' )
+ output.append( ' ' )
+ output.append( ' Returns:')
+ output.append( ' An instance of Mesh_Algorithm sub-class according to the specified *algo_type*, see ' )
+ output.append( ' %s' % ", ".join( [ ":class:`~%s.%s`" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) )
+ output.append( ' """' )
+ output.append( ' pass' )