OpenStudioCore:runmanager/lib
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
openstudio::runmanager::Files Class Reference

#include <FileInfo.hpp>

Public Member Functions

void append (const FileInfo &t_fi)
 Adds a new FileInfo object on to this collection. More...
 
void append (const Files &t_files)
 Adds all of the FileInfo objects in the given Files object to this one. More...
 
template<typename InItr >
void append (const InItr &begin, const InItr &end)
 Generic templated function for appending a collection of FileInfo objects to this. More...
 
Files complete (const openstudio::path &t_basePath) const
 
 Files ()
 Default constructor. More...
 
 Files (const std::vector< FileInfo > &t_files)
 Constructs a Files object from a vector of FileInfo objects. More...
 
const std::vector< FileInfo > & files () const
 Returns a vector of the accumulated FileInfo objects. More...
 
std::vector< FileInfo > & files ()
 Returns a vector of the accumulated FileInfo objects. More...
 
Files getAllByExtension (const std::string &t_ext) const
 Returns all FileInfo objects in the collection that match the given extension as a new Files object. More...
 
Files getAllByFilename (const std::string &t_filename) const
 Returns all FileInfo objects matching the given filename as a new Files object. More...
 
Files getAllByKey (const std::string &t_key) const
 Returns all FileInfo objects that match the given key as a new Files object. More...
 
Files getAllByRegex (const std::string &t_regex) const
 Returns all FileInfo objects that match the given regular expression as a new Files object. More...
 
const FileInfogetLastByExtension (const std::string &t_ext) const
 Returns the last FileInfo object in the collection that matches the given extension. More...
 
FileInfogetLastByExtension (const std::string &t_ext)
 Returns the last FileInfo object in the collection that matches the given extension. More...
 
const FileInfogetLastByFilename (const std::string &t_filename) const
 Returns last FileInfo object matching the given filename. More...
 
FileInfogetLastByFilename (const std::string &t_filename)
 Returns last FileInfo object matching the given filename. More...
 
const FileInfogetLastByKey (const std::string &t_key) const
 Returns the last FileInfo object in the collection with the matching keyname. More...
 
FileInfogetLastByKey (const std::string &t_key)
 Returns the last FileInfo object in the collection with the matching keyname. More...
 
const FileInfogetLastByRegex (const std::string &t_regex) const
 Returns the last FileInfo object in the collection that matches the given regular expression. More...
 
FileInfogetLastByRegex (const std::string &t_regex)
 Returns the last FileInfo object in the collection that matches the given regular expression. More...
 
bool operator== (const Files &t_rhs) const
 

Detailed Description

Represents a collection of FileInfo objects.

A Files collection always maintains the original order of the FileInfo objects it was created from and were subsequently added to it.

Constructor & Destructor Documentation

openstudio::runmanager::Files::Files ( )
inline

Default constructor.

openstudio::runmanager::Files::Files ( const std::vector< FileInfo > &  t_files)
inlineexplicit

Constructs a Files object from a vector of FileInfo objects.

Member Function Documentation

void openstudio::runmanager::Files::append ( const FileInfo t_fi)
inline

Adds a new FileInfo object on to this collection.

void openstudio::runmanager::Files::append ( const Files t_files)
inline

Adds all of the FileInfo objects in the given Files object to this one.

template<typename InItr >
void openstudio::runmanager::Files::append ( const InItr &  begin,
const InItr &  end 
)
inline

Generic templated function for appending a collection of FileInfo objects to this.

Files openstudio::runmanager::Files::complete ( const openstudio::path &  t_basePath) const
inline
const std::vector<FileInfo>& openstudio::runmanager::Files::files ( ) const
inline

Returns a vector of the accumulated FileInfo objects.

std::vector<FileInfo>& openstudio::runmanager::Files::files ( )
inline

Returns a vector of the accumulated FileInfo objects.

Files openstudio::runmanager::Files::getAllByExtension ( const std::string &  t_ext) const

Returns all FileInfo objects in the collection that match the given extension as a new Files object.

Parameters
[in]t_extExtension to match
Files openstudio::runmanager::Files::getAllByFilename ( const std::string &  t_filename) const

Returns all FileInfo objects matching the given filename as a new Files object.

Parameters
[in]t_filenameFilename to match
Files openstudio::runmanager::Files::getAllByKey ( const std::string &  t_key) const

Returns all FileInfo objects that match the given key as a new Files object.

Parameters
[in]t_keykey to lookup
Files openstudio::runmanager::Files::getAllByRegex ( const std::string &  t_regex) const

Returns all FileInfo objects that match the given regular expression as a new Files object.

Searches are case insensitive

Parameters
[in]t_regexRegEx to look up
See also
http://doc.qt.nokia.com/qregexp.html
const FileInfo& openstudio::runmanager::Files::getLastByExtension ( const std::string &  t_ext) const

Returns the last FileInfo object in the collection that matches the given extension.

const version

Parameters
[in]t_extExtension to match
FileInfo& openstudio::runmanager::Files::getLastByExtension ( const std::string &  t_ext)

Returns the last FileInfo object in the collection that matches the given extension.

non-const version

Parameters
[in]t_extExtension to match
const FileInfo& openstudio::runmanager::Files::getLastByFilename ( const std::string &  t_filename) const

Returns last FileInfo object matching the given filename.

Const version

Parameters
[in]t_filenameFilename to match
FileInfo& openstudio::runmanager::Files::getLastByFilename ( const std::string &  t_filename)

Returns last FileInfo object matching the given filename.

non-Const version

Parameters
[in]t_filenameFilename to match
const FileInfo& openstudio::runmanager::Files::getLastByKey ( const std::string &  t_key) const

Returns the last FileInfo object in the collection with the matching keyname.

const version

Parameters
[in]t_keyKey to look up
FileInfo& openstudio::runmanager::Files::getLastByKey ( const std::string &  t_key)

Returns the last FileInfo object in the collection with the matching keyname.

non-const version

Parameters
[in]t_keyKey to look up
const FileInfo& openstudio::runmanager::Files::getLastByRegex ( const std::string &  t_regex) const

Returns the last FileInfo object in the collection that matches the given regular expression.

Const version. Searches are case insensitive

Parameters
[in]t_regexRegEx to look up
See also
http://doc.qt.nokia.com/qregexp.html
FileInfo& openstudio::runmanager::Files::getLastByRegex ( const std::string &  t_regex)

Returns the last FileInfo object in the collection that matches the given regular expression.

non-Const version. Searches are case insensitive

Parameters
[in]t_regexRegEx to look up
See also
http://doc.qt.nokia.com/qregexp.html
bool openstudio::runmanager::Files::operator== ( const Files t_rhs) const