7 #include "PlusConfigure.h" 12 #include "vtkIGSIOTransformRepository.h" 19 static const std::string SAVE_CONFIG_CMD =
"SaveConfig";
36 this->SetName(SAVE_CONFIG_CMD);
43 cmdNames.push_back(SAVE_CONFIG_CMD);
50 if (commandName.empty() || igsioCommon::IsEqualInsensitive(commandName, SAVE_CONFIG_CMD))
52 desc += SAVE_CONFIG_CMD;
53 desc +=
": Tell the data collector to save the config file.";
62 os << indent <<
"Filename: " << this->Filename;
72 this->SetFilename(aConfig->GetAttribute(
"Filename"));
84 XML_WRITE_STRING_ATTRIBUTE_IF_NOT_EMPTY(Filename, aConfig);
91 LOG_INFO(
"vtkPlusSaveConfigCommand::Execute");
93 if (GetFilename().empty())
98 std::string baseMessageString = std::string(
"SaveConfig (") + (!this->Filename.empty() ? this->Filename :
"undefined") +
")";
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
virtual std::string GetDescription(const std::string &commandName)
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
virtual vtkIGSIOTransformRepository * GetTransformRepository()
virtual vtkPlusOpenIGTLinkServer * GetPlusServer()
static vtkPlusConfig * GetInstance()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
virtual void GetCommandNames(std::list< std::string > &cmdNames)
virtual PlusStatus Execute()
vtkPlusCommandProcessor * CommandProcessor
void QueueCommandResponse(PlusStatus status, const std::string &message, const std::string &error="", const igtl::MessageBase::MetaDataMap *metaData=nullptr)
virtual vtkPlusDataCollector * GetDataCollector()
vtkPlusSaveConfigCommand()
virtual ~vtkPlusSaveConfigCommand()
void SetNameToSaveConfig()
This command forces the data collector to save the config file.
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
vtkStandardNewMacro(vtkPlusSaveConfigCommand)