diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/scan_name.cpp | 14 | ||||
-rw-r--r-- | src/utils/scan_name.h | 28 |
2 files changed, 5 insertions, 37 deletions
diff --git a/src/utils/scan_name.cpp b/src/utils/scan_name.cpp index f5a1a9245..c0e931e14 100644 --- a/src/utils/scan_name.cpp +++ b/src/utils/scan_name.cpp @@ -40,11 +40,9 @@ parse_and_deref_aliases(const std::string& algo_spec) } -SCAN_Name::SCAN_Name(const std::string& algo_spec, - const std::string& provider) +SCAN_Name::SCAN_Name(const std::string& algo_spec) { orig_algo_spec = algo_spec; - m_provider = provider; name = parse_and_deref_aliases(algo_spec); @@ -52,15 +50,7 @@ SCAN_Name::SCAN_Name(const std::string& algo_spec, throw Decoding_Error("Bad SCAN name " + algo_spec); } -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], m_provider); - } - -std::string SCAN_Name::arg_as_string(u32bit i) const +std::string SCAN_Name::arg(u32bit i) const { if(i > arg_count()) throw std::range_error("SCAN_Name::argument"); diff --git a/src/utils/scan_name.h b/src/utils/scan_name.h index b01411c94..4e391c37d 100644 --- a/src/utils/scan_name.h +++ b/src/utils/scan_name.h @@ -22,10 +22,8 @@ class SCAN_Name public: /** @param algo_spec A SCAN name - @param providers An optional provider name */ - SCAN_Name(const std::string& algo_spec, - const std::string& providers = ""); + SCAN_Name(const std::string& algo_spec); /** @return the original input string @@ -33,11 +31,6 @@ class SCAN_Name std::string as_string() const { return orig_algo_spec; } /** - @return the provider name (or empty) - */ - std::string provider() const { return m_provider; } - - /** @return the algorithm name */ std::string algo_name() const { return name[0]; } @@ -48,15 +41,6 @@ class SCAN_Name u32bit arg_count() const { return name.size() - 1; } /** - @param provider a provider name - @returns if this provider was allowed by the request - */ - bool provider_allowed(const std::string& provider) const - { - return (m_provider == "" || m_provider == provider); - } - - /** @return if the number of arguments is between lower and upper */ bool arg_count_between(u32bit lower, u32bit upper) const @@ -66,13 +50,7 @@ class SCAN_Name @param i which argument @return the ith argument */ - std::string arg_as_string(u32bit i) const; - - /** - @param i which argument - @return the ith argument - */ - SCAN_Name arg(u32bit i) const; + std::string arg(u32bit i) const; /** @param i which argument @@ -80,7 +58,7 @@ class SCAN_Name */ u32bit arg_as_u32bit(u32bit i, u32bit def_value) const; private: - std::string orig_algo_spec, m_provider; + std::string orig_algo_spec; std::vector<std::string> name; }; |