#include <gdcmCommandManager.h>
Inheritance diagram for GDCM_NAME_SPACE::CommandManager:
Public Member Functions | |
void | Print (std::ostream &os=std::cout, std::string const &indent="") |
Printer. | |
~CommandManager () | |
Canonical destructor. | |
void | SetPrintLevel (int level) |
Sets the print level for the Dicom Header Elements. | |
int | GetPrintLevel () |
Gets the print level for the Dicom Entries. | |
Static Public Member Functions | |
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 const CommandManager * | GetInstance () |
Protected Member Functions | |
CommandManager () | |
Constructor used when we want to generate dicom files from scratch. | |
void | InClearCommand (void) |
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="") |
Protected Attributes | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Member Functions | |
gdcmTypeMacro (CommandManager) | |
Private Attributes | |
CommandHT | CommandList |
Static Private Attributes | |
static CommandManager | Instance |
Definition at line 40 of file gdcmCommandManager.h.
|
Canonical destructor.
Definition at line 41 of file gdcmCommandManager.cxx. References GetInstance(), and InClearCommand(). 00042 { 00043 if( this == GetInstance() ) 00044 InClearCommand(); 00045 }
|
|
Constructor used when we want to generate dicom files from scratch.
Definition at line 33 of file gdcmCommandManager.cxx.
|
|
Definition at line 59 of file gdcmCommandManager.cxx. References InExecuteCommand(), and Instance. Referenced by GDCM_NAME_SPACE::PixelReadConvert::CallEndMethod(), GDCM_NAME_SPACE::FileHelper::CallEndMethod(), GDCM_NAME_SPACE::Document::CallEndMethod(), GDCM_NAME_SPACE::PixelReadConvert::CallProgressMethod(), GDCM_NAME_SPACE::FileHelper::CallProgressMethod(), GDCM_NAME_SPACE::Document::CallProgressMethod(), GDCM_NAME_SPACE::PixelReadConvert::CallStartMethod(), GDCM_NAME_SPACE::FileHelper::CallStartMethod(), and GDCM_NAME_SPACE::Document::CallStartMethod(). 00060 { 00061 return(Instance.InExecuteCommand(object, type, text)); 00062 }
|
|
Definition at line 64 of file gdcmCommandManager.cxx. References InExecuteCommandConst(), and Instance. Referenced by GDCM_NAME_SPACE::Debug::SendToOutput(). 00065 { 00066 return(Instance.InExecuteCommandConst(object,type,text)); 00067 }
|
|
|
|
Definition at line 54 of file gdcmCommandManager.cxx. References InGetCommand(), and Instance. Referenced by InExecuteCommand(), and InExecuteCommandConst(). 00055 { 00056 return(Instance.InGetCommand(object, type)); 00057 }
|
|
Definition at line 69 of file gdcmCommandManager.cxx. References Instance. Referenced by ~CommandManager(). 00070 { 00071 return &Instance; 00072 }
|
|
Gets the print level for the Dicom Entries.
Definition at line 50 of file gdcmBase.h. 00050 { return PrintLevel; }
|
|
Definition at line 76 of file gdcmCommandManager.cxx. References CommandList. Referenced by ~CommandManager(). 00077 { 00078 CommandHT::iterator it; 00079 for(it=CommandList.begin(); it != CommandList.end(); ++it) 00080 { 00081 if( it->second ) 00082 it->second->Delete(); 00083 } 00084 }
|
|
Definition at line 117 of file gdcmCommandManager.cxx. References GDCM_NAME_SPACE::Command::Execute(), GetCommand(), GDCM_NAME_SPACE::Command::SetObject(), GDCM_NAME_SPACE::Command::SetText(), and GDCM_NAME_SPACE::Command::SetType(). Referenced by ExecuteCommand(). 00118 { 00119 Command *cmd = GetCommand(object,type); 00120 if( cmd ) 00121 { 00122 cmd->SetText(text); 00123 cmd->SetObject(object); 00124 cmd->SetType(type); 00125 cmd->Execute(); 00126 return true; 00127 } 00128 return false; 00129 }
|
|
Definition at line 131 of file gdcmCommandManager.cxx. References GDCM_NAME_SPACE::Command::Execute(), GetCommand(), GDCM_NAME_SPACE::Command::SetConstObject(), GDCM_NAME_SPACE::Command::SetText(), and GDCM_NAME_SPACE::Command::SetType(). Referenced by ExecuteCommandConst(). 00132 { 00133 Command *cmd = GetCommand(object,type); 00134 if( cmd ) 00135 { 00136 cmd->SetText(text); 00137 cmd->SetConstObject(object); 00138 cmd->SetType(type); 00139 cmd->Execute(); 00140 return true; 00141 } 00142 return false; 00143 }
|
|
Definition at line 104 of file gdcmCommandManager.cxx. References CommandList. Referenced by GetCommand(). 00105 { 00106 CommandKey key = CommandKey(object,type); 00107 try 00108 { 00109 return CommandList[key]; 00110 } 00111 catch(...) 00112 { 00113 return NULL; 00114 } 00115 }
|
|
Definition at line 86 of file gdcmCommandManager.cxx. References CommandList, and GDCM_NAME_SPACE::RefCounter::Register(). Referenced by SetCommand(). 00087 { 00088 CommandKey key = CommandKey(object, type); 00089 Command *cmd = CommandList[key]; 00090 if( cmd != command ) 00091 { 00092 if( cmd ) 00093 cmd->Unregister(); 00094 if( command ) 00095 { 00096 CommandList[key] = command; 00097 command->Register(); 00098 } 00099 else 00100 CommandList.erase(key); 00101 } 00102 }
|
|
Printer.
Reimplemented from GDCM_NAME_SPACE::Base. Definition at line 150 of file gdcmCommandManager.cxx. References CommandList, and GDCM_NAME_SPACE::Command::GetCommandAsString(). 00151 { 00152 os<<indent<<"Command list : \n"; 00153 CommandHT::iterator it; 00154 for(it=CommandList.begin();it!=CommandList.end();++it) 00155 { 00156 os<<indent<<" "<<typeid(it->first.first).name()<<" ("<<it->first.first<<") - " 00157 <<Command::GetCommandAsString(it->first.second) 00158 <<" : "<<typeid(it->second).name()<<" ("<<it->second<<")" 00159 <<std::endl; 00160 } 00161 }
|
|
Definition at line 49 of file gdcmCommandManager.cxx. References InSetCommand(), and Instance. 00050 { 00051 Instance.InSetCommand(object, type, command); 00052 }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by GDCM_NAME_SPACE::FileHelper::Print(), and GDCM_NAME_SPACE::DicomDir::Print(). 00047 { PrintLevel = level; }
|
|
Definition at line 69 of file gdcmCommandManager.h. Referenced by InClearCommand(), InGetCommand(), InSetCommand(), and Print(). |
|
Definition at line 68 of file gdcmCommandManager.h. Referenced by ExecuteCommand(), ExecuteCommandConst(), GetCommand(), GetInstance(), and SetCommand(). |
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 55 of file gdcmBase.h. Referenced by GDCM_NAME_SPACE::SeqEntry::Print(), GDCM_NAME_SPACE::FileHelper::Print(), GDCM_NAME_SPACE::ElementSet::Print(), GDCM_NAME_SPACE::DocEntry::Print(), GDCM_NAME_SPACE::DictEntry::Print(), GDCM_NAME_SPACE::DicomDirStudy::Print(), GDCM_NAME_SPACE::DicomDirSerie::Print(), GDCM_NAME_SPACE::DicomDirPatient::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDir::Print(), and GDCM_NAME_SPACE::DataEntry::Print(). |