~ubuntu-branches/ubuntu/vivid/ardour/vivid-proposed

« back to all changes in this revision

Viewing changes to libs/glibmm2/glibmm/error.h

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler, Jaromír Mikeš, Felipe Sateler
  • Date: 2014-05-22 14:39:25 UTC
  • mfrom: (29 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: package-import@ubuntu.com-20140522143925-vwqfo9287pmkrroe
Tags: 1:2.8.16+git20131003-3
* Team upload

[ Jaromír Mikeš ]
* Add -dbg package

[ Felipe Sateler ]
* Upload to experimental

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
#ifndef _GLIBMM_ERROR_H
 
3
#define _GLIBMM_ERROR_H
 
4
/* $Id$ */
 
5
 
 
6
/* Copyright 2002 The gtkmm Development Team
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Library General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Library General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Library General Public
 
19
 * License along with this library; if not, write to the Free
 
20
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
 */
 
22
 
 
23
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
24
extern "C" { typedef struct _GError GError; }
 
25
#endif
 
26
 
 
27
#include <glib/gquark.h>
 
28
#include <glibmm/exception.h>
 
29
 
 
30
 
 
31
namespace Glib
 
32
{
 
33
 
 
34
class Error : public Glib::Exception
 
35
{
 
36
public:
 
37
  Error();
 
38
  Error(GQuark domain, int code, const Glib::ustring& message);
 
39
  explicit Error(GError* gobject, bool take_copy = false);
 
40
 
 
41
  Error(const Error& other);
 
42
  Error& operator=(const Error& other);
 
43
 
 
44
  virtual ~Error() throw();
 
45
 
 
46
  GQuark domain() const;
 
47
  int code() const;
 
48
  virtual Glib::ustring what() const;
 
49
 
 
50
  bool matches(GQuark domain, int code) const;
 
51
 
 
52
  GError* gobj();
 
53
  const GError* gobj() const;
 
54
 
 
55
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
56
 
 
57
  void propagate(GError** dest);
 
58
 
 
59
  typedef void (* ThrowFunc) (GError*);
 
60
 
 
61
  static void register_init();
 
62
  static void register_cleanup();
 
63
  static void register_domain(GQuark domain, ThrowFunc throw_func);
 
64
 
 
65
  static void throw_exception(GError* gobject) G_GNUC_NORETURN;
 
66
 
 
67
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
68
 
 
69
protected:
 
70
  GError* gobject_;
 
71
};
 
72
 
 
73
} // namespace Glib
 
74
 
 
75
 
 
76
#endif /* _GLIBMM_ERROR_H */
 
77