Mercurial > hg > orthanc
diff OrthancServer/DicomProtocol/RemoteModalityParameters.h @ 806:557575fd93e9
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 07 May 2014 15:22:28 +0200 |
parents | 31cc399c7762 |
children | 566a2fb3c1fb |
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/RemoteModalityParameters.h Wed May 07 13:23:08 2014 +0200 +++ b/OrthancServer/DicomProtocol/RemoteModalityParameters.h Wed May 07 15:22:28 2014 +0200 @@ -43,50 +43,23 @@ // TODO Use the flyweight pattern for this class private: - std::string symbolicName_; - std::string aet_; - std::string host_; - int port_; - ModalityManufacturer manufacturer_; + std::string name_; + std::string aet_; + std::string host_; + int port_; + ModalityManufacturer manufacturer_; public: - RemoteModalityParameters() : - symbolicName_(""), - aet_(""), - host_(""), - port_(104), - manufacturer_(ModalityManufacturer_Generic) + RemoteModalityParameters(); + + const std::string& GetName() const { + return name_; } - RemoteModalityParameters(const std::string& symbolic, - const std::string& aet, - const std::string& host, - int port, - ModalityManufacturer manufacturer) : - symbolicName_(symbolic), - aet_(aet), - host_(host), - port_(port), - manufacturer_(manufacturer) + void SetName(const std::string& name) { - } - - RemoteModalityParameters(const std::string& aet, - const std::string& host, - int port, - ModalityManufacturer manufacturer) : - symbolicName_(""), - aet_(aet), - host_(host), - port_(port), - manufacturer_(manufacturer) - { - } - - const std::string& GetSymbolicName() const - { - return symbolicName_; + name_ = name; } const std::string& GetApplicationEntityTitle() const @@ -94,19 +67,41 @@ return aet_; } + void SetApplicationEntityTitle(const std::string& aet) + { + aet_ = aet; + } + const std::string& GetHost() const { return host_; } + void SetHost(const std::string& host) + { + host_ = host; + } + int GetPort() const { return port_; } + void SetPort(int port); + ModalityManufacturer GetManufacturer() const { return manufacturer_; } + + void SetManufacturer(ModalityManufacturer manufacturer) + { + manufacturer_ = manufacturer; + } + + void SetManufacturer(const std::string& manufacturer) + { + manufacturer_ = StringToModalityManufacturer(manufacturer); + } }; }