VPTissue Reference Manual
ServerInfo.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "ServerInfo.h"
21 
22 namespace SimPT_Parex {
23 
24 ServerInfo::ServerInfo(QString name, QString address, int port):
25  m_name(name), m_address(address), m_port(port)
26 {
27 }
28 
29 ServerInfo::ServerInfo(std::string name, std::string address, int port):
30  m_name(QString(name.c_str())), m_address(QString(address.c_str())), m_port(port)
31 {
32 }
33 
35 {
36 }
37 
38 void ServerInfo::Update(QString address, int port)
39 {
40  m_address = address;
41  m_port = port;
42 }
43 
45 {
46  return m_name;
47 }
48 
50 {
51  return m_address;
52 }
53 
55 {
56  return m_port;
57 }
58 
59 } // namespace
60 
ServerInfo(QString name, QString address, int port)
Constructor.
Definition: ServerInfo.cpp:24
Interface for ServerInfo.
QString GetName()
Return the name of the server.
Definition: ServerInfo.cpp:44
int GetPort()
Return the port of the server.
Definition: ServerInfo.cpp:54
void Update(QString address, int port)
Update values for server.
Definition: ServerInfo.cpp:38
virtual ~ServerInfo()
Destructor.
Definition: ServerInfo.cpp:34
QString GetAddress()
Return the address of the server.
Definition: ServerInfo.cpp:49
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52