diff --git a/Doc/Manual/Doxygen.html b/Doc/Manual/Doxygen.html index d530218a3..9e0b3d813 100644 --- a/Doc/Manual/Doxygen.html +++ b/Doc/Manual/Doxygen.html @@ -13,19 +13,19 @@
  • Preparations -
  • Doxygen To JavaDoc +
  • Doxygen To Javadoc -
  • Doxygen To PythonDoc +
  • Doxygen To Pydoc @@ -45,7 +45,7 @@

    This chapter describes SWIG's support for translating Doxygen comments found in interface and header files into a target language's normal -documentation language. Currently only JavaDoc and PythonDoc is +documentation language. Currently only Javadoc and Pydoc is supported.

    @@ -59,8 +59,8 @@ Code proposal from Summer 2008. It adds an extra layer of functionality to SWIG, allowing automated translation of Doxygen formatted comments from input files into a documentation language more suited for the -target language. Currently this module only translates into JavaDoc -and PythonDoc for the SWIG Java and Python Modules, but other +target language. Currently this module only translates into Javadoc +and Pydoc for the SWIG Java and Python Modules, but other extensions are to be added in time.

    @@ -87,7 +87,7 @@ itself is a deeper tool and can provide you better feedback for correcting any syntax errors that may be present. Please look at Doxygen's Documenting the -code for proper specificatons for comment format. However, SWIG's +code for proper specifications for comment format. However, SWIG's Doxygen parser will still point you most of errors and warnings found in comments (like unterminated strings or missing ending tags).

    @@ -107,7 +107,7 @@ Documenting the code). Here they are:
     /**
    - * JavaDoc style comment, multiline
    + * Javadoc style comment, multiline
      */
     /*!
      * QT-style comment, multiline
    @@ -192,7 +192,7 @@ enum E_NUMBERS
     
     

    Just remember, if SWIG shows syntax error parsing the file because of -your comment, try to move it in some other, 'safer' place as desribed +your comment, try to move it in some other, 'safer' place as described above.
    Also, currently only the comments directly before or after the nodes @@ -205,7 +205,7 @@ assigned to anything.

    There is a switch '-doxygen' in every module that supports converting documentation comments. Some comments in some target languages can be -manually overriden by specific swig's features, +manually overridden by specific swig's features, like feature:docstring or feature:autodoc, in this cases Doxygen comments have lowest priority.

    @@ -215,18 +215,18 @@ out in parser and all the resources used by comment parser and translator are freed.

    -

    39.2.2 Additional Commandline Options

    +

    39.2.2 Additional Command Line Options

    -ALSO TO BE ADDED (JavaDoc Autobrief?) +ALSO TO BE ADDED (Javadoc auto brief?)

    -

    39.3 Doxygen To JavaDoc

    +

    39.3 Doxygen To Javadoc

    -If translation is enabled, JavaDoc formatted comments should be +If translation is enabled, Javadoc formatted comments should be automatically placed in the correct locations in the resulting module and proxy files.

    @@ -321,7 +321,7 @@ code.

    -JavaDoc translator will handle most of the tags conversions (see the +Javadoc translator will handle most of the tags conversions (see the table below). It will also automatically translate link-objects params, in \see and \link...\endlink commands. For example, 'someFunction(std::string)' will be converted to @@ -332,14 +332,14 @@ commands are stripped out, if specified parameter is not present in function. Use 'doxygen:nostripparams' to avoid.
    If you intend to use resulting proxy files with Doxygen docs -generator, rather than JavaDoc, you may want to turn off translator +generator, rather than Javadoc, you may want to turn off translator completely (doxygen:notranslate feature). Then SWIG will just copy the comments to the proxy file and reformat them if needed, but all the comment content will be left as is.

    -JavaDoc translator features summary +Javadoc translator features summary (see %feature directives):
    @@ -349,7 +349,7 @@ directives):

     
    -
    +
    -
    +
     
    @@ -373,11 +373,11 @@ Doxygen commands if such parameter is not found
     
     
     
    -

    39.3.2 JavaDoc Tags

    +

    39.3.2 Javadoc Tags

    -Here is the list of all Doxygen tags and the description of how they are translated to JavaDoc +Here is the list of all Doxygen tags and the description of how they are translated to Javadoc
    Doxygen tags:

    @@ -422,7 +422,7 @@ Here is the list of all Doxygen tags and the description of how they are transla - + @@ -554,7 +554,7 @@ Here is the list of all Doxygen tags and the description of how they are transla - + @@ -632,11 +632,11 @@ Here is the list of all Doxygen tags and the description of how they are transla

    Doxygen has a wealth of tags such as @latexonly that have no -equivalent in JavaDoc. As a result several tags that have no +equivalent in Javadoc. As a result several tags that have no translation (or particular use, such as some linking and section tags) -are supressed with their content just printed out (if it has any +are suppressed with their content just printed out (if it has any sense, typically text content). If you are interested in more of the -specifics of JavaDoc, please +specifics of Javadoc, please visit How to Write Doc Comments for the Javadoc Tool.
    @@ -866,15 +866,15 @@ comment, the whole comment block is ignored: TO BE ADDED.

    -

    39.4 Doxygen To PythonDoc

    +

    39.4 Doxygen To Pydoc

    -If translation is enabled, PyDoc formatted comments should be +If translation is enabled, Pydoc formatted comments should be automatically placed in the correct locations in the resulting module -and proxy files. The problem is that PyDoc has no tag mechanism like -Doxygen or JavaDoc, so most of Doxygen commands are translated as -English plaintext pieces. +and proxy files. The problem is that Pydoc has no tag mechanism like +Doxygen or Javadoc, so most of Doxygen commands are translated as +English plain text pieces.

    39.4.1 Basic Example

    @@ -949,12 +949,12 @@ file, so they have no comment translated for them.

    - Whitespaces and tables
    - Whitespaces are preserved when translating comments, so it makes + Whitespace and tables
    + Whitespace is preserved when translating comments, so it makes sense to have Doxygen comments formatted in a readable way. This includes tables, where tags <th>, <td> and </tr>are translated to '|'. The line after line with <th> tags contains dashes. - If we take care about whitespaces, comments in Python are much more + If we take care about whitespace, comments in Python are much more readable. Example:

    @@ -984,11 +984,11 @@ translates to Python as:
     

    Overloaded functions
    Since all the overloaded functions in c++ are wrapped into one Python -function, PyDoc translator will combine every comment of every +function, Pydoc translator will combine every comment of every overloaded function and put it in the comment for wrapping function.
    If you intend to use resulting proxy files with Doxygen docs -generator, rather than PyDoc, you may want to turn off translator +generator, rather than Pydoc, you may want to turn off translator completely (doxygen:notranslate feature). Then SWIG will just copy the comments to the proxy file and reformat them if needed, but all the comment content will be left as is. As Doxygen doesn't support @@ -1000,7 +1000,7 @@ to do the work.

    -PyDoc translator features summary (see %feature directives): +Pydoc translator features summary (see %feature directives):

    @@ -1008,7 +1008,7 @@ PyDoc translator features summary (see
     
    doxygen:noranslatedoxygen:notranslate Turn off the whole Doxygen translator. The Doxygen comment will be attached to the right node, @@ -358,7 +358,7 @@ but all the commands and text will be left as-is
    doxygen:notlinkranslatedoxygen:nolinkranslate Turn off automatic link-objects translation
    \copyrightreplaced with 'Copyrigth:'replaced with 'Copyright:'
    \deprecated
    \throwstranslated to @thtowstranslated to @throws
    \todo
    - +
    doxygen:noranslatedoxygen:notranslate Turn off the whole Doxygen translator. The Doxygen comment will be attached to the right node, @@ -1018,11 +1018,11 @@ but all the commands and text will be left as-is
    -

    39.4.2 PyDoc translator

    +

    39.4.2 Pydoc translator

    -Here is the list of all Doxygen tags and the description of how they are translated to PyDoc +Here is the list of all Doxygen tags and the description of how they are translated to Pydoc
    Doxygen tags:

    @@ -1058,7 +1058,7 @@ Here is the list of all Doxygen tags and the description of how they are transla \copyright -prints'Copyrigth:' +prints 'Copyright:' \deprecated @@ -1222,7 +1222,7 @@ Here is the list of all Doxygen tags and the description of how they are transla \. -prints . char +prints . character \:: @@ -1236,9 +1236,9 @@ Here is the list of all Doxygen tags and the description of how they are transla

    Doxygen has a wealth of tags such as @latexonly that have no -equivalent in PyDoc. As a result several tags that have no +equivalent in Pydoc. As a result several tags that have no translation (or particular use, such as some linking and section tags) -are supressed with their content just printed out (if it has any +are suppressed with their content just printed out (if it has any sense, typically text content).
    Here is the list of these tags: @@ -1449,7 +1449,7 @@ first command, are also present in the parse tree. These individual are passed on individually to the DoxygenTranslator Module. This module builds its own private parse tree and hands it to a separate class for translation into the target documentation language. For -example, JavaDocConverter is the JavaDoc module class. +example, JavaDocConverter is the Javadoc module class.

    39.5.2 Debugging Doxygen parser and translator

    @@ -1483,7 +1483,7 @@ This part of SWIG currently has 6 runtime tests in both Java and Python.

    -All this tests are included in common.mk and are build with the +All this tests are included in common.mk and are built with the commands like 'make check-test-suite' or 'make check-python-test-suite'. To run them individually, type make <testname>.cpptest -s in the language-specific subdir in @@ -1492,7 +1492,7 @@ check-python-test-suite'. To run them individually, type Examples/test-suite/java $ make doxygen_misc_constructs.cpptest -s -If test fails, both expected and translated comments are printed to +If the test fails, both expected and translated comments are printed to std out, but also written to files expected.txt and got.txt. Since it is often difficult to find a single character difference in several lines of text, we can use some diff @@ -1504,14 +1504,14 @@ tool, for example:
    -Runtime tests in Java are implemented using JavaDoc doclets. To make that work, you +Runtime tests in Java are implemented using Javadoc doclets. To make that work, you should have tools.jar from the JDK in your classpath. Or you should have JAVA_HOME environmental var defined and pointing to the JDK location.
    The Java's comment parsing code (the testing part) is located in commentParser.java. You may see it to understand how the checking process works. There is also a possibility to run that file as stand-alone program, with 'java commentParser ', -and it will print the list of comments found in the specified dir (in the format it's used +and it will print the list of comments found in the specified directory (in the format it's used in runtime tests). So, when you want to create the new test of Doxygen comment translator, just copy any existing one, and replace the actual comment content (section of entries in form 'wantedComments.put(...)' with the output of the above command. diff --git a/Source/DoxygenTranslator/src/DoxygenParser.cpp b/Source/DoxygenTranslator/src/DoxygenParser.cpp index 57a0c5bd0..22f391b36 100644 --- a/Source/DoxygenTranslator/src/DoxygenParser.cpp +++ b/Source/DoxygenTranslator/src/DoxygenParser.cpp @@ -45,7 +45,7 @@ void DoxygenParser::fillTables() if (doxygenCommands.size()) return; - // fill in tables with data from DxygenCommands.h + // fill in tables with data from DoxygenCommands.h for (int i = 0; i < simpleCommandsSize; i++) doxygenCommands[simpleCommands[i]] = SIMPLECOMMAND; diff --git a/Source/DoxygenTranslator/src/JavaDocConverter.cpp b/Source/DoxygenTranslator/src/JavaDocConverter.cpp index 7f12af96d..b5edcb8a2 100644 --- a/Source/DoxygenTranslator/src/JavaDocConverter.cpp +++ b/Source/DoxygenTranslator/src/JavaDocConverter.cpp @@ -50,12 +50,12 @@ void JavaDocConverter::fillStaticTables() * Java src is and therefore invisible on output - browser ignores unknown command. * This is handy in syntax descriptions, for example: more . * - * Standlaone < and > need not be translated, they are rendered properly in + * Standalone < and > need not be translated, they are rendered properly in * all three outputs. * * ., %, and " need not to be translated * - * entities must be translated - remain in Java, something meaningfull in Python (<, ...) + * entities must be translated - remain in Java, something meaningful in Python (<, ...) * * - Python * - add comments also to auto-generated methods like equals(), delete() in Java, @@ -419,7 +419,7 @@ void JavaDocConverter::handleTagHtml(DoxygenEntity& tag, { if (tag.entityList.size()) { // do not include empty tags std::string tagData = translateSubtree(tag); - // wrap the thing, ignoring whitespaces + // wrap the thing, ignoring whitespace size_t wsPos = tagData.find_last_not_of("\n\t "); if (wsPos != std::string::npos) translatedComment += "<" + arg + ">" + tagData.substr(0, wsPos + 1) + "typeOfEntity == "plainstd::endl") { root.entityList.pop_front(); diff --git a/Source/DoxygenTranslator/src/PyDocConverter.cpp b/Source/DoxygenTranslator/src/PyDocConverter.cpp index 5a1bbbc6f..5320ce7f9 100644 --- a/Source/DoxygenTranslator/src/PyDocConverter.cpp +++ b/Source/DoxygenTranslator/src/PyDocConverter.cpp @@ -442,7 +442,7 @@ void PyDocConverter::handleTagWrap(DoxygenEntity& tag, { if (tag.entityList.size()) { // do not include empty tags std::string tagData = translateSubtree(tag); - // wrap the thing, ignoring whitespaces + // wrap the thing, ignoring whitespace size_t wsPos = tagData.find_last_not_of("\n\t "); if (wsPos != std::string::npos && wsPos != tagData.size() - 1) translatedComment += arg + tagData.substr(0, wsPos + 1) + arg diff --git a/Source/DoxygenTranslator/src/PyDocConverter.h b/Source/DoxygenTranslator/src/PyDocConverter.h index e0ac9cbc0..262772e7b 100644 --- a/Source/DoxygenTranslator/src/PyDocConverter.h +++ b/Source/DoxygenTranslator/src/PyDocConverter.h @@ -36,7 +36,7 @@ protected: /* * Format a string so it is justified and split over several lines - * not exeeding a given length. + * not exceeding a given length. */ std::string justifyString(std::string unformattedLine, int indent = 0, int maxWidth = DOC_STRING_LENGTH); /* @@ -46,7 +46,7 @@ protected: */ std::string translateSubtree(DoxygenEntity & doxygenEntity); /* - * Translate one entity with the appropriate handler, acording + * Translate one entity with the appropriate handler, according * to the tagHandlers */ void translateEntity(DoxygenEntity & doxyEntity, std::string &translatedComment); @@ -117,14 +117,14 @@ protected: void handleDoxyHtmlTag(DoxygenEntity& tag, std::string& translatedComment, std::string &arg); - /** Does not ouput params of HTML tag, for example in + /** Does not output params of HTML tag, for example in
    * 'border=1' is not written to output. */ void handleDoxyHtmlTagNoParam(DoxygenEntity& tag, std::string& translatedComment, std::string &arg); - /** TRanslates tag text to: text ("url"). */ + /** Translates tag text to: text ("url"). */ void handleDoxyHtmlTag_A(DoxygenEntity& tag, std::string& translatedComment, std::string &arg); @@ -170,7 +170,7 @@ private: Node *currentNode; // this contains the handler pointer and one string argument static std::map > tagHandlers; - // this cointains the sectins titiles, like 'Arguments:' or 'Notes:', that are printed only once + // this contains the sections tittles, like 'Arguments:' or 'Notes:', that are printed only once static std::map sectionTitles; void fillStaticTables(); };