glibmm r605 - in trunk: . gio/src tools/m4



Author: murrayc
Date: Wed Feb 20 13:01:00 2008
New Revision: 605
URL: http://svn.gnome.org/viewvc/glibmm?rev=605&view=rev

Log:
2008-02-20  Murray Cumming  <murrayc murrayc com>

* tools/m4/convert_gio.m4:
* gio/src/file.hg: equal(), get_relative_file(), contains_file(): Take 
const File parameters.

Modified:
   trunk/ChangeLog
   trunk/gio/src/datainputstream.hg
   trunk/gio/src/file.hg
   trunk/gio/src/fileenumerator.hg
   trunk/tools/m4/convert_gio.m4

Modified: trunk/gio/src/datainputstream.hg
==============================================================================
--- trunk/gio/src/datainputstream.hg	(original)
+++ trunk/gio/src/datainputstream.hg	Wed Feb 20 13:01:00 2008
@@ -48,7 +48,6 @@
   _WRAP_METHOD(void set_newline_type(DataStreamNewlineType type), g_data_input_stream_set_newline_type)
   _WRAP_METHOD(DataStreamNewlineType get_newline_type() const, g_data_input_stream_get_newline_type)
 
-  //TODO: Make read_byte() const? Does it change some state/position?
   _WRAP_METHOD(guchar read_byte(const Glib::RefPtr<Cancellable>& cancellable), g_data_input_stream_read_byte, errthrow)
 
   /** non-cancellable version of read_byte()
@@ -69,6 +68,8 @@
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
   _WRAP_METHOD(guint16 read_uint16(const Glib::RefPtr<Cancellable>& cancellable), g_data_input_stream_read_uint16, errthrow)
+
+//TODO: Real documentation:
   /** non-cancellable version of read_uint16()
    */
 #ifdef GLIBMM_EXCEPTIONS_ENABLED

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Wed Feb 20 13:01:00 2008
@@ -134,7 +134,7 @@
   _WRAP_METHOD(guint hash() const, g_file_hash)
 
   //Not that the implementation of equal() is already virtual via equal_vfunc().
-  _WRAP_METHOD(bool equal(const Glib::RefPtr<File>& other) const, g_file_equal)
+  _WRAP_METHOD(bool equal(const Glib::RefPtr<const File>& other) const, g_file_equal)
 
   _WRAP_METHOD(std::string get_basename() const, g_file_get_basename)
   _WRAP_METHOD(std::string get_path() const, g_file_get_path)
@@ -157,9 +157,9 @@
                g_file_get_child_for_display_name,
                errthrow)
 
-  _WRAP_METHOD(bool contains_file(const Glib::RefPtr<File>& descendant) const,
+  _WRAP_METHOD(bool contains_file(const Glib::RefPtr<const File>& descendant) const,
                g_file_contains_file)
-  _WRAP_METHOD(std::string get_relative_path(const Glib::RefPtr<File>& descendant) const,
+  _WRAP_METHOD(std::string get_relative_path(const Glib::RefPtr<const File>& descendant) const,
                g_file_get_relative_path)
   _WRAP_METHOD(Glib::RefPtr<File> resolve_relative_path(const std::string& relative_path) const,
                g_file_resolve_relative_path)
@@ -1907,7 +1907,7 @@
 
   // *** vfuncs ***
 
-  _WRAP_VFUNC(Glib::RefPtr<File> dup(), "dup")
+  _WRAP_VFUNC(Glib::RefPtr<File> dup() const, "dup")
   _WRAP_VFUNC(guint hash() const, "hash")
   //TODO: equal() vfunc
 
@@ -1926,13 +1926,13 @@
 //               "get_child_for_display_name",
 //               errthrow)
 
-#m4 _CONVERSION(`GFile*',`const Glib::RefPtr<File>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GFile*',`const Glib::RefPtr<const File>&',`Glib::wrap($3, true)')
 
-  _WRAP_VFUNC(bool contains_file(const Glib::RefPtr<File>& descendant) const, "contains_file")
+  _WRAP_VFUNC(bool contains_file(const Glib::RefPtr<const File>& descendant) const, "contains_file")
 
-  _WRAP_VFUNC(std::string get_relative_path(const Glib::RefPtr<File>& descendant) const, "get_relative_path")
+  _WRAP_VFUNC(std::string get_relative_path(const Glib::RefPtr<const File>& descendant) const, "get_relative_path")
 
-  //TODO: Careful of refcounting:   _WRAP_VFUNC(Glib::RefPtr<File> resolve_relative_path(const std::string& relative_path) const, "resolve_relative_path")
+  //TODO: Careful of refcounting:   _WRAP_VFUNC(Glib::RefPtr<const File> resolve_relative_path(const std::string& relative_path) const, "resolve_relative_path")
 
   _WRAP_VFUNC(bool is_native() const, "is_native")
   _WRAP_VFUNC(bool has_uri_scheme(const std::string& uri_scheme) const, "has_uri_scheme")

Modified: trunk/gio/src/fileenumerator.hg
==============================================================================
--- trunk/gio/src/fileenumerator.hg	(original)
+++ trunk/gio/src/fileenumerator.hg	Wed Feb 20 13:01:00 2008
@@ -156,7 +156,7 @@
   _WRAP_METHOD(bool has_pending() const, g_file_enumerator_has_pending)
   _WRAP_METHOD(void set_pending(bool pending = true), g_file_enumerator_set_pending)
 
-  // TODO: vfuncs, non-cancellable overrides for generated methods.
+  // TODO: vfuncs
 };
 
 } // namespace Gio

Modified: trunk/tools/m4/convert_gio.m4
==============================================================================
--- trunk/tools/m4/convert_gio.m4	(original)
+++ trunk/tools/m4/convert_gio.m4	Wed Feb 20 13:01:00 2008
@@ -41,7 +41,8 @@
 # File
 _CONVERSION(`return-char*',`std::string',`Glib::convert_return_gchar_ptr_to_stdstring($3)')
 _CONVERSION(`Glib::RefPtr<File>',`GFile*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<File>&',`GFile*',__CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<File>&',`GFile*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const File>&',`GFile*',__CONVERT_CONST_REFPTR_TO_P)
 _CONVERSION(`GFile*',`Glib::RefPtr<File>',`Glib::wrap($3)')
 
 



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