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 32 of file dp_persmap.h.

Constructor & Destructor Documentation

◆ ~PersistentMap()

dp_misc::PersistentMap::~PersistentMap ( )

Definition at line 61 of file dp_persmap.cxx.

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

◆ PersistentMap() [1/2]

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

Definition at line 45 of file dp_persmap.cxx.

References open(), and url_.

◆ PersistentMap() [2/2]

dp_misc::PersistentMap::PersistentMap ( )

in mem db

Definition at line 54 of file dp_persmap.cxx.

Member Function Documentation

◆ add()

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

Definition at line 284 of file dp_persmap.cxx.

References m_bIsDirty, m_entries, and value.

Referenced by put(), and readAll().

◆ erase()

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

Definition at line 300 of file dp_persmap.cxx.

References flush(), m_bIsDirty, m_entries, and nCount.

◆ flush()

void dp_misc::PersistentMap::flush ( )
private

◆ get()

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

Definition at line 274 of file dp_persmap.cxx.

References m_entries, and value.

Referenced by has().

◆ getEntries()

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

Definition at line 48 of file dp_persmap.h.

References m_entries.

◆ has()

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

Definition at line 269 of file dp_persmap.cxx.

References get().

◆ open()

void dp_misc::PersistentMap::open ( )
private

Definition at line 146 of file dp_persmap.cxx.

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

Referenced by PersistentMap().

◆ put()

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

Definition at line 291 of file dp_persmap.cxx.

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

◆ readAll()

void dp_misc::PersistentMap::readAll ( )
private

Definition at line 164 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

◆ m_bIsDirty

bool dp_misc::PersistentMap::m_bIsDirty
private

Definition at line 38 of file dp_persmap.h.

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

◆ m_bIsOpen

bool dp_misc::PersistentMap::m_bIsOpen
private

Definition at line 36 of file dp_persmap.h.

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

◆ m_bToBeCreated

bool dp_misc::PersistentMap::m_bToBeCreated
private

Definition at line 37 of file dp_persmap.h.

Referenced by flush(), and open().

◆ m_entries

t_string2string_map dp_misc::PersistentMap::m_entries
private

Definition at line 35 of file dp_persmap.h.

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

◆ m_MapFile

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

Definition at line 34 of file dp_persmap.h.

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


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