X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmCommandManager.h;h=6dac018da900d4cbe96945a483d444a52582e733;hb=224876ca6cbe71952f2a1d66d9853eca7745d3a0;hp=cd7244f8e3ec3adad3585d2a998c136015e65373;hpb=41559a6f2d66bcd4af4db17a0d9668df37d19f3b;p=gdcm.git diff --git a/src/gdcmCommandManager.h b/src/gdcmCommandManager.h index cd7244f8..6dac018d 100644 --- a/src/gdcmCommandManager.h +++ b/src/gdcmCommandManager.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommandManager.h,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:22 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/08/22 16:14:03 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,19 +16,19 @@ =========================================================================*/ -#ifndef GDCMCOMMANDMANAGER_H -#define GDCMCOMMANDMANAGER_H +#ifndef _GDCMCOMMANDMANAGER_H_ +#define _GDCMCOMMANDMANAGER_H_ #include "gdcmRefCounter.h" #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class Command; -typedef std::pair CommandKey; +typedef std::pair CommandKey; typedef std::map CommandHT; //----------------------------------------------------------------------------- @@ -44,24 +44,25 @@ class GDCM_EXPORT CommandManager : public Base public: void Print(std::ostream &os = std::cout, std::string const &indent = "" ); - static void SetCommand(const Base *object,unsigned int type,Command *command); - static Command *GetCommand(const Base *object,unsigned int type); + static void SetCommand(const Base *object, unsigned int type, Command *command); + static Command *GetCommand(const Base *object, unsigned int type); - static bool ExecuteCommand(Base *object,unsigned int type,std::string text = ""); - static bool ExecuteCommandConst(const Base *object,unsigned int type,std::string text = ""); + static bool ExecuteCommand(Base *object, unsigned int type, std::string text = ""); + static bool ExecuteCommandConst(const Base *object, unsigned int type, std::string text = ""); static const CommandManager *GetInstance(); + ~CommandManager(); + protected: CommandManager(); - ~CommandManager(); void InClearCommand(void); - void InSetCommand(const Base *object,unsigned int type,Command *command); - Command *InGetCommand(const Base *object,unsigned int type); + void InSetCommand(const Base *object, unsigned int type, Command *command); + Command *InGetCommand(const Base *object, unsigned int type); - bool InExecuteCommand(Base *object,unsigned int type,std::string text = ""); - bool InExecuteCommandConst(const Base *object,unsigned int type,std::string text = ""); + bool InExecuteCommand(Base *object, unsigned int type, std::string text = ""); + bool InExecuteCommandConst(const Base *object, unsigned int type, std::string text = ""); private: static CommandManager Instance;