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

Manages a collection of mount points. More...

#include <DirectoryManagerSingleton.hh>

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

Public Types

typedef
Cache::DirectoryManager::directory_ref_type 
directory_ref_type
 
typedef
Cache::DirectoryManager::ScanResults 
ScanResults
 

Public Member Functions

 DECLARE_READ_WRITE_SINGLETON (DirectoryManagerSingleton)
 

Static Public Member Functions

static bool AddDirectory (directory_ref_type Directory)
 
static void Find (const std::string &Root, Cache::QueryAnswer &Answer)
 
static void RemoveDirectoryRecursively (const std::string &Name)
 Remove a directory from the collection. More...
 
static void Scan (const std::string &Root, ScanResults &Results)
 Recursively scan a managed directory. More...
 
template<typename StreamT >
static StreamT & Read (StreamT &Stream)
 Initialize information from the stream. More...
 
template<typename OStreamT >
static OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 

Private Member Functions

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...
 
template<>
IBinary & Read (IBinary &Stream)
 
void Scan (directory_ref_type Dir, ScanResults &Results)
 Scan the directory for changes. More...
 
template<typename StreamT >
StreamT & Write (StreamT &Stream)
 
template<>
OStream & Write (OStream &Stream)
 
template<>
OBinary & Write (OBinary &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...
 

Friends

class MountPointManagerSingleton
 

Detailed Description

Manages a collection of mount points.

A collection of mount points is managed by this singleton class. Each mount point represents a starting point for data searches. The collection of mount points is order sensative in that directories that appear higher in the list will be prioritised when searching for data.

Member Typedef Documentation

Member Function Documentation

bool diskCache::DirectoryManagerSingleton::AddDirectory ( directory_ref_type  Directory)
inlinestatic
diskCache::DirectoryManagerSingleton::DECLARE_READ_WRITE_SINGLETON ( DirectoryManagerSingleton  )
void diskCache::DirectoryManagerSingleton::Find ( const std::string &  Root,
Cache::QueryAnswer Answer 
)
inlinestatic
template<typename StreamT >
StreamT & diskCache::DirectoryManagerSingleton::Read ( StreamT &  Stream)
inlinestatic

Initialize information from the stream.

Parameters
[in]StreamSource of the information.
void diskCache::DirectoryManagerSingleton::RemoveDirectoryRecursively ( const std::string &  Name)
inlinestatic

Remove a directory from the collection.

void diskCache::DirectoryManagerSingleton::Scan ( const std::string &  Root,
ScanResults Results 
)
inlinestatic

Recursively scan a managed directory.

template<typename OStreamT >
OStreamT & diskCache::DirectoryManagerSingleton::Write ( OStreamT &  Stream)
inlinestatic

Dump information to the stream.

Parameters
[in]StreamSink for the information.

Friends And Related Function Documentation

friend class MountPointManagerSingleton
friend

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