rpa::file_unlocker_adapter< FileGenerator > Class Template Reference

#include <file_unlocker.h>

List of all members.

Public Member Functions

 file_unlocker_adapter ()
virtual ~file_unlocker_adapter ()

Private Attributes

file_unlocker _filUnlock


Detailed Description

template<class FileGenerator>
class rpa::file_unlocker_adapter< FileGenerator >

This gives the file unlocking features to streams (FILE ptr) generators. For performance reasons, it is worth to set an output stream (aka FILE ptr) in unlocked mode. The library allows this by design, because potentially concurrent access are already protected by mutex. Solaris and Linux allows to disable the internal locks of streams. So, this adapter, as soon as the FILE ptr is created, disables its lock.


Constructor & Destructor Documentation

template<class FileGenerator>
rpa::file_unlocker_adapter< FileGenerator >::file_unlocker_adapter (  )  [inline]

With this mode, the user is responsible for locking the stream. None of the stream operations will implicitly do anymore until the state is set back to FSETLOCKING_INTERNAL. The stream state will be restored by the destructor.

template<class FileGenerator>
virtual rpa::file_unlocker_adapter< FileGenerator >::~file_unlocker_adapter (  )  [inline, virtual]


Member Data Documentation

template<class FileGenerator>
file_unlocker rpa::file_unlocker_adapter< FileGenerator >::_filUnlock [private]

This stores the FILE ptr which will be used when destroying this object. It stores the initial state of the stream too. It may be a bit simpler to store the FILE ptr in this class, but it supposes that the FILE ptr is temporary - but it may not.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:37 2007 for rpa by  doxygen 1.4.7