#define hOutDebugNl(level,s) {if ((level) <= hDEBUG ) \
{std::cout << s;} \
else {}}
#define hOutDebug(level,s) hOutDebugNl(level, s << std::endl)
#define checkedConnect(button,slot) \
if ((button) != NULL ) { connect(button, SIGNAL(clicked()), this , SLOT(slot)) ;} else{};
#define mk_shared_ptr(p) class p ; typedef QSharedPointer p##Ptr;
#define mk_shared_constptr(p) class p ; typedef QSharedPointer p##ConstPtr;
class hsException : public std::exception
{
public:
hsException(std::string msg)
{
mWhat = msg.c_str();
}
virtual ~hsException() throw()
{
}
virtual const char* what() const throw()
{
return mWhat.c_str();
}
private:
std::string mWhat;
};
#endif /* HERCULESSTUDIO_H_ */