Public Member Functions | List of all members
pqServerResource Class Reference

pqServerResource encapsulates a resource in ParaView. More...

#include <pqServerResource.h>

Public Member Functions

 pqServerResource ()
 
 ~pqServerResource ()
 
pqServerResourceoperator= (const pqServerResource &)
 
 pqServerResource (const QString &uri)
 Create an pqServerResource from a provided URI. More...
 
 pqServerResource (const QString &uri, const pqServerConfiguration &config)
 Create an pqServerResource from a provided URI and store related configuration If the configuration is named, the configuration name will be used as a serverName. More...
 
 pqServerResource (const pqServerResource &)
 Create a pqServerResource by copy. More...
 
const pqServerConfigurationconfiguration () const
 Returns the pqServerConfiguration from which this resource was created, if any. More...
 
QString toURI () const
 Returns a compact string representation of the complete resource in URI format, see above. More...
 
QString serializeString () const
 Returns a compact string representation of the resource including extra data. More...
 
QString scheme () const
 Returns the resource scheme, builtin, cs, csrc, cdsrs or cdsrsrc. More...
 
void setScheme (const QString &)
 Sets the resource scheme. More...
 
bool isReverse () const
 Returns if the connection scheme is a reverse one. More...
 
QString host () const
 Returns the resource host, or empty string for builtin, cdsrs, and cdsrsrc schemes. More...
 
void setHost (const QString &)
 Sets the resource host. More...
 
int port () const
 Return the resource port, or -1 for builtin, cdsrs, and cdsrsrc schemes. More...
 
int port (int default_port) const
 Return the resource port, or default_port for builtin, cdsrs, and cdsrsrc schemes. More...
 
void setPort (int)
 Set the resource port. More...
 
QString dataServerHost () const
 Return the data server host, if any. More...
 
void setDataServerHost (const QString &)
 Set the data server host. More...
 
int dataServerPort () const
 Return the data server port, if any, or -1. More...
 
int dataServerPort (int default_port) const
 Return the data server port, if any, or default_port. More...
 
void setDataServerPort (int)
 Set the data server port. More...
 
QString renderServerHost () const
 Return the render server host, if any. More...
 
void setRenderServerHost (const QString &)
 Set the render server host. More...
 
int renderServerPort () const
 Return the render server port, if any, or -1. More...
 
int renderServerPort (int default_port) const
 Return the render server port, if any, or default_port. More...
 
void setRenderServerPort (int)
 Set the render server port. More...
 
QString path () const
 Return the path to the resource, if any. More...
 
void setPath (const QString &)
 Set the path to the resource. More...
 
QString serverName () const
 Return the server name of the resource, if any. More...
 
void setServerName (const QString &name)
 Set the server name of the resource. More...
 
void addData (const QString &key, const QString &value)
 Add a data on this resource, with a key/value logic. More...
 
QString data (const QString &key) const
 Get data from this resource, associated with the provided key, if any. More...
 
QString data (const QString &key, const QString &default_value) const
 Get data from this resource, associated with the provided key, if any. More...
 
bool hasData (const QString &key) const
 Return true if this resource has data associated with the provided key, false otherwise. More...
 
pqServerResource schemeHostsPorts () const
 Returns a copy of this resource containing only server connection information - scheme, host, and port numbers. More...
 
pqServerResource schemeHosts () const
 Returns a copy of this resource containing a subset of server information - scheme and host (no port numbers) More...
 
pqServerResource hostPath () const
 Returns a copy of this resource containing only host and path information - scheme and port numbers are excluded. More...
 
pqServerResource pathServerName () const
 Returns a copy of this resource containing only path and server name information - scheme, host and port numbers are excluded. More...
 
bool operator== (const pqServerResource &) const
 Operators comparing all elements of the resource. More...
 
bool operator!= (const pqServerResource &) const
 Operators comparing all elements of the resource. More...
 
bool operator< (const pqServerResource &) const
 Operators comparing all elements of the resource. More...
 

Detailed Description

pqServerResource encapsulates a resource in ParaView.

A resource can be anything, a data file, a list of data files, a state file, or a connection to a server. The resource specification is based on URL-like syntax:

* <scheme>://<scheme-specific-parameters>
* 

To specify a data or state file, the following syntax is used:

* <connection-scheme>:[//<server-details>]/<path-to-data-file>[#serverName]:KEY:1
* 

connection-scheme can be

server-details are of the form <serverhost-name>:<port> or <dataserver-hostname>:<dataserver-port>/<renderserver-hostname>:<render-server-port> as applicable. Port numbers are always optional.

The KEY should be PARAVIEW_DATA for data file and PARAVIEW_STATE for state file.

Examples:

* builtin:/home/user/foo.vtk
* cs://amber1:11112/C:\Users\User\foo.vtk
* cdsrsrc://amber2:11111/amber3:22222/home/user/foo.vtk#amberDRS
* 

To specify a server-connection, without pointing to any data file(s), the following syntax may be used:

* <connection-scheme>:[//<server-details>]
* 

Examples:

* builtin:
* cs://amber1:11112
* cdsrsrc://amber2:11111/amber3:22222
* 

As with data-files, port numbers are always optional in when specifying server-details.

Server name is also optional but will be used if available.

Arbitrary data can be added to a resource. ParaView leverages this mechanism to identify statefiles, to save additional files in a file series when referring to a data file, or details about how to connect to the server when referring to a server-connection.

See also
pqServerResources, pqServer

Definition at line 71 of file pqServerResource.h.

Constructor & Destructor Documentation

◆ pqServerResource() [1/4]

pqServerResource::pqServerResource ( )

◆ ~pqServerResource()

pqServerResource::~pqServerResource ( )

◆ pqServerResource() [2/4]

pqServerResource::pqServerResource ( const QString &  uri)

Create an pqServerResource from a provided URI.

◆ pqServerResource() [3/4]

pqServerResource::pqServerResource ( const QString &  uri,
const pqServerConfiguration config 
)

Create an pqServerResource from a provided URI and store related configuration If the configuration is named, the configuration name will be used as a serverName.

◆ pqServerResource() [4/4]

pqServerResource::pqServerResource ( const pqServerResource )

Create a pqServerResource by copy.

Member Function Documentation

◆ operator=()

pqServerResource& pqServerResource::operator= ( const pqServerResource )

◆ configuration()

const pqServerConfiguration& pqServerResource::configuration ( ) const

Returns the pqServerConfiguration from which this resource was created, if any.

◆ toURI()

QString pqServerResource::toURI ( ) const

Returns a compact string representation of the complete resource in URI format, see above.

◆ serializeString()

QString pqServerResource::serializeString ( ) const

Returns a compact string representation of the resource including extra data.

◆ scheme()

QString pqServerResource::scheme ( ) const

Returns the resource scheme, builtin, cs, csrc, cdsrs or cdsrsrc.

◆ setScheme()

void pqServerResource::setScheme ( const QString &  )

Sets the resource scheme.

◆ isReverse()

bool pqServerResource::isReverse ( ) const

Returns if the connection scheme is a reverse one.

◆ host()

QString pqServerResource::host ( ) const

Returns the resource host, or empty string for builtin, cdsrs, and cdsrsrc schemes.

◆ setHost()

void pqServerResource::setHost ( const QString &  )

Sets the resource host.

◆ port() [1/2]

int pqServerResource::port ( ) const

Return the resource port, or -1 for builtin, cdsrs, and cdsrsrc schemes.

◆ port() [2/2]

int pqServerResource::port ( int  default_port) const

Return the resource port, or default_port for builtin, cdsrs, and cdsrsrc schemes.

◆ setPort()

void pqServerResource::setPort ( int  )

Set the resource port.

◆ dataServerHost()

QString pqServerResource::dataServerHost ( ) const

Return the data server host, if any.

◆ setDataServerHost()

void pqServerResource::setDataServerHost ( const QString &  )

Set the data server host.

◆ dataServerPort() [1/2]

int pqServerResource::dataServerPort ( ) const

Return the data server port, if any, or -1.

◆ dataServerPort() [2/2]

int pqServerResource::dataServerPort ( int  default_port) const

Return the data server port, if any, or default_port.

◆ setDataServerPort()

void pqServerResource::setDataServerPort ( int  )

Set the data server port.

◆ renderServerHost()

QString pqServerResource::renderServerHost ( ) const

Return the render server host, if any.

◆ setRenderServerHost()

void pqServerResource::setRenderServerHost ( const QString &  )

Set the render server host.

◆ renderServerPort() [1/2]

int pqServerResource::renderServerPort ( ) const

Return the render server port, if any, or -1.

◆ renderServerPort() [2/2]

int pqServerResource::renderServerPort ( int  default_port) const

Return the render server port, if any, or default_port.

◆ setRenderServerPort()

void pqServerResource::setRenderServerPort ( int  )

Set the render server port.

◆ path()

QString pqServerResource::path ( ) const

Return the path to the resource, if any.

◆ setPath()

void pqServerResource::setPath ( const QString &  )

Set the path to the resource.

◆ serverName()

QString pqServerResource::serverName ( ) const

Return the server name of the resource, if any.

◆ setServerName()

void pqServerResource::setServerName ( const QString &  name)

Set the server name of the resource.

◆ addData()

void pqServerResource::addData ( const QString &  key,
const QString &  value 
)

Add a data on this resource, with a key/value logic.

◆ data() [1/2]

QString pqServerResource::data ( const QString &  key) const

Get data from this resource, associated with the provided key, if any.

◆ data() [2/2]

QString pqServerResource::data ( const QString &  key,
const QString &  default_value 
) const

Get data from this resource, associated with the provided key, if any.

If not, return default_value.

◆ hasData()

bool pqServerResource::hasData ( const QString &  key) const

Return true if this resource has data associated with the provided key, false otherwise.

◆ schemeHostsPorts()

pqServerResource pqServerResource::schemeHostsPorts ( ) const

Returns a copy of this resource containing only server connection information - scheme, host, and port numbers.

◆ schemeHosts()

pqServerResource pqServerResource::schemeHosts ( ) const

Returns a copy of this resource containing a subset of server information - scheme and host (no port numbers)

◆ hostPath()

pqServerResource pqServerResource::hostPath ( ) const

Returns a copy of this resource containing only host and path information - scheme and port numbers are excluded.

◆ pathServerName()

pqServerResource pqServerResource::pathServerName ( ) const

Returns a copy of this resource containing only path and server name information - scheme, host and port numbers are excluded.

◆ operator==()

bool pqServerResource::operator== ( const pqServerResource ) const

Operators comparing all elements of the resource.

◆ operator!=()

bool pqServerResource::operator!= ( const pqServerResource ) const

Operators comparing all elements of the resource.

◆ operator<()

bool pqServerResource::operator< ( const pqServerResource ) const

Operators comparing all elements of the resource.


The documentation for this class was generated from the following file: