#include <gdcmCommandManager.h>
Inheritance diagram for gdcm::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 40 of file gdcmCommandManager.cxx. References GetInstance(), and InClearCommand(). 00041 { 00042 if( this == GetInstance() ) 00043 InClearCommand(); 00044 }
|
|
Constructor used when we want to generate dicom files from scratch.
Definition at line 32 of file gdcmCommandManager.cxx.
|
|
Definition at line 58 of file gdcmCommandManager.cxx. References InExecuteCommand(), and Instance. Referenced by gdcm::PixelReadConvert::CallEndMethod(), gdcm::FileHelper::CallEndMethod(), gdcm::Document::CallEndMethod(), gdcm::PixelReadConvert::CallProgressMethod(), gdcm::FileHelper::CallProgressMethod(), gdcm::Document::CallProgressMethod(), gdcm::PixelReadConvert::CallStartMethod(), gdcm::FileHelper::CallStartMethod(), and gdcm::Document::CallStartMethod(). 00059 { 00060 return(Instance.InExecuteCommand(object,type,text)); 00061 }
|
|
Definition at line 63 of file gdcmCommandManager.cxx. References InExecuteCommandConst(), and Instance. Referenced by gdcm::Debug::SendToOutput(). 00064 { 00065 return(Instance.InExecuteCommandConst(object,type,text)); 00066 }
|
|
|
|
Definition at line 53 of file gdcmCommandManager.cxx. References InGetCommand(), and Instance. Referenced by InExecuteCommand(), and InExecuteCommandConst(). 00054 { 00055 return(Instance.InGetCommand(object,type)); 00056 }
|
|
Definition at line 68 of file gdcmCommandManager.cxx. References Instance. Referenced by ~CommandManager(). 00069 { 00070 return &Instance; 00071 }
|
|
Gets the print level for the Dicom Entries.
Definition at line 50 of file gdcmBase.h. 00050 { return PrintLevel; }
|
|
Definition at line 75 of file gdcmCommandManager.cxx. References CommandList. Referenced by ~CommandManager(). 00076 { 00077 CommandHT::iterator it; 00078 for(it=CommandList.begin();it!=CommandList.end();++it) 00079 { 00080 if( it->second ) 00081 it->second->Delete(); 00082 } 00083 }
|
|
Definition at line 116 of file gdcmCommandManager.cxx. References gdcm::Command::Execute(), GetCommand(), gdcm::Command::SetObject(), gdcm::Command::SetText(), and gdcm::Command::SetType(). Referenced by ExecuteCommand(). 00117 { 00118 Command *cmd = GetCommand(object,type); 00119 if( cmd ) 00120 { 00121 cmd->SetText(text); 00122 cmd->SetObject(object); 00123 cmd->SetType(type); 00124 cmd->Execute(); 00125 return true; 00126 } 00127 return false; 00128 }
|
|
Definition at line 130 of file gdcmCommandManager.cxx. References gdcm::Command::Execute(), GetCommand(), gdcm::Command::SetConstObject(), gdcm::Command::SetText(), and gdcm::Command::SetType(). Referenced by ExecuteCommandConst(). 00131 { 00132 Command *cmd = GetCommand(object,type); 00133 if( cmd ) 00134 { 00135 cmd->SetText(text); 00136 cmd->SetConstObject(object); 00137 cmd->SetType(type); 00138 cmd->Execute(); 00139 return true; 00140 } 00141 return false; 00142 }
|
|
Definition at line 103 of file gdcmCommandManager.cxx. References CommandList. Referenced by GetCommand(). 00104 { 00105 CommandKey key = CommandKey(object,type); 00106 try 00107 { 00108 return CommandList[key]; 00109 } 00110 catch(...) 00111 { 00112 return NULL; 00113 } 00114 }
|
|
Definition at line 85 of file gdcmCommandManager.cxx. References CommandList, gdcm::RefCounter::Register(), and gdcm::RefCounter::Unregister(). Referenced by SetCommand(). 00086 { 00087 CommandKey key = CommandKey(object,type); 00088 Command *cmd = CommandList[key]; 00089 if( cmd != command ) 00090 { 00091 if( cmd ) 00092 cmd->Unregister(); 00093 if( command ) 00094 { 00095 CommandList[key]=command; 00096 command->Register(); 00097 } 00098 else 00099 CommandList.erase(key); 00100 } 00101 }
|
|
Printer.
Reimplemented from gdcm::Base. Definition at line 149 of file gdcmCommandManager.cxx. References CommandList, and gdcm::Command::GetCommandAsString(). 00150 { 00151 os<<indent<<"Command list : \n"; 00152 CommandHT::iterator it; 00153 for(it=CommandList.begin();it!=CommandList.end();++it) 00154 { 00155 os<<indent<<" "<<typeid(it->first.first).name()<<" ("<<it->first.first<<") - " 00156 <<Command::GetCommandAsString(it->first.second) 00157 <<" : "<<typeid(it->second).name()<<" ("<<it->second<<")" 00158 <<std::endl; 00159 } 00160 }
|
|
Definition at line 48 of file gdcmCommandManager.cxx. References InSetCommand(), and Instance. 00049 { 00050 Instance.InSetCommand(object,type,command); 00051 }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::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::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), gdcm::DocEntry::Print(), gdcm::DictEntry::Print(), gdcm::DicomDirStudy::Print(), gdcm::DicomDirSerie::Print(), gdcm::DicomDirPatient::Print(), gdcm::DicomDirMeta::Print(), gdcm::DicomDir::Print(), and gdcm::DataEntry::Print(). |