|int||add_pool (GP< DataPool > &pool)|
|int||del_pool (GP< DataPool > &pool)|
|int||get_count (void) const|
|OpenFiles_File (const GURL &url, GP< DataPool > &pool)|
|GPList< DataPool >||pools_list|
|GP< ByteStream >||stream|
|The reference counter. |
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.