Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

util::Backupable< D, Extra > Class Template Reference

#include <Shareable.h>

Inheritance diagram for util::Backupable< D, Extra >:

util::Shareable< D, Extra >

List of all members.

Detailed Description

template<class D, class Extra = internal::Dummy>
class util::Backupable< D, Extra >

Template class that adds support for data backup to the Shareable template.

All thread safety remarks mentioned in the descrition of the Shareable template are appliable to this class as well. In particular, all new methods of this template are not implicitly thread-safe, so if you add thread safety using the util::Lockable class, don't forget to lock the Backupable instance before doing backup(), commit() or rollback().

The managed data structure (passed as the first argument to the template) besides requirements mentioned in Shareable, must also provide a comparison operation (|bool operator== (const D &that) const|).

D data structure to manage
Extra extra class the template instantiation will be publicly derived from (by default, a dummy empty class)

Definition at line 303 of file Shareable.h.

Public Member Functions

void backup ()
 Backupable ()
const D * backupData () const
void commit ()
void create ()
void createCopy (const Shareable &that)
const D * data () const
D * data ()
bool hasActualChanges () const
bool isBackedUp () const
bool isNull () const
 operator bool () const
const D * operator-> () const
D * operator-> ()
void rollback ()
virtual void setNull ()

Protected Types

typedef Shareable::Data Data

Package Functions

void setData (Data *aData)

Package Attributes

 __pad0__:Shareable_base::Data BD

Private Attributes

Data * mBackupData

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

Generated by  Doxygen 1.6.0   Back to index