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 <QString>
40 
103 {
104 public:
106  pqServerResource(const QString&);
107  pqServerResource(const QString&, const pqServerConfiguration&);
109  pqServerResource& operator=(const pqServerResource&);
110  ~pqServerResource();
111 
116  const pqServerConfiguration& configuration() const;
117 
123  const QString toURI() const;
124 
129  const QString serializeString() const;
130 
133  const QString scheme() const;
134 
138  void setScheme(const QString&);
139 
143  bool isReverse() const;
144 
147  const QString host() const;
151  void setHost(const QString&);
152 
153  int port() const;
154  int port(int default_port) const;
155  void setPort(int);
156 
157  const QString dataServerHost() const;
158  void setDataServerHost(const QString&);
159 
160  int dataServerPort() const;
161  int dataServerPort(int default_port) const;
162  void setDataServerPort(int);
163 
164  const QString renderServerHost() const;
165  void setRenderServerHost(const QString&);
166 
167  int renderServerPort() const;
168  int renderServerPort(int default_port) const;
169  void setRenderServerPort(int);
170 
171  const QString path() const;
172  void setPath(const QString&);
173 
174  const pqServerResource sessionServer() const;
175  void setSessionServer(const pqServerResource&);
176 
177  // add extra data to this resource
178  void addData(const QString& key, const QString& value);
179  // get extra data from this resource
180  const QString data(const QString& key) const;
181  const QString data(const QString& key, const QString& default_value) const;
182  bool hasData(const QString& key) const;
183 
186  const pqServerResource schemeHostsPorts() const;
189  const pqServerResource schemeHosts() const;
192  const pqServerResource hostPath() const;
193 
194  bool operator==(const pqServerResource&) const;
195  bool operator!=(const pqServerResource&) const;
196  bool operator<(const pqServerResource&) const;
197 
198 private:
199  class pqImplementation;
200  pqImplementation* const Implementation;
201 };
202 
203 #endif
data
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
#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
pqServerResource encapsulates a resource in ParaView.
key