00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef _GDCMCOMMAND_H_
00020 #define _GDCMCOMMAND_H_
00021 
00022 #include "gdcmRefCounter.h"
00023 
00024 namespace GDCM_NAME_SPACE 
00025 {
00026 
00027 class CommandManager;
00028 
00029 
00031 enum CommandType {
00032    CMD_UNKNOWN       =0,
00033    CMD_DEBUG,
00034    CMD_WARNING,
00035    CMD_ERROR,
00036    CMD_ASSERT,
00037    CMD_STARTPROGRESS,
00038    CMD_ENDPROGRESS,
00039    CMD_PROGRESS
00040 };
00041 
00042 
00048 class GDCM_EXPORT Command : public RefCounter
00049 {
00050    gdcmTypeMacro(Command);
00051    gdcmNewMacro(Command);
00052 
00053 public:
00054 
00055    void SetType(unsigned int type);
00056    unsigned int GetType() const;
00057 
00058    void SetObject(Base *object);
00059    Base *GetObject() const;
00060    void SetConstObject(const Base *object);
00061    const Base *GetConstObject() const;
00062 
00063    void SetText(const std::string &text);
00064    const std::string &GetText() const;
00065 
00066    virtual void Execute();
00067 
00068    static const char *GetCommandAsString(unsigned int command);
00069 
00070 protected:
00071    Command();
00072    virtual ~Command();
00073 
00074 private:
00075    std::string Text;
00076    Base *Object;
00077    const Base *ConstObject;
00078    unsigned int Cmd;
00079 };
00080 } 
00081 
00082 
00083 #endif