libtorrent::file_pool Struct Reference

#include <file_pool.hpp>

List of all members.

Public Member Functions

 file_pool (int size=40)
boost::shared_ptr< fileopen_file (void *st, fs::path const &p, file::open_mode m)
void release (void *st)
void resize (int size)

Private Types

typedef multi_index_container
< lru_file_entry, indexed_by
< ordered_unique< member
< lru_file_entry, fs::path,&lru_file_entry::file_path >
>, ordered_non_unique< member
< lru_file_entry, pt::ptime,&lru_file_entry::last_use >
>, ordered_non_unique< member
< lru_file_entry, void
*,&lru_file_entry::key > > > > 
file_set

Private Attributes

int m_size
file_set m_files
boost::mutex m_mutex

Classes

struct  lru_file_entry


Detailed Description

Definition at line 65 of file file_pool.hpp.


Member Typedef Documentation

typedef multi_index_container< lru_file_entry, indexed_by< ordered_unique<member<lru_file_entry, fs::path , &lru_file_entry::file_path> > , ordered_non_unique<member<lru_file_entry, pt::ptime , &lru_file_entry::last_use> > , ordered_non_unique<member<lru_file_entry, void* , &lru_file_entry::key> > > > libtorrent::file_pool::file_set [private]

Definition at line 97 of file file_pool.hpp.


Constructor & Destructor Documentation

libtorrent::file_pool::file_pool ( int  size = 40  )  [inline]

Definition at line 67 of file file_pool.hpp.


Member Function Documentation

boost::shared_ptr< file > libtorrent::file_pool::open_file ( void *  st,
fs::path const &  p,
file::open_mode  m 
)

void libtorrent::file_pool::release ( void *  st  ) 

Definition at line 68 of file file_pool.cpp.

References asio::placeholders::iterator, l, m_files, and m_mutex.

Referenced by libtorrent::storage::impl::~impl().

void libtorrent::file_pool::resize ( int  size  ) 


Member Data Documentation

Definition at line 74 of file file_pool.hpp.

Referenced by open_file(), and resize().

Definition at line 99 of file file_pool.hpp.

Referenced by open_file(), release(), and resize().

boost::mutex libtorrent::file_pool::m_mutex [private]

Definition at line 100 of file file_pool.hpp.

Referenced by open_file(), release(), and resize().


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

Generated on Sun May 25 00:21:41 2008 by  doxygen 1.5.6