QRemoteObjectPersistedStore Class | Qt Remote Objects 5.9

Qt 5.9 | Qt Remote Objects | C++ Classes | QRemoteObjectPersistedStore

Qt 5.9.3 Reference Documentation

# QRemoteObjectPersistedStore Class

The QRemoteObjectPersistedStore virtual class provides the methods for setting PROP values of a replica to value they had the last time the replica was used. More...

Header: | #include <QRemoteObjectPersistedStore>
qmake: | QT += remoteobjects

- List of all members, including inherited members

## Public Functions

virtual | ~QRemoteObjectPersistedStore()
virtual QVariantList | restoreProperties(const QString &repName, const QByteArray &repSig) = 0
virtual void | saveProperties(const QString &repName, const QByteArray &repSig, const QVariantList &values) = 0

## Detailed Description

The QRemoteObjectPersistedStore virtual class provides the methods for setting PROP values of a replica to value they had the last time the replica was used.

This can be used to provide a "reasonable" value to be displayed until the connection to the source is established and current values are available.

This class must be overridden to provide an implementation for saving (QRemoteObjectPersistedStore::saveProperties) and restoring (QRemoteObjectPersistedStore::restoreProperties) PROP values. The derived type can then be set for a node, and any replica acquired from that node will then automatically store PERSISTED properties when the replica destructor is called, and retrieve the values when the replica is instantiated.

## Member Function Documentation

### `[virtual]` QRemoteObjectPersistedStore::~QRemoteObjectPersistedStore()

Destroys the instance of QRemoteObjectPersistedStore. The destructor is virtual.

### `[pure virtual]` QVariantList QRemoteObjectPersistedStore::restoreProperties(const QString &repName, const QByteArray &repSig)

This method will be provided the replica class's repName and repSig when the replica is being initialized. It is the responsibility of the inheriting class to get the last values persisted by QRemoteObjectPersistedStore::saveProperties and return them. An empty QVariantList should be returned if no values are available.

See also QRemoteObjectPersistedStore::saveProperties.

### `[pure virtual]` void QRemoteObjectPersistedStore::saveProperties(const QString &repName, const QByteArray &repSig, const QVariantList &values)

This method will be provided the replica class's repName, repSig and the list of values that PERSISTED properties have when the replica destructor was called. It is the responsibility of the inheriting class to store the information in a manner consistent for QRemoteObjectPersistedStore::restoreProperties to retrieve.

See also QRemoteObjectPersistedStore::restoreProperties.