ldas-tools-diskcacheAPI  2.6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
diskCache::Cache::DirectoryManager Class Reference

#include <DirectoryManager.hh>

Inheritance diagram for diskCache::Cache::DirectoryManager:
diskCache::DirectoryManagerSingleton

Public Types

typedef Directory::ScanResults ScanResults
 
typedef boost::shared_ptr
< Directory
directory_ref_type
 

Public Member Functions

 DirectoryManager ()
 
bool AddDirectory (directory_ref_type Directory)
 Add a new directory to the collection. More...
 
void CreateDirectory (const std::string &Name, const std::string &Root)
 Create a new directory to be added to the collection. More...
 
void Find (const std::string &Root, QueryAnswer &Answer) const
 Locate files. More...
 
void OnUpdate (directory_ref_type Dir, ScanResults &Results)
 Update information concearning a single directory. More...
 
directory_ref_type ReferenceDirectory (const std::string &Name) const
 Locate a directory in the collection. More...
 
void RemoveDirectory (const std::string &Name)
 Remove a directory from the collection. More...
 
void RemoveDirectoryRecursively (const std::string &Name)
 Remove a directory from the collection. More...
 
template<typename StreamT >
StreamT & Read (StreamT &Stream)
 
void Scan (directory_ref_type Dir, ScanResults &Results)
 Scan the directory for changes. More...
 
void Scan (const std::string &Root, ScanResults &Results)
 Recursively scan the directory for changes. More...
 
template<typename StreamT >
StreamT & Write (StreamT &Stream)
 
template<class Op >
void Walk (Op Operation, const std::string &Root, bool IncludeOffline=false)
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (const Op Operation, const std::string &Root, bool IncludeOffline=false) const
 Walk the tree performing the requested operation. More...
 
template<class Op >
void WalkDepthFirst (Op Operation, const std::string &Root)
 Walk the tree depth first performing the requested operation. More...
 
template<>
OStreamWrite (OStream &Stream)
 
template<>
IBinary & Read (IBinary &Stream)
 
template<>
OBinary & Write (OBinary &Stream)
 

Member Typedef Documentation

Constructor & Destructor Documentation

diskCache::Cache::DirectoryManager::DirectoryManager ( )

Member Function Documentation

bool diskCache::Cache::DirectoryManager::AddDirectory ( directory_ref_type  Directory)
inline

Add a new directory to the collection.

void diskCache::Cache::DirectoryManager::CreateDirectory ( const std::string &  Name,
const std::string &  Root 
)
inline

Create a new directory to be added to the collection.

Parameters
[in]NameThe name of the directory.
[in]RootThe root of the above directory.
void diskCache::Cache::DirectoryManager::Find ( const std::string &  Root,
QueryAnswer Answer 
) const

Locate files.

void diskCache::Cache::DirectoryManager::OnUpdate ( directory_ref_type  Dir,
ScanResults Results 
)

Update information concearning a single directory.

Parameters
[in]DirThe updated directory information.
[out]ResultsStorage for logging the results.
template<>
IBinary& diskCache::Cache::DirectoryManager::Read ( IBinary &  Stream)
template<typename StreamT >
StreamT& diskCache::Cache::DirectoryManager::Read ( StreamT &  Stream)
DirectoryManager::directory_ref_type diskCache::Cache::DirectoryManager::ReferenceDirectory ( const std::string &  Name) const
inline

Locate a directory in the collection.

void diskCache::Cache::DirectoryManager::RemoveDirectory ( const std::string &  Name)
inline

Remove a directory from the collection.

void diskCache::Cache::DirectoryManager::RemoveDirectoryRecursively ( const std::string &  Name)

Remove a directory from the collection.

void diskCache::Cache::DirectoryManager::Scan ( directory_ref_type  Dir,
ScanResults Results 
)

Scan the directory for changes.

void diskCache::Cache::DirectoryManager::Scan ( const std::string &  Root,
ScanResults Results 
)

Recursively scan the directory for changes.

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
)

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.
template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( const Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
) const

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.
template<class Op >
void diskCache::Cache::DirectoryManager::WalkDepthFirst ( Op  Operation,
const std::string &  Root 
)

Walk the tree depth first performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.
template<>
OStream& diskCache::Cache::DirectoryManager::Write ( OStream Stream)
template<>
OBinary& diskCache::Cache::DirectoryManager::Write ( OBinary &  Stream)
template<typename StreamT >
StreamT& diskCache::Cache::DirectoryManager::Write ( StreamT &  Stream)

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