[libchamplainmm] TileSource: complete implementation



commit bc367dad6af3ab0dbdff9b06d239a36ebd3d69c5
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Fri Aug 1 22:18:03 2014 +0200

    TileSource: complete implementation
    
        * champlain/src/tile-source.hg: Add get_cache() method and
        "cache" property.
        * tools/m4/convert_libchamplain.m4: Add conversion for
        ChamplainTileCache.

 champlain/src/tile-source.hg     |    8 ++++----
 tools/m4/convert_libchamplain.m4 |    3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/champlain/src/tile-source.hg b/champlain/src/tile-source.hg
index cebb552..d3a458f 100644
--- a/champlain/src/tile-source.hg
+++ b/champlain/src/tile-source.hg
@@ -17,7 +17,7 @@
  */
 
 #include <champlainmm/map-source.h>
-//#include <champlainmm/tile-cache.h>
+#include <champlainmm/tile-cache.h>
 
 _DEFS(champlainmm,champlain)
 _PINCLUDE(champlainmm/private/map-source_p.h)
@@ -39,8 +39,8 @@ class TileSource : public MapSource
 protected:
 
 public:
-//  _WRAP_METHOD(Glib::RefPtr<TileCache> get_cache(), champlain_tile_source_get_cache)
-//  _WRAP_METHOD(Glib::RefPtr<const TileCache> get_cache() const, champlain_tile_source_get_cache, 
constversion)
+  _WRAP_METHOD(Glib::RefPtr<TileCache> get_cache(), champlain_tile_source_get_cache)
+  _WRAP_METHOD(Glib::RefPtr<const TileCache> get_cache() const, champlain_tile_source_get_cache, 
constversion)
 
   _WRAP_METHOD(void set_id(const std::string& id), champlain_tile_source_set_id)
   _WRAP_METHOD(void set_name(const Glib::ustring& name), champlain_tile_source_set_name)
@@ -62,7 +62,7 @@ public:
   _WRAP_PROPERTY("max-zoom-level", guint)
   _WRAP_PROPERTY("tile-size", guint)
   _WRAP_PROPERTY("projection", MapProjection)
-//  _WRAP_PROPERTY("cache", Glib::RefPtr<TileCache>)
+  _WRAP_PROPERTY("cache", Glib::RefPtr<TileCache>)
 };
 
 } // namespace Champlain
diff --git a/tools/m4/convert_libchamplain.m4 b/tools/m4/convert_libchamplain.m4
index fdeb40c..6da1dec 100644
--- a/tools/m4/convert_libchamplain.m4
+++ b/tools/m4/convert_libchamplain.m4
@@ -68,6 +68,9 @@ _CONVERSION(`ChamplainTile*',`Glib::RefPtr<Tile>',`Glib::wrap($3)')
 _CONVERSION(`ChamplainTile*',`Glib::RefPtr<const Tile>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Tile>&',`ChamplainTile*',__CONVERT_REFPTR_TO_P($3))
 
+# TileCache
+_CONVERSION(`ChamplainTileCache*',`Glib::RefPtr<TileCache>',`Glib::wrap($3)')
+
 # View
 _CONVERSION(`const Glib::RefPtr<View>&',`ChamplainView*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`ChamplainView*',`const Glib::RefPtr<View>&',`Glib::wrap($3)')


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