aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/scan_name.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 18:17:36 +0000
committerlloyd <[email protected]>2008-11-11 18:17:36 +0000
commit237258e42f4b1b8c01d91518270c4a9c59a0dc47 (patch)
tree4fbea59fc932e0b08c5e0e73b906be913811c216 /src/utils/scan_name.cpp
parent6a1e19928007c0047518e8e15b92bba116bf7a58 (diff)
Remove support for multiple providers in SCAN_Name, mostly because I
couldn't really figure out how the semantics should work.
Diffstat (limited to 'src/utils/scan_name.cpp')
-rw-r--r--src/utils/scan_name.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/utils/scan_name.cpp b/src/utils/scan_name.cpp
index b90211dea..e32110740 100644
--- a/src/utils/scan_name.cpp
+++ b/src/utils/scan_name.cpp
@@ -41,34 +41,12 @@ parse_and_deref_aliases(const std::string& algo_spec)
}
SCAN_Name::SCAN_Name(const std::string& algo_spec,
- const std::string& prov_names)
+ const std::string& provider)
{
orig_algo_spec = algo_spec;
- orig_providers = prov_names;
+ m_provider = provider;
name = parse_and_deref_aliases(algo_spec);
-
- if(prov_names.find(',') != std::string::npos)
- {
- std::vector<std::string> prov_names_vec = split_on(prov_names, ',');
- for(u32bit i = 0; i != prov_names_vec.size(); ++i)
- providers.insert(prov_names_vec[i]);
- }
- else if(prov_names != "")
- providers.insert(prov_names);
- }
-
-bool SCAN_Name::provider_allowed(const std::string& provider) const
- {
- // If not providers were specified by the user, then allow any;
- // usually the source order will try to perfer one of the better
- // ones first.
-
- // The core provider is always enabled
- if(provider == "core" || providers.empty())
- return true;
-
- return (providers.find(provider) != providers.end());
}
SCAN_Name SCAN_Name::arg(u32bit i) const
@@ -76,7 +54,7 @@ SCAN_Name SCAN_Name::arg(u32bit i) const
if(i > arg_count())
throw std::range_error("SCAN_Name::argument");
- return SCAN_Name(name[i+1], orig_providers);
+ return SCAN_Name(name[i+1], m_provider);
}
std::string SCAN_Name::arg_as_string(u32bit i) const