OmniSciDB  d2f719934e
 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 std::optional< std::string > &sort_regex, const std::optional< std::string > &sort_by)
 
LocalFileComparator getFileComparator () override
 
- Public Member Functions inherited from shared::FileOrderBase< LocalFileComparator >
 FileOrderBase (const std::optional< std::string > &sort_regex, const std::optional< std::string > &sort_by)
 
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 178 of file file_path_util.h.

Constructor & Destructor Documentation

shared::FileOrderLocal::FileOrderLocal ( const std::optional< std::string > &  sort_regex,
const std::optional< std::string > &  sort_by 
)
inline

Definition at line 180 of file file_path_util.h.

182  : FileOrderBase<LocalFileComparator>(sort_regex, sort_by) {}

Member Function Documentation

LocalFileComparator shared::FileOrderLocal::getFileComparator ( )
inlineoverridevirtual

Implements shared::FileOrderBase< LocalFileComparator >.

Definition at line 184 of file file_path_util.h.

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

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

+ 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 191 of file file_path_util.h.

Referenced by getFileComparator().


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