1 /*=========================================================================
4 Module: $RCSfile: gdcmCommandManager.h,v $
6 Date: $Date: 2005/11/28 15:20:35 $
7 Version: $Revision: 1.1 $
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 GDCMCOMMANDMANAGER_H
20 #define GDCMCOMMANDMANAGER_H
22 #include "gdcmRefCounter.h"
29 //-----------------------------------------------------------------------------
31 typedef std::map<unsigned int,Command *> CommandHT;
33 //-----------------------------------------------------------------------------
35 * \brief CommandManager base class to react on a gdcm event
37 * \remarks The execution parameter depends on the
39 class GDCM_EXPORT CommandManager : public RefCounter
41 gdcmTypeMacro(CommandManager);
44 /// \brief Contructs an empty Dict with a RefCounter
45 static CommandManager *New() {return new CommandManager();}
46 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
48 void SetCommand(unsigned int type,Command *command);
49 Command *GetCommand(unsigned int type) const;
51 bool ExecuteCommand(unsigned int type,std::string text = "");
52 bool ConstExecuteCommand(unsigned int type,std::string text = "") const;
59 mutable CommandHT CommandList;
61 } // end namespace gdcm
63 //-----------------------------------------------------------------------------