Functionality fixes, small tweaks to make DoxygenTranslator more robust and the beginnings of a doxygen example collection

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10656 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Cheryl Foil 2008-07-10 04:18:22 +00:00
commit c727877cf9

View file

@ -24,7 +24,7 @@ string commandArray2[] = {"a", "addindex", "addtogroup", "anchor", "arg", "atten
"sa", "section", "see", "showinitializer", "since", "skip", "skipline", "struct", "subpage",
"subsection", "subsubsection", "test", "throw", "todo", "tparam", "typedef", "union", "until",
"var", "verbatim", "verbinclude", "version", "warning", "weakgroup", "xmlonly", "xrefitem",
"$", "@", string(1, 92), string(1, '&'), "~", "<", ">", string(1, '#'), "%"};
"$", "@", string(1, 92), "&", "~", "<", ">", "#", "%"};
string findCommand(int commandNum){
@ -56,7 +56,7 @@ DoxygenEntity::DoxygenEntity(string typeEnt, string param1){
/* Nonterminal node
* contains
*/
DoxygenEntity::DoxygenEntity(string typeEnt, list <DoxygenEntity> entList){
DoxygenEntity::DoxygenEntity(string typeEnt, list <DoxygenEntity> &entList ){
typeOfEntity = typeEnt;
data = "";
isLeaf = 0;
@ -65,18 +65,20 @@ DoxygenEntity::DoxygenEntity(string typeEnt, list <DoxygenEntity> entList){
void DoxygenEntity::printEntity(int level){
int thisLevel = level;
if (isLeaf) {
for (int i = 0; i < level; i++) {cout << "\t";}
for (int i = 0; i < thisLevel; i++) {cout << "\t";}
cout << "Node Command: " << typeOfEntity << " ";
if (data.compare("") != 0) cout << "Node Data: " << data;
cout << endl;
}
else{
for (int i = 0; i < thisLevel; i++) {cout << "\t";}
cout << "Node Command : " << typeOfEntity << endl;
list<DoxygenEntity>::iterator p = entityList.begin();
level++;
thisLevel++;
while (p != entityList.end()){
(*p).printEntity(level);
(*p).printEntity(thisLevel);
p++;
}
}