OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shared::FileOrderLocal Class Reference

#include <file_path_util.h>

+ Inheritance diagram for shared::FileOrderLocal:
+ Collaboration diagram for shared::FileOrderLocal:

Public Member Functions

 FileOrderLocal (const FilePathOptions &options)
 
LocalFileComparator getFileComparator () override
 
- Public Member Functions inherited from shared::FileOrderBase< LocalFileComparator >
 FileOrderBase (const FilePathOptions &options)
 
virtual std::string concatCaptureGroups (const std::string &file_name) const
 
virtual std::string getSortBy ()
 

Protected Attributes

const std::map< std::string,
LocalFileComparator
comparator_map_
 
- Protected Attributes inherited from shared::FileOrderBase< LocalFileComparator >
std::optional< std::string > sort_regex_
 
std::optional< std::string > sort_by_
 

Detailed Description

Definition at line 177 of file file_path_util.h.

Constructor & Destructor Documentation

shared::FileOrderLocal::FileOrderLocal ( const FilePathOptions options)
inline

Definition at line 179 of file file_path_util.h.

180  : FileOrderBase<LocalFileComparator>(options) {}

Member Function Documentation

LocalFileComparator shared::FileOrderLocal::getFileComparator ( )
inlineoverridevirtual

Implements shared::FileOrderBase< LocalFileComparator >.

Definition at line 182 of file file_path_util.h.

References CHECK, comparator_map_, and shared::FileOrderBase< LocalFileComparator >::getSortBy().

182  {
183  auto comparator_pair = comparator_map_.find(getSortBy());
184  CHECK(comparator_pair != comparator_map_.end());
185  return comparator_pair->second;
186  }
const std::map< std::string, LocalFileComparator > comparator_map_
#define CHECK(condition)
Definition: Logger.h:222

+ Here is the call graph for this function:

Member Data Documentation

const std::map<std::string, LocalFileComparator> shared::FileOrderLocal::comparator_map_
protected
Initial value:
{
[](const std::string& lhs, const std::string& rhs) -> bool { return lhs < rhs; }},
[](const std::string& lhs, const std::string& rhs) -> bool {
return boost::filesystem::last_write_time(lhs) <
boost::filesystem::last_write_time(rhs);
}},
[this](const std::string& lhs, const std::string& rhs) -> bool {
return this->concatCaptureGroups(lhs) < this->concatCaptureGroups(rhs);
}},
[this](const std::string& lhs, const std::string& rhs) -> bool {
this->concatCaptureGroups(rhs));
}},
[this](const std::string& lhs, const std::string& rhs) -> bool {
this->concatCaptureGroups(rhs));
}}}

Definition at line 189 of file file_path_util.h.

Referenced by getFileComparator().


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