File indexing completed on 2025-02-21 09:58:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DD4HEP_FILTER_H
0014 #define DD4HEP_FILTER_H
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #include <memory>
0033 #include <vector>
0034 #include <regex>
0035 #include <unordered_map>
0036
0037 namespace dd4hep {
0038 struct SpecPar;
0039
0040 struct Filter {
0041 std::vector<bool> isRegex;
0042 std::vector<bool> hasNamespace;
0043 std::vector<int> index;
0044 std::vector<std::string_view> skeys;
0045 std::vector<std::regex> keys;
0046 std::unique_ptr<Filter> next;
0047 struct Filter* up;
0048 const SpecPar* spec = nullptr;
0049 };
0050
0051 namespace dd {
0052 bool accepted(std::vector<std::regex> const&, std::string_view);
0053 bool accepted(const Filter*, std::string_view);
0054 bool isRegex(std::string_view);
0055 bool hasNamespace(std::string_view);
0056 bool isMatch(std::string_view, std::string_view);
0057 bool compareEqual(std::string_view, std::string_view);
0058 bool compareEqual(std::string_view, std::regex);
0059 bool compareEqualName(std::string_view, std::string_view);
0060 bool compareEqualCopyNumber(std::string_view, int);
0061 std::string_view realTopName(std::string_view);
0062 std::vector<std::string_view> split(std::string_view, const char*);
0063 std::string_view noNamespace(std::string_view);
0064 }
0065 }
0066
0067 #endif