FlintLock Class Reference

#include <flint_lock.h>

Collaboration diagram for FlintLock:

Collaboration graph
[legend]
List of all members.

Public Types

enum  reason { SUCCESS, INUSE, UNSUPPORTED, UNKNOWN }

Public Member Functions

 FlintLock (const std::string &filename_)
 operator bool ()
 ~FlintLock ()
reason lock (bool exclusive)
void release ()

Private Attributes

std::string filename
int fd
pid_t pid

Detailed Description

Definition at line 36 of file flint_lock.h.


Member Enumeration Documentation

enum FlintLock::reason

Enumerator:
SUCCESS 
INUSE 
UNSUPPORTED 
UNKNOWN 

Definition at line 48 of file flint_lock.h.


Constructor & Destructor Documentation

FlintLock::FlintLock ( const std::string &  filename_  )  [inline]

Definition at line 63 of file flint_lock.h.

FlintLock::~FlintLock (  )  [inline]

Definition at line 67 of file flint_lock.h.

References release().


Member Function Documentation

FlintLock::operator bool (  )  [inline]

Definition at line 64 of file flint_lock.h.

References fd.

FlintLock::reason FlintLock::lock ( bool  exclusive  ) 

Definition at line 55 of file flint_lock.cc.

References Assert, fd, filename, INUSE, Xapian::Remote::open(), pid, SUCCESS, UNKNOWN, and UNSUPPORTED.

Referenced by FlintDatabase::get_database_write_lock().

void FlintLock::release (  ) 

Definition at line 181 of file flint_lock.cc.

References fd, and pid.

Referenced by ~FlintLock().


Member Data Documentation

std::string FlintLock::filename [private]

Definition at line 37 of file flint_lock.h.

Referenced by lock().

int FlintLock::fd [private]

Definition at line 43 of file flint_lock.h.

Referenced by lock(), operator bool(), and release().

pid_t FlintLock::pid [private]

Definition at line 44 of file flint_lock.h.

Referenced by lock(), and release().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.