1 /*=========================================================================
4 Module: $RCSfile: gdcmCallbackCommand.h,v $
6 Date: $Date: 2007/09/18 15:59:48 $
7 Version: $Revision: 1.4 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef _GDCMCALLBACKCOMMAND_H_
20 #define _GDCMCALLBACKCOMMAND_H_
22 #include "gdcmDebug.h"
23 #include "gdcmCommand.h"
25 namespace GDCM_NAME_SPACE
27 //-----------------------------------------------------------------------------
29 * \brief CallbackCommand base class to react on a gdcm event
31 * \remarks The execution parameter depends on the
33 class GDCM_EXPORT CallbackCommand : public Command
35 gdcmTypeMacro(CallbackCommand);
36 gdcmNewMacro(CallbackCommand);
40 typedef void CbkMethod(CallbackCommand *);
42 /* // Note: the CallbackCommand:: namespace prefix is needed by Swig in the
43 // following method declarations. Refer to gdcmPython/gdcm.i
44 // for the reasons of this unnecessary notation at C++ level.
46 void SetCallback(CallbackCommand::CbkMethod *callback,void *arg = NULL );
48 void SetCallbackArgDelete(CallbackCommand::CbkMethod *callback);
50 // Note: replace CallbackCommand::Method *method to void(*method)(void *) to
51 // avoid wrapping problems with the typemap conversions
53 void SetCallback(void(*callback)(void *), // CallbackCommand::Method *method
55 void(*argDelete)(void *));
57 void SetCallback(CallbackCommand::CbkMethod *callback);
59 virtual void Execute();
63 virtual ~CallbackCommand();
66 /// pointer to the initialisation method for any progress bar
68 /// pointer to the ??? method for any progress bar
69 CbkMethod *CallbackArgDelete;
70 /// pointer to the ??? data for any progress bar
73 } // end namespace gdcm
75 //-----------------------------------------------------------------------------