libs/stream_message/src/msg_comms.cxx
// ===========================================================================
// Specify that a task consists of a number of equal steps.
// task: name of task that consists of steps
// step: name of one step
// third arg: number of steps expected to complete the task
Specify that a task consists of a number of equal steps.
task: name of task that consists of steps
step: name of one step
third arg: number of steps expected to complete the task
Specify that a task consists of a number of equal steps . task : name of task that consists of steps step : name of one step third arg : number of steps expected to complete the task
void define_progress_steps(const char *task, const char *step,
			   unsigned long n_steps)
{
    if (msg_viewer_is_running() && task != NULL && step != NULL) {
        initialize_xml_and_threads();
        Message *steps_msg = new Message(trivialToDOMString("steps"));
        if (steps_msg) {
            steps_msg->AddAttribute(trivialToDOMString("name"), trivialToDOMString(step));
            steps_msg->AddAttribute(trivialToDOMString("for"), trivialToDOMString(task));
	    char steps_buf[25];
	    sprintf(steps_buf, "%lu", n_steps);
            steps_msg->AddAttribute(trivialToDOMString("count"), trivialToDOMString(steps_buf));
            if ( !send_to_log_presentation(*steps_msg) ) {
                cerr << "Could not send steps message." << endl;
            }
            delete steps_msg;
        }
    }
}
void define_progress_steps ( const char * task , const char * step , unsigned long n_steps ) { if ( msg_viewer_is_running ( ) && task != NULL && step != NULL ) { initialize_xml_and_threads ( ) ; Message * steps_msg = new Message ( trivialToDOMString ( " " ) ) ; if ( steps_msg ) { steps_msg -> AddAttribute ( trivialToDOMString ( " " ) , trivialToDOMString ( step ) ) ; steps_msg -> AddAttribute ( trivialToDOMString ( " " ) , trivialToDOMString ( task ) ) ; char steps_buf [ 25 ] ; sprintf ( steps_buf , " " , n_steps ) ; steps_msg -> AddAttribute ( trivialToDOMString ( " " ) , trivialToDOMString ( steps_buf ) ) ; if ( ! send_to_log_presentation ( * steps_msg ) ) { cerr << " " << endl ; } delete steps_msg ; } } }
Specify that a task consists of a number of equal steps.
Specify that a task consists of a number of equal steps .