wxWidgets/include/wx/module.h
Karsten Ballüder c801d85f15 Initial revision
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-05-20 14:01:55 +00:00

50 lines
1.1 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: module.h
// Purpose: Modules handling
// Author: Wolfram Gloger/adapted by Guilhem Lavaux
// Modified by:
// Created: 04/11/98
// RCS-ID: $Id$
// Copyright: (c) Wolfram Gloger and Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __MODULEH__
#define __MODULEH__
#ifdef __GNUG__
#pragma interface "module.h"
#endif
#include "wx/object.h"
#include "wx/list.h"
#include "wx/setup.h"
class WXDLLEXPORT wxModule: public wxObject
{
public:
wxModule(void) {}
~wxModule(void) {}
// If returns FALSE, quits the application immediately.
bool Init(void) { return OnInit(); }
void Exit(void) { OnExit(); }
// Override both of these
virtual bool OnInit(void) = 0;
virtual void OnExit(void) = 0;
static void RegisterModule(wxModule* module);
static bool RegisterModules(void);
static bool InitializeModules(void);
static void CleanUpModules(void);
protected:
static wxList m_modules;
DECLARE_CLASS(wxModule)
};
#endif