Class object used with the std::find_if() function.
More...
This function object is used with the STL find_if algorithm to find a FileEntry in a container, which name (as obtained with FileEntry::getFileName()) is identical to the name specified in the MatchFileName constructor.
- Warning
- The file name cannot include a '/' in this case or the search will always fail.
Definition at line 111 of file filecollection.cpp.
| zipios::anonymous_namespace{filecollection.cpp}::MatchFileName::MatchFileName |
( |
std::string const & |
name | ) |
|
|
inlineexplicit |
This function saves the base name to search in the FileCollection.
This class expect the name to be a base file name, eventually with an extension. If the name includes a slash then the search will always fail.
- Parameters
-
| [in] | name | The name of the file being searched. |
Definition at line 125 of file filecollection.cpp.
| bool zipios::anonymous_namespace{filecollection.cpp}::MatchFileName::operator() |
( |
FileEntry::pointer_t |
entry | ) |
const |
|
inline |
This function compares the base name of the entry with the saved base name. If equal, then it returns true. It is used with the std::find_if() function.
- Todo:
- We could transform that with lambda at some point.
- Parameters
-
- Returns
- true if the name of the entry matches the MatchFileName.
Definition at line 143 of file filecollection.cpp.
| std::string const zipios::anonymous_namespace{filecollection.cpp}::MatchFileName::m_name |
|
private |
The documentation for this class was generated from the following file: