refactored DoxygenEntity class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13724 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a753f3e799
commit
c9eda79264
7 changed files with 155 additions and 253 deletions
|
|
@ -14,16 +14,21 @@
|
|||
|
||||
#include "DoxygenTranslator.h"
|
||||
|
||||
DoxygenTranslator::DoxygenTranslator(bool debugTranslator, bool debugParser)
|
||||
: debug(debugTranslator), parser(debugParser) {
|
||||
}
|
||||
DoxygenTranslator::DoxygenTranslator(bool debugTranslator, bool debugParser) :
|
||||
debug(debugTranslator),
|
||||
parser(debugParser)
|
||||
{}
|
||||
|
||||
|
||||
DoxygenTranslator::~DoxygenTranslator() {
|
||||
}
|
||||
|
||||
|
||||
bool DoxygenTranslator::hasDocumentation(Node *node) {
|
||||
return getDoxygenComment(node);
|
||||
}
|
||||
|
||||
|
||||
String *DoxygenTranslator::getDoxygenComment(Node *node) {
|
||||
return Getattr(node, "doxygen");
|
||||
}
|
||||
|
|
@ -31,16 +36,17 @@ String *DoxygenTranslator::getDoxygenComment(Node *node) {
|
|||
|
||||
String *DoxygenTranslator::getDocumentation(Node *node) {
|
||||
|
||||
if (!hasDocumentation(node))
|
||||
if (!hasDocumentation(node)) {
|
||||
return NewString("");
|
||||
}
|
||||
|
||||
return makeDocumentation(node);
|
||||
}
|
||||
|
||||
void DoxygenTranslator::printTree(std::list < DoxygenEntity > &entityList) {
|
||||
std::list < DoxygenEntity >::iterator p = entityList.begin();
|
||||
while (p != entityList.end()) {
|
||||
(*p).printEntity(0);
|
||||
p++;
|
||||
|
||||
void DoxygenTranslator::printTree(const DoxygenEntityList &entityList) {
|
||||
|
||||
for (DoxygenEntityListCIt p = entityList.begin(); p != entityList.end(); p++) {
|
||||
p->printEntity(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue