YGP::XDirectorySearch< Parent > Class Template Reference

Template to add file in- and exlusion to the *DirectorySearch classes. More...

List of all members.

Public Member Functions

 XDirectorySearch ()
 XDirectorySearch (const std::string &spec)
virtual ~XDirectorySearch ()
virtual void setSearchValue (const std::string &search)
Searching
virtual const Filefind (const std::string &spec, unsigned long attribs=IDirectorySearch::FILE_NORMAL)
virtual const Filefind (unsigned long attribs=IDirectorySearch::FILE_NORMAL)
virtual const Filenext ()
In/exclusion
void addFilesToInclude (const std::string &spec)
void addFilesToExclude (const std::string &spec)

Protected Member Functions

void setNodes (const std::string &spec)


Detailed Description

template<class Parent>
class YGP::XDirectorySearch< Parent >

Template to add file in- and exlusion to the *DirectorySearch classes.

There exists some predefined (typedef'ed) classes:


Constructor & Destructor Documentation

template<class Parent >
YGP::XDirectorySearch< Parent >::XDirectorySearch (  )  [inline]

Constructor.

template<class Parent >
YGP::XDirectorySearch< Parent >::XDirectorySearch ( const std::string &  spec  )  [inline]

Constructor with specification of which files to search for.

template<class Parent >
virtual YGP::XDirectorySearch< Parent >::~XDirectorySearch (  )  [inline, virtual]

Destructor.


Member Function Documentation

template<class Parent >
void YGP::XDirectorySearch< Parent >::addFilesToExclude ( const std::string &  spec  )  [inline]

Adds files to exclude in the search.

This files are added at the end of the previously specifed files (and are therefore less significant).

The parameter can also contain a list of files, separated with the character to separate paths of the operating system (the colon (:) in UNIX; the semicolon (;) in DOS/WINDOZE.

template<class Parent >
void YGP::XDirectorySearch< Parent >::addFilesToInclude ( const std::string &  spec  )  [inline]

Adds files to include in the search.

This files are added at the end of the previously specifed files (and are therefore less significant).

The parameter can also contain a list of files, separated with the character to separate paths of the operating system (the colon (:) in UNIX; the semicolon (;) in DOS/WINDOZE.

template<class Parent >
virtual const File* YGP::XDirectorySearch< Parent >::find ( unsigned long  attribs = IDirectorySearch::FILE_NORMAL  )  [inline, virtual]

Returns the first found file, having the attributes attribs.

Precondition:
The files to search for must have been previously specified

template<class Parent >
virtual const File* YGP::XDirectorySearch< Parent >::find ( const std::string &  spec,
unsigned long  attribs = IDirectorySearch::FILE_NORMAL 
) [inline, virtual]

Returns the first found file matching spec, having the attributes attribs.

template<class Parent >
virtual const File* YGP::XDirectorySearch< Parent >::next (  )  [inline, virtual]

Returns the next file matching the previously specifed search criteria.

template<class Parent >
void YGP::XDirectorySearch< Parent >::setNodes ( const std::string &  spec  )  [inline, protected]

Sets directly the files to in- or exclude.

Spec must be in the right format (e.g. every node must have a prefix (i or x) specifying if it should be added or removed.

template<class Parent >
virtual void YGP::XDirectorySearch< Parent >::setSearchValue ( const std::string &  search  )  [inline, virtual]

Sets the value for the next search. Clears the previously specified nodes.


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

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:28 2009 by doxygen 1.5.8