Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PathInfo::devino_cache Class Reference

Simple cache remembering device/inode to detect hardlinks. More...

#include <PathInfo.h>

List of all members.

Public Member Functions

 devino_cache ()
void clear ()
bool insert (const dev_t &dev_r, const ino_t &ino_r)

Private Attributes

std::map< dev_t, std::set<
ino_t > > 
_devino


Detailed Description

Simple cache remembering device/inode to detect hardlinks.

PathInfo::devino_cache trace; for ( all files ) { if ( trace.insert( file.device, file.inode ) ) { // 1st occurance of file } // else: hardlink; already counted this device/inode } }


Constructor & Destructor Documentation

PathInfo::devino_cache::devino_cache  )  [inline]
 

Constructor


Member Function Documentation

void PathInfo::devino_cache::clear  )  [inline]
 

Clear cache

bool PathInfo::devino_cache::insert const dev_t &  dev_r,
const ino_t &  ino_r
[inline]
 

Remember dev/ino. Return true if it's inserted the first time, false if alredy present in cache (a hardlink to a previously remembered file.


Member Data Documentation

std::map<dev_t,std::set<ino_t> > PathInfo::devino_cache::_devino [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Feb 23 23:56:11 2006 for liby2util by doxygen 1.3.6