All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BranchPolicy.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "SRProxy/IBranchPolicy.h"
4 
5 #include <unordered_set>
6 
7 namespace flat
8 {
9  /// Branch policy based on a list loaded from a text file
10  class FileListBranchPolicy: public IBranchPolicy
11  {
12  public:
13  FileListBranchPolicy(const std::string& fname);
14 
15  bool Include(const std::string& s) const override
16  {
17  return fIncluded.count(s);
18  }
19  protected:
20  std::unordered_set<std::string> fIncluded;
21  };
22 }
std::unordered_set< std::string > fIncluded
Definition: BranchPolicy.h:20
string fname
Definition: demo.py:5
bool Include(const std::string &s) const override
Definition: BranchPolicy.h:15
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
FileListBranchPolicy(const std::string &fname)
Branch policy based on a list loaded from a text file.
Definition: BranchPolicy.h:10