SH::DiskListLocal Class Reference

a DiskList implementation for local directories More...

#include <DiskListLocal.h>

Inheritance diagram for SH::DiskListLocal:
SH::DiskList

List of all members.

Public Member Functions

void testInvariant () const
 test the invariant of this object
 DiskListLocal (const std::string &val_dir)
 make the listing for the given directory
 DiskListLocal (const std::string &val_dir, const std::string &val_prefix)
 make the listing for the given directory, but replacing the directory with prefix for the path
virtual ~DiskListLocal ()
 standard destructor

Protected Member Functions

virtual bool getNext ()
virtual std::string getPath () const
virtual DiskListdoOpenDir () const
virtual std::string getDirname () const

Detailed Description

a DiskList implementation for local directories


Constructor & Destructor Documentation

SH::DiskListLocal::DiskListLocal ( const std::string &  val_dir  ) 

make the listing for the given directory

Parameters:
val_dir the directory to list
Guarantee
strong
Failures
out of memory II
SH::DiskListLocal::DiskListLocal ( const std::string &  val_dir,
const std::string &  val_prefix 
)

make the listing for the given directory, but replacing the directory with prefix for the path

Parameters:
val_dir the directory to list
val_prefix the prefix with which val_dir will be replaced in the reported paths
Guarantee
strong
Failures
out of memory II
Rationale
this mechanism is meant to allow scanning file servers using one protocol, but then accessing them using another
SH::DiskListLocal::~DiskListLocal (  )  [virtual]

standard destructor

Guarantee
no-fail

Member Function Documentation

DiskList * SH::DiskListLocal::doOpenDir (  )  const [protected, virtual]

make a new list object for the sub-directory

Returns:
a new list object for the sub-directory, or NULL if it is not a directory
Precondition:
(soft) next() has been called successfully
Guarantee
strong
Failures
out of memory III

Rationale
the virtual part of DiskList::openDir()

Implements SH::DiskList.

std::string SH::DiskListLocal::getDirname (  )  const [protected, virtual]

the base path for the directory listed

Guarantee
strong
Failures
out of memory II

Rationale
the virtual part of DiskList::dirname()

Implements SH::DiskList.

bool SH::DiskListLocal::getNext (  )  [protected, virtual]

get the next list entry

Returns:
whether we found another entry
Guarantee
basic
Failures
i/o errors

Rationale
the virtual part of DiskList::next()

Implements SH::DiskList.

std::string SH::DiskListLocal::getPath (  )  const [protected, virtual]

the path for the current entry.

Returns:
the path for the current entry
Precondition:
(soft) next() has been called successfully
Guarantee
strong failures: out of memory III

Rationale
the virtual part of DiskList::path()

Implements SH::DiskList.

void SH::DiskListLocal::testInvariant (  )  const

test the invariant of this object

Guarantee
no-fail

Reimplemented from SH::DiskList.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1