Home · All Classes · Main Classes · Deprecated
Public Member Functions | Protected Attributes

MFileDataStore Class Reference

Inherits MDataStore.

List of all members.

Public Member Functions

 MFileDataStore (const QString &filePath)
virtual ~MFileDataStore ()
bool isReadable () const
bool isWritable () const
bool createValues (const QHash< QString, QVariant > &values)

Protected Attributes

MFileDataStorePrivate *const d_ptr

Detailed Description

Concrete implementation of MDataStore interface. This class stores the data to the filesystem. The file name is given as a constructor parameter.


Constructor & Destructor Documentation

MFileDataStore::MFileDataStore ( const QString filePath  )  [explicit]

Constructor.

Parameters:
filePath Absolute path to the file that the settings will be written to and read from.
MFileDataStore::~MFileDataStore (  )  [virtual]

Destructor


Member Function Documentation

bool MFileDataStore::createValues ( const QHash< QString, QVariant > &  values  ) 

Creates values to data store from given hash of key value pairs. With this method QSetting sync (file write) is done only once, which provides better performance then createValue() when storing multiple values.

Parameters:
newValues the hash of key-value pairs that are updated to data store.
Returns:
true if the data store can be written
bool MFileDataStore::isReadable (  )  const

Queries if this data store is readable. If this method returns true you can use the reading methods of this class (value, allKeys, contains). If this method returns false, the reading methods don't provide the real data.

See also:
value, allKeys, contains
Returns:
true if the data store can be read.
bool MFileDataStore::isWritable (  )  const

Queries if this data store is writable. If this method returns true you can use the writing methods of this class (setValue, remove, clear). If this method returns false, the writing methods don't modify the data store.

See also:
setValue, remove, clear
Returns:
true if the data store can be written.

Member Data Documentation

MFileDataStorePrivate* const MFileDataStore::d_ptr [protected]

Copyright © 2010 Nokia Corporation
MeeGo Touch