Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

DataPool::OpenFiles_File Class Reference

Inheritance diagram for DataPool::OpenFiles_File:

GPEnabled

List of all members.


Detailed Description

The purpose of this class is to limit the number of files open by connected DataPools. Now, when a DataPool is connected to a file, it doesn't necessarily has it open. Every time it needs access to data it's supposed to ask this file for the ByteStream. It should also inform the class when it's going to die (so that the file can be closed). OpenFiles makes sure, that the number of open files doesn't exceed MAX_OPEN_FILES. When it does, it looks for the oldest file, closes it and asks all DataPools working with it to ZERO their GP<> pointers.

Definition at line 113 of file DataPool.cpp.


Public Member Functions

int add_pool (GP< DataPool > &pool)
void clear_stream (void)
int del_pool (GP< DataPool > &pool)
int get_count (void) const
 OpenFiles_File (const GURL &url, GP< DataPool > &pool)

Public Attributes

unsigned long open_time
GPList< DataPoolpools_list
GCriticalSection pools_lock
GP< ByteStreamstream
GCriticalSection stream_lock
GURL url

Protected Attributes

volatile int count
 The reference counter.

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

Generated by  Doxygen 1.6.0   Back to index