qaengine/src/ClientInterface.cxx
//--------------------------------------------------------------------------------
// Client wants to get list of children
//--------------------------------------------------------------------------------
Client wants to get list of children
Client wants to get list of children
int ClientInterface::command_PrintNode(string& reply,int socket,int id,ScopeSet scope) {
	reply = "";
    TaskDriver* task=m_Clients[socket]->getActiveProject();
	int ch = task->getFirstChild(id);
	while(ch>=0) {
		char buf[100];
		sprintf(buf,"%d",ch);
		reply+=buf;
	    reply+="\t";
		PropertiesMap map = task->getNodeProperties(ch,scope);
		PropertiesMap::iterator i;
		for(i=map.begin();i!=map.end();i++) {
			reply+=i->first;
			reply+="\t";
			reply+=i->second;
			reply+="\t";
		}
		reply+="Hits";
		reply+="\t";
		sprintf(buf,"%d",task->getNodeHitsCount(ch,scope));
		reply+=buf;
		ch = task->getNextSibling(ch);
		if(ch>=0) reply+="\n";
	}
	return 0;
}
int ClientInterface :: command_PrintNode ( string & reply , int socket , int id , ScopeSet scope ) { reply = " " ; TaskDriver * task = m_Clients [ socket ] -> getActiveProject ( ) ; int ch = task -> getFirstChild ( id ) ; while ( ch >= 0 ) { char buf [ 100 ] ; sprintf ( buf , " " , ch ) ; reply += buf ; reply += " \t " ; PropertiesMap map = task -> getNodeProperties ( ch , scope ) ; PropertiesMap :: iterator i ; for ( i = map . begin ( ) ; i != map . end ( ) ; i ++ ) { reply += i -> first ; reply += " \t " ; reply += i -> second ; reply += " \t " ; } reply += " " ; reply += " \t " ; sprintf ( buf , " " , task -> getNodeHitsCount ( ch , scope ) ) ; reply += buf ; ch = task -> getNextSibling ( ch ) ; if ( ch >= 0 ) reply += " \n " ; } return 0 ; }
Client wants to get list of children
Client wants to get list of children