aux.h 572 Bytes
#ifndef AUX_H
#define AUX_H

#include <sstream>
#include <iostream>
#include <exception>

#include <stdlib.h>
#include <stdio.h>
#include <signal.h>

using namespace std;

extern char *servicename;

int str2int(string str);
string int2str(int x);
int exec(string cmd, string *output);
void timer_handler (int signum);

class integerConversionException : public exception
{
	private:
		string s;
	public:
		integerConversionException(std::string ss) : s(ss) {}
		~integerConversionException() throw () {}
		const char* what() const throw() { return s.c_str(); }
};

#endif