upgrade to glibmm 2.16

git-svn-id: svn://localhost/ardour2/branches/3.0@5303 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-07-02 13:12:38 +00:00
parent 5b97b13766
commit e916ac2821
211 changed files with 26478 additions and 4168 deletions

View file

@ -9,16 +9,16 @@
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
@ -28,8 +28,7 @@
#include <glibmm/ustring.h>
#include <glib/gdate.h>
#include <glib/gtypes.h>
#include <glib.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { struct tm; }
@ -100,18 +99,63 @@ enum DMY
static const Year BAD_YEAR = 0;
static const guint32 BAD_JULIAN = 0;
/** Construct an undefined date.
*/
Date();
/** Construct a date with the given day, month and year.
* @param day The day.
* @param month The month.
* @param year The year.
*/
Date(Day day, Month month, Year year);
/** Construct a date from a julian day.
* @param julian_day The julian day (guint32).
*/
explicit Date(guint32 julian_day);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
explicit Date(const GDate& castitem);
#endif
void clear();
/** Clear the date. The cleared dates will not represent an existing date, but will not contain garbage.
* @param month Month to set.
/** Construct a Glib::Date by copying the contents of a GDate.
* @param castitem The GDate.
*
* @newin2p18
*/
explicit Date(const GDate& castitem);
/** Construct a Glib::Date from another.
* @param other the other Glib::Date.
*
* @newin2p18
*/
Date(const Date& other);
/** Assign another date to this one. For example:
* @code
* ...
* Glib::Date my_date;
* my_date = other_date;
* @endcode
*
* @param other The other Glib::Date.
*
* @newin2p18
*/
Date& operator=(const Date& other);
/// Provides access to the underlying C instance.
GDate* gobj() { return &gobject_; }
/// Provides access to the underlying C instance.
const GDate* gobj() const { return &gobject_; }
private:
GDate gobject_;
public:
/** Clear the date. The cleared dates will not represent an existing date,
* but will not contain garbage.
*/
void clear();
/** Parses a user-inputted string str, and try to figure out what date it represents, taking the current locale into account. If the string is successfully parsed, the date will be valid after the call. Otherwise, it will be invalid.
* This function is not appropriate for file formats and the like; it isn't very precise, and its exact behavior varies with the locale. It's intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity).
@ -160,6 +204,8 @@ enum DMY
*/
void set_time(const GTimeVal& timeval);
/** Set this Glib::Date to the current time.
*/
void set_time_current();
/** Sets the month of the year. If the resulting day-month-year triplet is invalid, the date will be invalid.
@ -191,7 +237,6 @@ enum DMY
//TODO: Why return Date& (which is always *this) from these methods?
//Isn't it enough to also change the current instance?
//Maybe we need a copy constructor too.
//murrayc
/** Add a number of days to a Date.
@ -419,14 +464,6 @@ enum DMY
* @return true if the date is a valid one.
*/
static bool valid_dmy(Day day, Month month, Year year);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
GDate* gobj() { return &gobject_; }
const GDate* gobj() const { return &gobject_; }
#endif
private:
GDate gobject_;
};