summaryrefslogtreecommitdiff
path: root/glib/src/datetime.hg
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2011-06-16 12:07:28 -0400
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2011-06-16 12:07:28 -0400
commita56a1c0855c22b3618586734131b282a1d813d88 (patch)
treee3fcafd151461178556b8ce547edac827248dc27 /glib/src/datetime.hg
parent9bd7541d3feffacd0c732ed93123ce11547009d4 (diff)
downloadglibmm-a56a1c0855c22b3618586734131b282a1d813d88.tar.gz
DateTime, TimeZone: Use classes without Glib::RefPt<>.
* glib/src/datetime.hg: * glib/src/timezone.hg: Since these classes are immutable (like Glib::VariantBase), remove the need to use these classes with Glib::RefPtr<> by using the _CLASS_OPAQUE_COPYABLE macro instead of the _CLASS_OPAQUE_REFCOUNTED macro. This should make using the classes a little less tedious. * tools/m4/convert_glib.m4: Modify the corresponding conversions according to the above.
Diffstat (limited to 'glib/src/datetime.hg')
-rw-r--r--glib/src/datetime.hg52
1 files changed, 26 insertions, 26 deletions
diff --git a/glib/src/datetime.hg b/glib/src/datetime.hg
index 8717ae51..6b5c62f1 100644
--- a/glib/src/datetime.hg
+++ b/glib/src/datetime.hg
@@ -63,38 +63,38 @@ typedef GTimeSpan TimeSpan;
*/
class DateTime
{
- _CLASS_OPAQUE_REFCOUNTED(DateTime, GDateTime, NONE, g_date_time_ref, g_date_time_unref)
+ _CLASS_OPAQUE_COPYABLE(DateTime, GDateTime, NONE, g_date_time_ref, g_date_time_unref)
_IGNORE(g_date_time_ref, g_date_time_unref)
public:
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now(const Glib::RefPtr<const TimeZone>& tz), g_date_time_new_now)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_local(), g_date_time_new_now_local)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_utc(), g_date_time_new_now_utc)
+ _WRAP_METHOD(static DateTime create_now(const TimeZone& tz), g_date_time_new_now)
+ _WRAP_METHOD(static DateTime create_now_local(), g_date_time_new_now_local)
+ _WRAP_METHOD(static DateTime create_now_utc(), g_date_time_new_now_utc)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_local(gint64 t), g_date_time_new_from_unix_local)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_utc(gint64 t), g_date_time_new_from_unix_utc)
+ _WRAP_METHOD(static DateTime create_now_local(gint64 t), g_date_time_new_from_unix_local)
+ _WRAP_METHOD(static DateTime create_now_utc(gint64 t), g_date_time_new_from_unix_utc)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_local(const TimeVal& tv), g_date_time_new_from_timeval_local)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_now_utc(const TimeVal& tv), g_date_time_new_from_timeval_utc)
+ _WRAP_METHOD(static DateTime create_now_local(const TimeVal& tv), g_date_time_new_from_timeval_local)
+ _WRAP_METHOD(static DateTime create_now_utc(const TimeVal& tv), g_date_time_new_from_timeval_utc)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create(const Glib::RefPtr<const TimeZone>& tz, int year, int month, int day, int hour, int minute, double seconds), g_date_time_new)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_local(int year, int month, int day, int hour, int minute, double seconds), g_date_time_new_local)
- _WRAP_METHOD(static Glib::RefPtr<DateTime> create_utc(int year, int month, int day, int hour, int minute, double seconds), g_date_time_new_utc)
+ _WRAP_METHOD(static DateTime create(const TimeZone& tz, int year, int month, int day, int hour, int minute, double seconds), g_date_time_new)
+ _WRAP_METHOD(static DateTime create_local(int year, int month, int day, int hour, int minute, double seconds), g_date_time_new_local)
+ _WRAP_METHOD(static DateTime create_utc(int year, int month, int day, int hour, int minute, double seconds), g_date_time_new_utc)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add(TimeSpan timespan) const, g_date_time_add)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_years(int years) const, g_date_time_add_years)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_months(int months) const, g_date_time_add_months)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_weeks(int weeks) const, g_date_time_add_weeks)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_days(int days) const, g_date_time_add_days)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_hours(int hours) const, g_date_time_add_hours)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_minutes(int minutes) const, g_date_time_add_minutes)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_seconds(double seconds) const, g_date_time_add_seconds)
- _WRAP_METHOD(Glib::RefPtr<DateTime> add_full(int years, int months, int days, int hours, int minutes, double seconds) const, g_date_time_add_full)
- _WRAP_METHOD(TimeSpan difference(const Glib::RefPtr<const DateTime>& other) const, g_date_time_difference)
+ _WRAP_METHOD(DateTime add(TimeSpan timespan) const, g_date_time_add)
+ _WRAP_METHOD(DateTime add_years(int years) const, g_date_time_add_years)
+ _WRAP_METHOD(DateTime add_months(int months) const, g_date_time_add_months)
+ _WRAP_METHOD(DateTime add_weeks(int weeks) const, g_date_time_add_weeks)
+ _WRAP_METHOD(DateTime add_days(int days) const, g_date_time_add_days)
+ _WRAP_METHOD(DateTime add_hours(int hours) const, g_date_time_add_hours)
+ _WRAP_METHOD(DateTime add_minutes(int minutes) const, g_date_time_add_minutes)
+ _WRAP_METHOD(DateTime add_seconds(double seconds) const, g_date_time_add_seconds)
+ _WRAP_METHOD(DateTime add_full(int years, int months, int days, int hours, int minutes, double seconds) const, g_date_time_add_full)
+ _WRAP_METHOD(TimeSpan difference(const DateTime& other) const, g_date_time_difference)
- _WRAP_METHOD(int compare(const Glib::RefPtr<const DateTime>& other) const, g_date_time_compare)
+ _WRAP_METHOD(int compare(const DateTime& other) const, g_date_time_compare)
_WRAP_METHOD(guint hash() const, g_date_time_hash)
- _WRAP_METHOD(bool equal(const Glib::RefPtr<const DateTime>& other) const, g_date_time_equal)
+ _WRAP_METHOD(bool equal(const DateTime& other) const, g_date_time_equal)
_WRAP_METHOD(void get_ymd(int& year, int& month, int& day) const, g_date_time_get_ymd)
_WRAP_METHOD(int get_year() const, g_date_time_get_year)
@@ -114,9 +114,9 @@ public:
_WRAP_METHOD(TimeSpan get_utc_offset() const, g_date_time_get_utc_offset)
_WRAP_METHOD(Glib::ustring get_timezone_abbreviation() const, g_date_time_get_timezone_abbreviation)
_WRAP_METHOD(bool is_daylight_savings() const, g_date_time_is_daylight_savings)
- _WRAP_METHOD(Glib::RefPtr<DateTime> to_timezone(const Glib::RefPtr<const TimeZone>& tz) const, g_date_time_to_timezone)
- _WRAP_METHOD(Glib::RefPtr<DateTime> to_local() const, g_date_time_to_local)
- _WRAP_METHOD(Glib::RefPtr<DateTime> to_utc() const, g_date_time_to_utc)
+ _WRAP_METHOD(DateTime to_timezone(const TimeZone& tz) const, g_date_time_to_timezone)
+ _WRAP_METHOD(DateTime to_local() const, g_date_time_to_local)
+ _WRAP_METHOD(DateTime to_utc() const, g_date_time_to_utc)
_WRAP_METHOD(Glib::ustring format(const Glib::ustring& format) const, g_date_time_format)
};