qaTree/functions/gfunc.cpp
// helper function
// recursively called to handle tree-tree
// parent-child printing
// called by dump_proj to handle tree-root
// parent-child printing
helper function
recursively called to handle tree-tree
parent-child printing
called by dump_proj to handle tree-root
parent-child printing
helper function recursively called to handle tree - tree parent - child printing called by dump_proj to handle tree - root parent - child printing
void dump_tree(FILE* outfile, qaTree* root) {
   if (root == proj_root) {
      fprintf (outfile, "Project: %s\n", root->name.c_str());
   } else {
      fprintf (outfile, "\tCategory: %s\n", root->name.c_str());
   }
   for (size_t child = 0; child < root->cachildren.size(); ++child) {
      dump_tree(outfile, root->cachildren[child]);
   }
   for (size_t child = 0; child < root->children.size(); ++ child) {
      dump_node(outfile, root->children[child]);
   }
}
void dump_tree ( FILE * outfile , qaTree * root ) { if ( root == proj_root ) { fprintf ( outfile , " \n " , root -> name . c_str ( ) ) ; } else { fprintf ( outfile , " \t \n " , root -> name . c_str ( ) ) ; } for ( size_t child = 0 ; child < root -> cachildren . size ( ) ; ++ child ) { dump_tree ( outfile , root -> cachildren [ child ] ) ; } for ( size_t child = 0 ; child < root -> children . size ( ) ; ++ child ) { dump_node ( outfile , root -> children [ child ] ) ; } }
helper function
recursively called to handle tree-tree
parent-child printing
called by dump_proj to handle tree-root
parent-child printing
helper function recursively called to handle tree - tree parent - child printing called by dump_proj to handle tree - root parent - child printing
// how to print each "tree" thingy // handle category children first; recursive // now handle attribute children (node children of category trees only)