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

Object that encapsulates revision information for some data.

It provides a copyable wrapper for a Revision pointer and owns the Revision.

It functions much like a shared pointer on an immutable and private Revision object since it will not change the Revision and will delete 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 (

Constructor.

Note that the Revision will be destroyed when all DataRevision objects that point to it go out of scope.

Parameters
rev

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

Since:

BlackBerry 10.2.0

DataRevision ()

Constructor.

Since:

BlackBerry 10.2.0

DataRevision (

Copy constructor.

Note that the internal Revision will be shared after this copy and will be 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 otherwise false.

Since:

BlackBerry 10.2.0

bool operator!= (

Compare whether this revision is not equal to the other.

Parameters
other

The DataRevision object to compare with.

Return:

true if not equal and false otherwise.

Since:

BlackBerry 10.2.0

bool operator< (

Compare whether this revision is less than (older than) the other.

Parameters
other

The DataRevision object to compare with.

Return:

true if this revision is older and false otherwise.

Since:

BlackBerry 10.2.0

bool operator<= (

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

Parameters
other

The DataRevision object to compare with.

Return:

true if this revision is older or same age and false otherwise.

Since:

BlackBerry 10.2.0

DataRevision & operator= (

Assignment operator.

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 the other.

Parameters
other

The DataRevision object to compare with.

Return:

true if equal and false otherwise.

Since:

BlackBerry 10.2.0

bool operator> (

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

Parameters
other

The DataRevision object to compare with.

Return:

true if this revision is newer and 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 and false otherwise.

Since:

BlackBerry 10.2.0

virtualQString toString ()

String representation of this revision.

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-03-13

comments powered by Disqus