sigx++
2.0.1
Main Page
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
sigx
bad_dispatcher.h
Go to the documentation of this file.
1
#ifndef _SIGX_BAD_DISPATCHER_HPP_
2
#define _SIGX_BAD_DISPATCHER_HPP_
3
4
/*
5
* Copyright 2006 Klaus Triendl
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
11
*
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
16
*
17
* You should have received a copy of the GNU Library General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, 51 Franklin Street, Fifth Floor,
20
* Boston, MA 02110-1301, USA.
21
*/
22
23
#include <exception>
24
25
26
namespace
sigx
27
{
28
29
class
bad_dispatcher
:
public
std::exception
//, public operator_new
30
{
31
public
:
32
bad_dispatcher
(): std::exception()
33
{}
34
35
// virtuals from std::exception
36
virtual
const
char
*
what
()
const
throw();
37
};
38
39
43
template<typename T_return>
44
struct
bad_dispatcher_catcher
45
{
46
T_return operator ()()
const
47
{
48
try
49
{
throw
; }
50
catch
(const ::sigx::bad_dispatcher&)
51
{}
52
return
T_return();
53
}
54
};
55
56
57
}
// namespace sigx
58
59
60
#endif // end file guard
Generated on Fri Oct 25 2013 11:35:30 for sigx++ by
1.8.4