pqServerResource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqServerResource.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 =========================================================================*/
32 
33 #ifndef pqServerResource_h
34 #define pqServerResource_h
35 
36 #include "pqCoreModule.h"
37 
38 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_11_0
39 
40 #include <QString>
42 
102 {
103 public:
105  ~pqServerResource();
106  pqServerResource& operator=(const pqServerResource&);
107 
111  pqServerResource(const QString& uri);
112 
117  pqServerResource(const QString& uri, const pqServerConfiguration& config);
118 
123 
127  const pqServerConfiguration& configuration() const;
128 
132  QString toURI() const;
133 
137  QString serializeString() const;
138 
142  QString scheme() const;
143 
147  void setScheme(const QString&);
148 
152  bool isReverse() const;
153 
157  QString host() const;
158 
162  void setHost(const QString&);
163 
167  int port() const;
168 
172  int port(int default_port) const;
173 
177  void setPort(int);
178 
182  QString dataServerHost() const;
183 
187  void setDataServerHost(const QString&);
188 
192  int dataServerPort() const;
193 
197  int dataServerPort(int default_port) const;
198 
202  void setDataServerPort(int);
203 
207  QString renderServerHost() const;
208 
212  void setRenderServerHost(const QString&);
213 
217  int renderServerPort() const;
218 
222  int renderServerPort(int default_port) const;
223 
227  void setRenderServerPort(int);
228 
232  QString path() const;
233 
237  void setPath(const QString&);
238 
242  QString serverName() const;
243 
247  void setServerName(const QString& name);
248 
252  void addData(const QString& key, const QString& value);
253 
257  QString data(const QString& key) const;
258 
263  QString data(const QString& key, const QString& default_value) const;
264 
268  bool hasData(const QString& key) const;
269 
274  pqServerResource schemeHostsPorts() const;
275 
280  pqServerResource schemeHosts() const;
281 
286  pqServerResource hostPath() const;
287 
292  pqServerResource pathServerName() const;
293 
297  PARAVIEW_DEPRECATED_IN_5_11_0("Use the resource directly instead")
298  pqServerResource sessionServer() const { return *this; };
299 
303  PARAVIEW_DEPRECATED_IN_5_11_0("Use the resource directly instead")
304  void setSessionServer(const pqServerResource&){};
305 
307 
310  bool operator==(const pqServerResource&) const;
311  bool operator!=(const pqServerResource&) const;
312  bool operator<(const pqServerResource&) const;
314 
315 private:
316  class pqImplementation;
317  pqImplementation* const Implementation;
318 };
319 
320 #endif
data
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
name
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
value
VTKCOMMONCORE_EXPORT bool operator!=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
pqServerConfiguration corresponds to a server connection configuration.
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
port
#define const
Definition: zconf.h:238
#define PARAVIEW_DEPRECATED_IN_5_11_0(reason)
pqServerResource encapsulates a resource in ParaView.
key