File indexing completed on 2025-07-09 08:29:55
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
0036 namespace dd4hep {
0037 struct SpecPar;
0038
0039 struct Filter {
0040 std::vector<bool> isRegex;
0041 std::vector<bool> hasNamespace;
0042 std::vector<int> index;
0043 std::vector<std::string_view> skeys;
0044 std::vector<std::regex> keys;
0045 std::unique_ptr<Filter> next;
0046 struct Filter* up;
0047 const SpecPar* spec = nullptr;
0048 };
0049
0050 namespace dd {
0051 bool accepted(std::vector<std::regex> const&, std::string_view);
0052 bool accepted(const Filter*, std::string_view);
0053 bool isRegex(std::string_view);
0054 bool hasNamespace(std::string_view);
0055 bool isMatch(std::string_view, std::string_view);
0056 bool compareEqual(std::string_view, std::string_view);
0057 bool compareEqual(std::string_view, std::regex);
0058 bool compareEqualName(std::string_view, std::string_view);
0059 bool compareEqualCopyNumber(std::string_view, int);
0060 std::string_view realTopName(std::string_view);
0061 std::vector<std::string_view> split(std::string_view, const char*);
0062 std::string_view noNamespace(std::string_view);
0063 }
0064 }
0065
0066 #endif