DataRevision

Since: BlackBerry 10.2.0

#include <bb/cascades/datamanager/DataRevision>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesdatamanager

This class encapsulates revision information for some data.

This class provides a copyable wrapper for a Revision pointer and owns the Revision.

This class functions much like a shared pointer on an immutable and private Revision object since it doesn't change the Revision and deletes it when this DataRevision goes out of scope, provided that no other DataRevision objects are referencing the Revision.


Overview

Public Functions Index

DataRevision (Revision *rev)
DataRevision ()
DataRevision (const DataRevision &other)
virtual ~DataRevision ()
voidclear ()
boolisNull () const
booloperator!= (const DataRevision &other) const
booloperator< (const DataRevision &other) const
booloperator<= (const DataRevision &other) const
DataRevision &operator= (const DataRevision &other)
booloperator== (const DataRevision &other) const
booloperator> (const DataRevision &other) const
booloperator>= (const DataRevision &other) const
virtual QStringtoString () const
voidupdate (const DataRevision &other)

Public Functions

DataRevision (

Constructs a DataRevision given a Revision.

Note:

The Revision is destroyed when all DataRevision objects that point to it go out of scope.

Parameters
rev

A pointer to a Revision to be managed. This pointer must not be null.

Since:

BlackBerry 10.2.0

DataRevision ()

Constructs a DataRevision.

Since:

BlackBerry 10.2.0

DataRevision (

Copy constructor.

This function constructs a DataRevision containing exactly the same values as the provided DataRevision.

Note:

The internal Revision is shared after this copy and destroyed when all DataRevision objects that point to it go out of scope.

Parameters
other

The DataRevision object to copy.

Since:

BlackBerry 10.2.0

virtual~DataRevision ()

Destructor.

Since:

BlackBerry 10.2.0

void clear ()

Reset the revision to the "null" state.

Since:

BlackBerry 10.2.0

bool isNull ()

Check whether this revision object contains any revision information.

Objects created with the default constructor will initially return true for this method.

Return:

True if the data revision contains no revision information, false otherwise.

Since:

BlackBerry 10.2.0

bool operator!= (

Compare whether this revision is not equal to another.

Parameters
other

The DataRevision object to compare with.

Return:

True if not equal, false otherwise.

Since:

BlackBerry 10.2.0

bool operator< (

Compare whether this revision is less than (older than) another.

Parameters
other

The DataRevision object to compare with.

Return:

Tue if this revision is older, false otherwise.

Since:

BlackBerry 10.2.0

bool operator<= (

Compare whether this revision is less than or equal to (older than or equal to) another.

Parameters
other

The DataRevision object to compare with.

Return:

True if this revision is older or same age, false otherwise.

Since:

BlackBerry 10.2.0

DataRevision & operator= (

Assignment operator.

This function assigns values from the given DataRevision to the returned DataRevision.

Parameters
other

The DataRevision object to assign from.

Return:

The revised DataRevision instance.

Since:

BlackBerry 10.2.0

bool operator== (

Compare whether this revision equals another.

Parameters
other

The DataRevision object to compare with.

Return:

True if equal, false otherwise.

Since:

BlackBerry 10.2.0

bool operator> (

Compare whether this revision is greater than (newer than) another.

Parameters
other

The DataRevision object to compare with.

Return:

True if this revision is newer, false otherwise.

Since:

BlackBerry 10.2.0

bool operator>= (

Compare whether this revision is greater than or equal to (newer than or equal to) the other.

Parameters
other

The DataRevision object to compare with.

Return:

True if this revision is newer or same age, false otherwise.

Since:

BlackBerry 10.2.0

virtualQString toString ()

Convert this revision to a string representation.

Return:

The string representation.

Since:

BlackBerry 10.2.0

void update (

Update this data revision with another one.

After the update, this revision must be greater than or equal to both its previous state and other.

Parameters
other

The revision to update this one with.

Since:

BlackBerry 10.2.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus