Improve documentation

This commit is contained in:
vsr 2013-04-08 14:36:08 +00:00
parent 6200373964
commit 93a69962ae
4 changed files with 23 additions and 16 deletions

View File

@ -69,11 +69,14 @@ ENDIF(WINDOWS)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} smesh.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshDC.py smesh
COMMAND mkdir -p tmp && ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp/smesh.py StdMeshers
ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp1 tmp2
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py
COMMAND ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp1/smeshBuilder.py StdMeshers
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; os.remove(r'''smesh.py'''); shutil.rmtree(r'''tmp''')"
COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; shutil.rmtree(r'''tmp1'''); shutil.rmtree(r'''tmp2''')"
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', ignore=shutil.ignore_patterns('tmp_env.*', '*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''')"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

View File

@ -35,10 +35,19 @@ DOC_PYTHONPATH=$(prefix)/bin/salome:$(prefix)/lib/python$(PYTHON_VERSION)/site-p
DOC_LD_LIBRARY_PATH=$(prefix)lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome
DOC_SMESH_MeshersList=StdMeshers
tmp/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py $(srcdir)/collect_mesh_methods.py
@mkdir -p tmp && PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(srcdir)/collect_mesh_methods.py -o $@ StdMeshers
tmp1/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py $(srcdir)/collect_mesh_methods.py
@mkdir -p tmp1 && PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(srcdir)/collect_mesh_methods.py -o $@ StdMeshers
usr_docs: doxyfile_py doxyfile tmp/smeshBuilder.py
tmp2/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/smeshBuilder.py
mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $<
tmp2/smesh_algorithm.py: $(top_srcdir)/src/SMESH_SWIG/smesh_algorithm.py
mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $<
tmp2/StdMeshersBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py
mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $<
usr_docs: doxyfile_py doxyfile tmp1/smeshBuilder.py tmp2/smeshBuilder.py tmp2/smesh_algorithm.py tmp2/StdMeshersBuilder.py
@$(DOXYGEN) doxyfile_py ; \
$(DOXYGEN) doxyfile

View File

@ -51,11 +51,6 @@ import sys
def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"):
plugin_module_name = plugin_name + "Builder"
plugin_module = "salome.%s.%s" % (plugin_name, plugin_module_name)
if dummymeshhelp:
namespace = plugin_name
else:
namespace = "SMESH_SWIG"
plugin_module_short = "%s.%s" % (namespace, plugin_module_name)
try:
exec( "from salome.smesh.smeshBuilder import *")
exec( "import %s" % plugin_module )
@ -112,7 +107,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"):
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_short, algo.__name__ ) for algo in methods[ method ] ] ) )
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" )
pass

View File

@ -99,10 +99,10 @@ EXAMPLE_RECURSIVE = NO
#---------------------------------------------------------------------------
#Input related options
#---------------------------------------------------------------------------
INPUT = @top_srcdir@/src/SMESH_SWIG/smeshBuilder.py \
@top_srcdir@/src/SMESH_SWIG/smesh_algorithm.py \
@top_srcdir@/src/SMESH_SWIG/StdMeshersBuilder.py \
tmp/smeshBuilder.py
INPUT = tmp2/smeshBuilder.py \
tmp2/smesh_algorithm.py \
tmp2/StdMeshersBuilder.py \
tmp1/smeshBuilder.py
FILE_PATTERNS =
IMAGE_PATH = @srcdir@/images
RECURSIVE = NO