gdcmCommand.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmCommand.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/22 16:14:03 $
00007   Version:   $Revision: 1.4 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
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 } // end namespace gdcm
00081 
00082 //-----------------------------------------------------------------------------
00083 #endif

Generated on Fri Aug 24 12:53:08 2007 for gdcm by  doxygen 1.4.6