Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# KeosPlatformManager.h

Go to the documentation of this file.

    00001 /*
    00002  * This source file is part of KEOS (Free 3D Engine)
    00003  * For the latest info, see http://www.keosengine.org/
    00004  * E-mails : thierry.vouriot@keosengine.org, yeri@keosengine.org
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it under
    00007  * the terms of the GNU Lesser General Public License as published by the Free Software
    00008  * Foundation; either version 2 of the License, or (at your option) any later
    00009  * version.
    00010  *
    00011  * This program is distributed in the hope that it will be useful, but WITHOUT
    00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00013  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00014  *
    00015  * You should have received a copy of the GNU Lesser General Public License along with
    00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00017  * Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00018  * http://www.gnu.org/copyleft/lesser.txt.
    00019  *
    00020  */
    00021 #ifndef KEOS_PLATFORMMANAGER_H
    00022 #define KEOS_PLATFORMMANAGER_H
    00023
    00024 #include "KeosPrerequisites.h"
    00025 #include "KeosSingleton.h"
    00026
    00027 namespace Keos {
    00028
    00029         typedef void (*DLL_CREATETIMER)(CTimer** ppTimer);
    00030     typedef void (*DLL_CREATECONFIGDIALOG)(IConfigDialog** ppDlg);
    00031     typedef void (*DLL_CREATEERRORDIALOG)(IErrorDialog** ppDlg);
    00032
    00033     typedef void (*DLL_DESTROYTIMER)(CTimer* ppTimer);
    00034     typedef void (*DLL_DESTROYCONFIGDIALOG)(IConfigDialog* ppDlg);
    00035     typedef void (*DLL_DESTROYERRORDIALOG)(IErrorDialog* ppDlg);
    00036
    00037     //-----------------------------------------------------------------------
    00041     class KEOS_EXPORT CPlatformManager : public CSingleton<CPlatformManager>
    00042     {
    00043     friend CSingleton<CPlatformManager>;
    00044
    00045     protected:
    00046
    00047                 DLL_CREATETIMER m_pfCreateTimer;
    00048         DLL_CREATECONFIGDIALOG m_pfCreateConfigDialog;
    00049         DLL_CREATEERRORDIALOG m_pfCreateErrorDialog;
    00050
    00051         DLL_DESTROYTIMER m_pfDestroyTimer;
    00052         DLL_DESTROYCONFIGDIALOG m_pfDestroyConfigDialog;
    00053         DLL_DESTROYERRORDIALOG m_pfDestroyErrorDialog;
    00054
    00055     public:
    00058         CPlatformManager();
    00059
    00062                 CTimer* CreateTimer();
    00063
    00067         void DestroyTimer(CTimer* pTimer);
    00068
    00071         IConfigDialog* CreateConfigDialog();
    00072
    00076         void DestroyConfigDialog(IConfigDialog* pDlg);
    00077
    00080         IErrorDialog* CreateErrorDialog();
    00081
    00085         void DestroyErrorDialog(IErrorDialog* pDlg);
    00086     };
    00087
    00088 } // namespace Keos
    00089
    00090 #endif // KEOS_PLATFORMMANAGER_H