Debian Codegraph @

HercStudio/HerculesStudio.h

raw symbols SCIP
1 /*
2 * File: HerculesStudio.h
3 *
4 * Author: Jacob Dekel
5 * Created on: Aug 7, 2009
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id: HerculesStudio.h 170 2012-12-17 07:45:20Z dekeljacob $
9 *
10 * a collection of product-wide definitions
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26
27 #ifndef HERCULESSTUDIO_H_
28 #define HERCULESSTUDIO_H_
29
30 #include <qglobal.h>
31 #include <QSharedPointer>
32 #ifndef HS_BUILD_ID
33 #define HS_BUILD_ID "Unknown"
34 #endif
35 #define HERCSTUDIO_VERSION "Version: 1.5.0"
36 #define HERCSTUDIO_REVISION "$Revision$"
37 #define hDEBUG 0
38 #define UNISTD_INC
39 #ifdef Q_WS_WIN
40 #define hFramework
41 #define hCRLF
42 #undef UNISTD_INC
43 #endif
44 #include <iostream>
45
46 #define hOutDebugNl(level,s) {if ((level) <= hDEBUG ) \
47 {std::cout << s;} \
48 else {}}
49 #define hOutDebug(level,s) hOutDebugNl(level, s << std::endl)
50
51 #define checkedConnect(button,slot) \
52 if ((button) != NULL ) { connect(button, SIGNAL(clicked()), this , SLOT(slot)) ;} else{};
53
54 #define mk_shared_ptr(p) class p ; typedef QSharedPointer<p> p##Ptr;
55 #define mk_shared_constptr(p) class p ; typedef QSharedPointer<const p> p##ConstPtr;
56
57 class hsException : public std::exception
58 {
59 public:
60 hsException(std::string msg)
61 {
62 mWhat = msg.c_str();
63 }
64 virtual ~hsException() throw()
65 {
66
67 }
68 virtual const char* what() const throw()
69 {
70 return mWhat.c_str();
71 }
72 private:
73 std::string mWhat;
74 };
75
76 #endif /* HERCULESSTUDIO_H_ */