6 std::string
const current_process_lit{
"current_process"};
7 std::string
const input_source_lit{
"input_source"};
10 allowed_search_policy(std::string
const& specified_name,
11 std::string
const& current_process_name)
17 if (specified_name == current_process_lit ||
18 specified_name == current_process_name) {
19 return allowed_search::current_process;
26 if (specified_name == input_source_lit || !specified_name.empty()) {
27 return allowed_search::input_source;
31 return allowed_search::all_processes;
35 process_name(std::string
const& specified_name,
36 std::string
const& current_process_name)
38 if (specified_name == current_process_lit) {
39 return current_process_name;
40 }
else if (specified_name == input_source_lit) {
43 return specified_name;
50 : name_{specified_name}
54 std::string
const& current_process_name)
55 :
search_{allowed_search_policy(specified_name, current_process_name)}
56 ,
name_{process_name(specified_name, current_process_name)}
bool input_source_search_allowed() const
bool current_process_search_allowed() const