[glibmm] SArray: Deprecate this and remove ifdef0-ed code.



commit 67f41eef515326268c576ec5cfd56c40c726ddf1
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jun 29 08:42:36 2015 +0200

    SArray: Deprecate this and remove ifdef0-ed code.
    
    Nothing seems to use this anymore, so it seems safe to deprecate it.

 glib/glibmm/sarray.cc |   61 -------------------------------------
 glib/glibmm/sarray.h  |   80 ++++--------------------------------------------
 2 files changed, 7 insertions(+), 134 deletions(-)
---
diff --git a/glib/glibmm/sarray.cc b/glib/glibmm/sarray.cc
index 2d7c682..a7d6e31 100644
--- a/glib/glibmm/sarray.cc
+++ b/glib/glibmm/sarray.cc
@@ -21,65 +21,4 @@
  */
 
 #include <glibmm/sarray.h>
-/*
-namespace Glib
-{
 
-SArray::SArray(const SArray& src)
-: type_base(src)
-{
-}
-
-SArray::SArray(const T_c* pValues, size_type size)
-: type_base(pValues, size)
-{
-}
-
-SArray::operator std::vector<nstring>() const
-{
-  return std::vector<nstring>(begin(), end());
-}
-
-SArray::operator std::vector<ustring>() const
-{
-  return std::vector<ustring>(begin(), end());
-}
-
-SArray::operator std::vector<std::string>() const
-{
-  return std::vector<std::string>(begin(), end());
-}
-
-
-SArray::operator std::deque<nstring>() const
-{
-  return std::deque<nstring>(begin(), end());
-}
-
-SArray::operator std::deque<ustring>() const
-{
-  return std::deque<ustring>(begin(), end());
-}
-
-SArray::operator std::deque<std::string>() const
-{
-  return std::deque<std::string>(begin(), end());
-}
-
-SArray::operator std::list<nstring>() const
-{
-  return std::list<nstring>(begin(), end());
-}
-
-SArray::operator std::list<ustring>() const
-{
-  return std::list<ustring>(begin(), end());
-}
-
-SArray::operator std::list<std::string>() const
-{
-  return std::list<std::string>(begin(), end());
-}
-
-}; // namespace Glib
-*/
diff --git a/glib/glibmm/sarray.h b/glib/glibmm/sarray.h
index 4f7e474..6226f50 100644
--- a/glib/glibmm/sarray.h
+++ b/glib/glibmm/sarray.h
@@ -23,86 +23,20 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-
+#ifndef GLIBMM_DISABLE_DEPRECATED
 #include <glibmm/arrayhandle.h>
 #include <glibmm/ustring.h>
 
-namespace Glib { typedef Glib::ArrayHandle<Glib::ustring> SArray; }
-
-#if 0
-
-namespace Glib
-{
-
-template <>
-inline void cpp_type_to_c_type(const ustring& cpp_value, type_constpch& ref_c_value)
-{
-  ref_c_value = cpp_value.c_str();
-}
-
-template <>
-inline void cpp_type_to_c_type(const std::string& cpp_value, type_constpch& ref_c_value)
-{
-  ref_c_value = cpp_value.c_str();
-}
-
-typedef Array<Glib::ustring, const char*> SArray;
-
-/*
-class SArray: public Array<nstring, const char*>
-{
-public:
-  typedef const char* T_c;
-  typedef Array<nstring, const char*> type_base;
-
-  SArray(const SArray& src);
-
-  // copy other containers
-  template <typename T_container>
-  SArray(const T_container& t)
-  {
-    owned_ = Array_Helpers::Traits<T_container, pointer>::get_owned();
-    size_ = Array_Helpers::Traits<T_container, pointer>::get_size(t);
-    pData_ = Array_Helpers::Traits<T_container, pointer>::get_data(t);
-  }
-
-  SArray(const T_c* pValues, size_type size);
-
-  // copy a sequence
-  template <typename Iterator>
-  SArray(Iterator b, Iterator e);
-
-  operator std::vector<nstring>() const;
-  operator std::vector<ustring>() const;
-  operator std::vector<std::string>() const;
-
-  operator std::deque<nstring>() const;
-  operator std::deque<ustring>() const;
-  operator std::deque<std::string>() const;
-
-  operator std::list<nstring>() const;
-  operator std::list<ustring>() const;
-  operator std::list<std::string>() const;
-};
-
-
-//template <typename T_container>
-//SArray::SArray(const T_container& t)
-//: type_base(t)
-//{
-//}
+namespace Glib {
 
+/**
+ * @deprecated Use a std::vector instead.
+ */
+typedef Glib::ArrayHandle<Glib::ustring> SArray;
 
-template <typename Iterator>
-SArray::SArray(Iterator b, Iterator e)
-: type_base(b, e)
-{
 }
-*/
-
-} // namespace Glib
 
-#endif /* #if 0 */
+#endif //GLIBMM_DISABLE_DEPRECATED
 
 #endif // _GLIBMM_SARRAY_H
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]