diff --git a/CMakeLists.txt b/CMakeLists.txt index b3a4bb9..9079192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,6 @@ set(HEADER_FILES conversion/stringconversion.h conversion/stringbuilder.h conversion/types.h - conversion/widen.h io/ansiescapecodes.h io/binaryreader.h io/binarywriter.h diff --git a/conversion/widen.h b/conversion/widen.h deleted file mode 100644 index 89c6c06..0000000 --- a/conversion/widen.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef CONVERSION_UTILITIES_WIDEN_H -#define CONVERSION_UTILITIES_WIDEN_H - -#include "../global.h" - -#include -#include -#include -#include -#include - -namespace ConversionUtilities { - -/*! - * \brief Converts a std::string to a wide string using the specified locale. - * \deprecated Might be removed in future release because not used anymore. Use iconv based string converion functions instead. - */ -template , class A = std::allocator> -class CPP_UTILITIES_EXPORT Widen : public std::unary_function> { -public: - /*! - * \brief Constructs a new instance with the specified \a locale. - */ - Widen(const std::locale &locale = std::locale()) - : m_loc(locale) - , m_pctype(&std::use_facet>(locale)) - { - } - - Widen(const Widen &) = delete; - Widen &operator=(const Widen &) = delete; - - /*! - * \brief Performs the conversation for the provided \a string. - */ - std::basic_string operator()(const std::string &string) const - { - typename std::basic_string::size_type srcLen = string.length(); - const char *srcBeg = string.c_str(); - std::vector tmp(srcLen); - m_pctype->widen(srcBeg, srcBeg + srcLen, &tmp[0]); - return std::basic_string(&tmp[0], srcLen); - } - -private: - std::locale m_loc; - const std::ctype *m_pctype; -}; -} // namespace ConversionUtilities - -#endif // CONVERSION_UTILITIES_WIDEN_H