[libchamplainmm] MapSourceDesc: Convert from Boxed to Object
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplainmm] MapSourceDesc: Convert from Boxed to Object
- Date: Wed, 26 Feb 2014 19:04:24 +0000 (UTC)
commit e53c55a67626e8335c5b2c918aa0eef89a64de19
Author: Juan R. GarcĂa Blanco <juanrgar gmail com>
Date: Mon Feb 24 00:19:58 2014 +0100
MapSourceDesc: Convert from Boxed to Object
* Make MapSourceDesc a proper Object.
libchamplain/src/map-source-desc.ccg | 67 ----------------------------------
libchamplain/src/map-source-desc.hg | 33 +++++++----------
2 files changed, 13 insertions(+), 87 deletions(-)
---
diff --git a/libchamplain/src/map-source-desc.ccg b/libchamplain/src/map-source-desc.ccg
index f9380cf..7acff57 100644
--- a/libchamplain/src/map-source-desc.ccg
+++ b/libchamplain/src/map-source-desc.ccg
@@ -18,71 +18,4 @@
namespace Champlain
{
-
-std::string
-MapSourceDesc::get_id() const
-{
- return std::string(gobject_->id);
-}
-
-Glib::ustring
-MapSourceDesc::get_name() const
-{
- return Glib::ustring(gobject_->name);
-}
-
-Glib::ustring
-MapSourceDesc::get_license() const
-{
- return Glib::ustring(gobject_->license);
-}
-
-Glib::ustring
-MapSourceDesc::get_license_uri() const
-{
- return Glib::ustring(gobject_->license_uri);
-}
-
-guint
-MapSourceDesc::get_max_zoom_level() const
-{
- return gobject_->max_zoom_level;
-}
-
-guint
-MapSourceDesc::get_min_zoom_level() const
-{
- return gobject_->min_zoom_level;
-}
-
-MapProjection
-MapSourceDesc::get_projection() const
-{
- return static_cast<MapProjection>(gobject_->projection);
-}
-
-Glib::ustring
-MapSourceDesc::get_uri_format() const
-{
- return Glib::ustring(gobject_->uri_format);
-}
-
-void
-MapSourceDesc::set_max_zoom_level(guint max_zoom_level)
-{
- gobject_->max_zoom_level = max_zoom_level;
-}
-
-void
-MapSourceDesc::set_min_zoom_level(guint min_zoom_level)
-{
- gobject_->min_zoom_level = min_zoom_level;
-}
-
-void
-MapSourceDesc::set_projection(MapProjection projection)
-{
- gobject_->projection = static_cast<ChamplainMapProjection>(projection);
-}
-
} // namespace Champlain
diff --git a/libchamplain/src/map-source-desc.hg b/libchamplain/src/map-source-desc.hg
index b23959d..e582c32 100644
--- a/libchamplain/src/map-source-desc.hg
+++ b/libchamplain/src/map-source-desc.hg
@@ -17,35 +17,28 @@
*/
#include <string>
-#include <glibmm.h>
-#include <libchamplainmm/map-source.h>
+#include <glibmm/object.h>
+#include <champlain/champlain.h>
_DEFS(libchamplainmm,libchamplain)
-
-_CC_INCLUDE(champlain/champlain.h)
+_PINCLUDE(glibmm/private/object_p.h)
namespace Champlain
{
-class MapSourceDesc
+class MapSourceDesc : public Glib::Object
{
- _CLASS_BOXEDTYPE(MapSourceDesc, ChamplainMapSourceDesc,
- champlain_map_source_desc_new,
- champlain_map_source_desc_copy,
- champlain_map_source_desc_free)
+ _CLASS_GOBJECT(MapSourceDesc, ChamplainMapSourceDesc, CHAMPLAIN_MAP_SOURCE_DESC, Glib::Object, GObject)
public:
- std::string get_id() const;
- Glib::ustring get_name() const;
- Glib::ustring get_license() const;
- Glib::ustring get_license_uri() const;
- guint get_max_zoom_level() const;
- guint get_min_zoom_level() const;
- MapProjection get_projection() const;
- Glib::ustring get_uri_format() const;
- void set_max_zoom_level(guint max_zoom_level);
- void set_min_zoom_level(guint min_zoom_level);
- void set_projection(MapProjection projection);
+ _WRAP_METHOD(std::string get_id() const, champlain_map_source_desc_get_id)
+ _WRAP_METHOD(Glib::ustring get_name() const, champlain_map_source_desc_get_name)
+ _WRAP_METHOD(Glib::ustring get_license() const, champlain_map_source_desc_get_license)
+ _WRAP_METHOD(Glib::ustring get_license_uri() const, champlain_map_source_desc_get_license_uri)
+ _WRAP_METHOD(guint get_max_zoom_level() const, champlain_map_source_desc_get_max_zoom_level)
+ _WRAP_METHOD(guint get_min_zoom_level() const, champlain_map_source_desc_get_min_zoom_level)
+ _WRAP_METHOD(MapProjection get_projection() const, champlain_map_source_desc_get_projection)
+ _WRAP_METHOD(Glib::ustring get_uri_format() const, champlain_map_source_desc_get_uri_format)
};
} // namespace Champlain
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]