5 #ifndef CVMFS_FD_TABLE_H_
6 #define CVMFS_FD_TABLE_H_
27 template<
class HandleT>
31 unsigned max_open_fds,
32 const HandleT &invalid_handle)
39 for (
unsigned i = 0; i < max_open_fds; ++i) {
53 for (
unsigned i = 0; i <
fd_index_.size(); ++i) {
66 for (
unsigned i = 0; i <
fd_index_.size(); ++i) {
140 if ((fd < 0) || (static_cast<unsigned>(fd) >=
open_fds_.size()))
167 #endif // CVMFS_FD_TABLE_H_
void AssignFrom(const FdTable< HandleT > &other)
unsigned GetMaxFds() const
FdTable(unsigned max_open_fds, const HandleT &invalid_handle)
assert((mem||(size==0))&&"Out Of Memory")
std::vector< unsigned > fd_index_
FdTable< HandleT > * Clone()
std::vector< FdWrapper > open_fds_
FdWrapper(HandleT h, unsigned i)
int OpenFd(const HandleT &handle)
HandleT GetHandle(int fd)