Progress towards a working pydoc implementation.
- Nodes are now passed to the documentation translator so that type information can be looked up and used in parameter comments. - Class comments are now inserted as well as some method information, git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
825e67b2b0
commit
0db7edfa63
11 changed files with 314 additions and 23 deletions
|
|
@ -5,13 +5,16 @@
|
|||
#include <string>
|
||||
#include "DoxygenEntity.h"
|
||||
#include "JavaDocConverter.h"
|
||||
#include "PyDocConverter.h"
|
||||
|
||||
DoxygenParser doxyParse;
|
||||
JavaDocConverter jDC;
|
||||
PyDocConverter pyDC;
|
||||
|
||||
DoxygenTranslator::DoxygenTranslator(){
|
||||
doxyParse = DoxygenParser();
|
||||
JavaDocConverter jDC = JavaDocConverter();
|
||||
PyDocConverter pyDC = PyDocConverter();
|
||||
}
|
||||
|
||||
DoxygenTranslator::~DoxygenTranslator(){
|
||||
|
|
@ -19,13 +22,16 @@ DoxygenTranslator::~DoxygenTranslator(){
|
|||
}
|
||||
|
||||
|
||||
char *DoxygenTranslator::convert(char* doxygenBlob, char* option){
|
||||
char *DoxygenTranslator::convert(Node *n, char* doxygenBlob, char* option){
|
||||
|
||||
list <DoxygenEntity> rootList = doxyParse.createTree(string(doxygenBlob));
|
||||
|
||||
string returnedString;
|
||||
if(strcmp(option, "JAVADOC") == 0){
|
||||
returnedString = jDC.convertToJavaDoc(rootList);
|
||||
returnedString = jDC.convertToJavaDoc(n, rootList);
|
||||
}
|
||||
else if(strcmp(option, "PYDOC") == 0){
|
||||
returnedString = pyDC.convertToPyDoc(n, rootList);
|
||||
}
|
||||
else cout << "Option not current supported.\n";
|
||||
char *nonConstString;
|
||||
|
|
@ -59,7 +65,7 @@ int testCommands(){
|
|||
//cout << "---ORIGINAL DOXYGEN--- " << endl << exampleArray[i] << endl;
|
||||
char *nonConstString = (char *)malloc(exampleArray[i].length()+1);
|
||||
strcpy(nonConstString, exampleArray[i].c_str());
|
||||
char * result = dT.convert(nonConstString, "JAVADOC");
|
||||
char * result = dT.convert(NULL, nonConstString, "JAVADOC");
|
||||
free(nonConstString);
|
||||
free(result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue