ModuleProcessInformation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   Module Description Parser
00009   Module:    $HeadURL: http://www.na-mic.org:8000/svn/Slicer3/trunk/Libs/ModuleDescriptionParser/ModuleProcessInformation.h $
00010   Date:      $Date: 2007/04/09 02:28:29 $
00011   Version:   $Revision: 1.1 $
00012 
00013 ==========================================================================*/
00014 
00015 #ifndef __ModuleProcessInformation_h
00016 #define __ModuleProcessInformation_h
00017 
00018 #include <ostream>
00019 #include <string.h>
00020 
00021 extern "C" {
00022   struct ModuleProcessInformation
00023   {
00025     unsigned char Abort;
00026     
00028     float Progress;      // Overall progress
00029     float StageProgress; // Progress of a single stage in an algorithm
00030     char  ProgressMessage[1024];
00031     void (*ProgressCallbackFunction)(void *);
00032     void *ProgressCallbackClientData;
00033 
00034     double ElapsedTime;
00035 
00036     void Initialize()
00037       {
00038         Abort = 0;
00039         Progress = 0;
00040         strcpy(ProgressMessage, "");
00041         ElapsedTime = 0.0;
00042       };
00043 
00044     void SetProgressCallback( void (*fun)(void *), void *who )
00045       {
00046         ProgressCallbackFunction = fun;
00047         ProgressCallbackClientData = who;
00048       };
00049   };
00050 };
00051 
00052 std::ostream& operator<<(std::ostream &os, const ModuleProcessInformation &p);
00053     
00054 
00055 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1