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://svn.slicer.org/Slicer3/trunk/Libs/SlicerExecutionModel/ModuleDescriptionParser/ModuleProcessInformation.h $
00010   Date:      $Date: 2010-02-21 13:53:46 -0500 (Sun, 21 Feb 2010) $
00011   Version:   $Revision: 12196 $
00012 
00013 ==========================================================================*/
00014 
00015 #ifndef __ModuleProcessInformation_h
00016 #define __ModuleProcessInformation_h
00017 
00018 #include <ostream>
00019 #include <cstring>
00020 #include <string.h>
00021 
00022 #if defined(WIN32)
00023 #pragma warning ( disable : 4996 )
00024 #endif
00025 
00026 extern "C" {
00027   struct ModuleProcessInformation
00028   {
00030     unsigned char Abort;
00031     
00033     float Progress;      
00034     float StageProgress; 
00035     char  ProgressMessage[1024];
00036     void (*ProgressCallbackFunction)(void *);
00037     void *ProgressCallbackClientData;
00038 
00039     double ElapsedTime;
00040 
00041     void Initialize()
00042       {
00043         Abort = 0;
00044         Progress = 0;
00045         strcpy(ProgressMessage, "");
00046         ElapsedTime = 0.0;
00047       };
00048 
00049     void SetProgressCallback( void (*fun)(void *), void *who )
00050       {
00051         ProgressCallbackFunction = fun;
00052         ProgressCallbackClientData = who;
00053       };
00054   };
00055 };
00056 
00057 std::ostream& operator<<(std::ostream &os, const ModuleProcessInformation &p);
00058     
00059 
00060 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1