Loading [MathJax]/extensions/tex2jax.js
Mantid
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
w
x
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
a
b
e
f
i
l
m
o
s
t
u
w
Related Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
_
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
e
f
k
l
o
p
r
s
t
v
w
Macros
a
b
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
Framework
Kernel
src
ProxyInfo.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#include "
MantidKernel/ProxyInfo.h
"
8
#include <stdexcept>
9
10
namespace
Mantid::Kernel
{
11
12
//----------------------------------------------------------------------------------------------
15
ProxyInfo::ProxyInfo
() : m_host(
""
), m_port(0), m_isHttpProxy(false), m_isEmptyProxy(true) {}
16
23
ProxyInfo::ProxyInfo
(
const
std::string &host,
const
int
port,
const
bool
isHttpProxy)
24
: m_host(host), m_port(port), m_isHttpProxy(isHttpProxy), m_isEmptyProxy(false) {
25
if
(
host
.empty() ||
port
== 0) {
26
m_isEmptyProxy
=
true
;
27
}
28
}
29
34
std::string
ProxyInfo::host
()
const
{
35
if
(
m_isEmptyProxy
) {
36
throw
std::logic_error(
"Calling host on an undefined proxy"
);
37
}
38
return
m_host
;
39
}
40
45
int
ProxyInfo::port
()
const
{
46
if
(
m_isEmptyProxy
) {
47
throw
std::logic_error(
"Calling port on an undefined proxy"
);
48
}
49
return
m_port
;
50
}
51
56
bool
ProxyInfo::isHttpProxy
()
const
{
return
m_isHttpProxy
; }
57
62
bool
ProxyInfo::emptyProxy
()
const
{
return
m_isEmptyProxy
; }
63
64
}
// namespace Mantid::Kernel
ProxyInfo.h
Mantid::Kernel::ProxyInfo::ProxyInfo
ProxyInfo()
Constructor.
Definition:
ProxyInfo.cpp:15
Mantid::Kernel::ProxyInfo::emptyProxy
bool emptyProxy() const
Definition:
ProxyInfo.cpp:62
Mantid::Kernel::ProxyInfo::port
int port() const
Port Number.
Definition:
ProxyInfo.cpp:45
Mantid::Kernel::ProxyInfo::m_isHttpProxy
bool m_isHttpProxy
Definition:
ProxyInfo.h:21
Mantid::Kernel::ProxyInfo::m_isEmptyProxy
bool m_isEmptyProxy
Definition:
ProxyInfo.h:22
Mantid::Kernel::ProxyInfo::host
std::string host() const
Host url.
Definition:
ProxyInfo.cpp:34
Mantid::Kernel::ProxyInfo::m_host
std::string m_host
Definition:
ProxyInfo.h:19
Mantid::Kernel::ProxyInfo::m_port
int m_port
Definition:
ProxyInfo.h:20
Mantid::Kernel::ProxyInfo::isHttpProxy
bool isHttpProxy() const
Is this a http proxy.
Definition:
ProxyInfo.cpp:56
Mantid::Kernel
Definition:
AnnularRingAbsorption.h:15
Generated on Tue Jan 3 2023 11:57:51 for Mantid by
1.9.5