LibreOffice Module desktop (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dp_misc::PersistentMap Class Referencefinal

#include <dp_persmap.h>

Public Member Functions

 ~PersistentMap ()
 
 PersistentMap (OUString const &url)
 
 PersistentMap ()
 in mem db More...
 
bool has (OString const &key) const
 
bool get (OString *value, OString const &key) const
 
const t_string2string_mapgetEntries () const
 
void put (OString const &key, OString const &value)
 
bool erase (OString const &key)
 

Private Member Functions

void open ()
 
void readAll ()
 
void add (OString const &key, OString const &value)
 
void flush ()
 

Private Attributes

::osl::File m_MapFile
 
t_string2string_map m_entries
 
bool m_bIsOpen
 
bool m_bToBeCreated
 
bool m_bIsDirty
 

Detailed Description

Definition at line 35 of file dp_persmap.h.

Constructor & Destructor Documentation

dp_misc::PersistentMap::~PersistentMap ( )

Definition at line 56 of file dp_persmap.cxx.

References flush(), m_bIsDirty, m_bIsOpen, and m_MapFile.

dp_misc::PersistentMap::PersistentMap ( OUString const &  url)

Definition at line 40 of file dp_persmap.cxx.

References open().

dp_misc::PersistentMap::PersistentMap ( )

in mem db

Definition at line 49 of file dp_persmap.cxx.

Member Function Documentation

void dp_misc::PersistentMap::add ( OString const &  key,
OString const &  value 
)
private

Definition at line 279 of file dp_persmap.cxx.

References m_bIsDirty, and m_entries.

Referenced by put(), and readAll().

bool dp_misc::PersistentMap::erase ( OString const &  key)

Definition at line 295 of file dp_persmap.cxx.

References flush(), m_bIsDirty, and m_entries.

void dp_misc::PersistentMap::flush ( )
private
bool dp_misc::PersistentMap::get ( OString *  value,
OString const &  key 
) const

Definition at line 269 of file dp_persmap.cxx.

References m_entries.

const t_string2string_map& dp_misc::PersistentMap::getEntries ( ) const
inline

Definition at line 51 of file dp_persmap.h.

References m_entries.

bool dp_misc::PersistentMap::has ( OString const &  key) const

Definition at line 264 of file dp_persmap.cxx.

void dp_misc::PersistentMap::open ( )
private

Definition at line 141 of file dp_persmap.cxx.

References m_bIsOpen, m_bToBeCreated, m_MapFile, and readAll().

Referenced by PersistentMap().

void dp_misc::PersistentMap::put ( OString const &  key,
OString const &  value 
)

Definition at line 286 of file dp_persmap.cxx.

References add(), flush(), and m_bIsDirty.

void dp_misc::PersistentMap::readAll ( )
private

Definition at line 159 of file dp_persmap.cxx.

References add(), dp_misc::decodeString(), i, m_bIsDirty, m_entries, m_MapFile, dp_misc::PmapMagic, and SAL_WARN.

Referenced by open().

Member Data Documentation

bool dp_misc::PersistentMap::m_bIsDirty
private

Definition at line 41 of file dp_persmap.h.

Referenced by add(), erase(), flush(), put(), readAll(), and ~PersistentMap().

bool dp_misc::PersistentMap::m_bIsOpen
private

Definition at line 39 of file dp_persmap.h.

Referenced by flush(), open(), and ~PersistentMap().

bool dp_misc::PersistentMap::m_bToBeCreated
private

Definition at line 40 of file dp_persmap.h.

Referenced by flush(), and open().

t_string2string_map dp_misc::PersistentMap::m_entries
private

Definition at line 38 of file dp_persmap.h.

Referenced by add(), erase(), flush(), get(), getEntries(), and readAll().

::osl::File dp_misc::PersistentMap::m_MapFile
private

Definition at line 37 of file dp_persmap.h.

Referenced by flush(), open(), readAll(), and ~PersistentMap().


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