qaTree/functions/gfunc.cpp
// recursively called to handle node-node
// parent-child printing
// called by dump_tree to handle node-tree
// parent-child printing
recursively called to handle node-node
parent-child printing
called by dump_tree to handle node-tree
parent-child printing
recursively called to handle node - node parent - child printing called by dump_tree to handle node - tree parent - child printing
void dump_node(FILE* outfile, qaNode* node) {
   fprintf(outfile, "\t\t Attribute %s\n", node->ID.c_str());
   fprintf(outfile, "\t\t\t Source: %s\n", node->src.c_str());
   fprintf(outfile, "\t\t\t Stimulus: %s\n", node->stim.c_str());
   fprintf(outfile, "\t\t\t Environment: %s\n", node->env.c_str());
   fprintf(outfile, "\t\t\t Artifact: %s\n", node->afct.c_str());
   fprintf(outfile, "\t\t\t Response: %s\n", node->rsp.c_str());
   fprintf(outfile, "\t\t\t Response Measure: %s\n", node->rspm.c_str());
   for (size_t child = 0; child < node->children.size(); ++child) {
      dump_node(outfile, node->children[child]);
   }
}
void dump_node ( FILE * outfile , qaNode * node ) { fprintf ( outfile , " \t \t \n " , node -> ID . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> src . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> stim . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> env . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> afct . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> rsp . c_str ( ) ) ; fprintf ( outfile , " \t \t \t \n " , node -> rspm . c_str ( ) ) ; for ( size_t child = 0 ; child < node -> children . size ( ) ; ++ child ) { dump_node ( outfile , node -> children [ child ] ) ; } }
recursively called to handle node-node
parent-child printing
called by dump_tree to handle node-tree
parent-child printing
recursively called to handle node - node parent - child printing called by dump_tree to handle node - tree parent - child printing
// print this node first // handle node's node children