#include <windows.h>
#include "sql.h"
#include "cmainwnd.h"
#include "cdatabase.h"
#include "coptions.h"

#ifndef __APPLICATIONCLASS
#define __APPLICATIONCLASS

class CApplication
{
	private:
		CDatabase* database;

	public:
		COptions *options;
		CMainWindow *mainWindow;
		HINSTANCE hInstance;
		HANDLE heap;

		bool Init();
		void Destroy();
		int WaitLoop();

		static int memory_error(size_t);//zavola sa pri zlyhani alokovania pamate
		static void abort();

		CDatabase* GetDatabase();

		CApplication();
		~CApplication();


};

#endif __APPLICATIONCLASS