1
0
Fork 0

Drop obsolete include files - no longer used anywhere.

There are replacements in simgear...
This commit is contained in:
ThorstenB 2011-11-13 16:56:05 +01:00
parent 318e7ac773
commit 1366336a87
2 changed files with 0 additions and 249 deletions

View file

@ -1,148 +0,0 @@
/**************************************************************************
* fg_callback.hxx -- Wrapper classes to treat function and method pointers
* as objects.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
**************************************************************************/
#ifndef _FG_CALLBACK_HXX
#define _FG_CALLBACK_HXX
/**
* Abstract base class for all FlightGear callbacks.
*/
class fgCallback
{
public:
/**
*
*/
virtual ~fgCallback() {}
/**
*
*/
virtual fgCallback* clone() const = 0;
/**
* Execute the callback function.
*/
virtual void operator()() = 0;
protected:
/**
*
*/
fgCallback() {}
private:
// Not implemented.
void operator=( const fgCallback& );
};
/**
* Callback for invoking a file scope function.
*/
template< typename Fun >
class fgFunctionCallback : public fgCallback
{
public:
/**
*
*/
fgFunctionCallback( const Fun& fun )
: fgCallback(), f_(fun) {}
fgCallback* clone() const
{
return new fgFunctionCallback( *this );
}
void operator()() { f_(); }
private:
// Not defined.
fgFunctionCallback();
private:
Fun f_;
};
/**
* Callback for invoking a member function.
*/
template< class ObjPtr, typename MemFn >
class fgMethodCallback : public fgCallback
{
public:
/**
*
*/
fgMethodCallback( const ObjPtr& pObj, MemFn pMemFn )
: fgCallback(),
pObj_(pObj),
pMemFn_(pMemFn)
{
}
/**
*
*/
fgCallback* clone() const
{
return new fgMethodCallback( *this );
}
/**
*
*/
void operator()()
{
((*pObj_).*pMemFn_)();
}
private:
// Not defined.
fgMethodCallback();
private:
ObjPtr pObj_;
MemFn pMemFn_;
};
/**
* Helper template functions.
*/
template< typename Fun >
fgCallback*
make_callback( const Fun& fun )
{
return new fgFunctionCallback<Fun>(fun);
}
template< class ObjPtr, typename MemFn >
fgCallback*
make_callback( const ObjPtr& pObj, MemFn pMemFn )
{
return new fgMethodCallback<ObjPtr,MemFn>(pObj, pMemFn );
}
#endif // _FG_CALLBACK_HXX

View file

@ -1,101 +0,0 @@
/*
// Alterations: Copyright C. Hotchkiss 1996
//
// $Log$
// Revision 1.2 2010/01/23 22:26:52 fredb
// MINGW patch from Benoît Laniel
//
// Revision 1.1.1.1 2002-09-10 01:14:04 curt
// Initial revision of FlightGear-0.9.0
//
// Revision 1.2 2001/05/16 21:27:59 curt
// Added David Megginson's patch for reconfigurable keyboard bindings.
//
// Revision 1.1.1.1 1999/06/17 18:07:30 curt
// Start of 0.7.x branch
//
// Revision 1.2 1999/04/22 18:45:42 curt
// Borland tweaks.
//
// Revision 1.1.1.1 1999/04/05 21:32:40 curt
// Start of 0.6.x branch.
//
// Revision 1.2 1998/05/13 18:23:46 curt
// fg_typedefs.h: updated version by Charlie Hotchkiss
// general.h: moved fg_root info to fgOPTIONS structure.
//
// Revision 1.1 1998/05/11 18:26:12 curt
// Initial revision.
//
// Rev 1.4 11 Nov 1997 15:34:28 CHOTCHKISS
// Expanded definitions.
//
// Rev 1.3 20 Jan 1997 9:21:26 CHOTCHKISS
// Minor additions.
//
// Rev 1.2 12 Nov 1996 15:06:52 CHOTCHKISS
// Dropped PC Write print format control lines.
//
// Rev 1.1 20 Nov 1995 15:59:02 CHOTCHKISS
// Additions and improvements. Memcheck compatibilities.
//
// Rev 1.0 06 Apr 1995 14:00:32 CHOTCHKISS
// Initial revision.

*/
/*
// TYPEDEFS.H - General purpose definition file
// Copyright (C) 1992 Paradigm Systems. All rights reserved.
//
// Function
// ========
// This file contains the general purpose definitions common to the
// all Paradigm applications. By defining synonyms for the physical
// data types to be manipulated, portability between memory models
// and machines is maximized.
//
// Note that this file follows the system include files and before
// any application include files.
*/
#ifndef _FG_TYPEDEFS
#define _FG_TYPEDEFS
//
// Define the types to be used to manipulate 8-, 16-, and 32-bit
// data.
//
typedef unsigned int BIT ; // Use for defining Borland bit fields
typedef char CHAR ; // 8-bit signed data
typedef const char COCHAR;
typedef unsigned char UCHAR ; // 8-bit unsigned data
typedef unsigned char BYTE;
typedef int INT ; // 16-bit signed data
typedef unsigned int UINT ; // 16-bit unsigned data
typedef const int COINT; // 16=bit constant int
typedef const UINT COUINT;
typedef long LONG ; // 32-bit signed data
typedef unsigned long ULONG ; // 32-bit unsigned data
typedef unsigned short UWORD; // Unsigned 16 bit quantity (WIN=SHORT)
#ifndef _WIN32
typedef signed short WORD; // Signed 16 bit quantity
#endif
typedef BYTE UBYTE; // Used in some 3rd party code
#ifndef _WIN32
typedef int BOOLEAN; //
#endif
typedef float FLOAT ; // 32-bit floating point data
typedef double DOUBLE ; // 64-bit floating point data
typedef long double LDOUBLE ; // 80-bit floating point data
typedef void(*VFNPTR) ( void );
typedef void(*VFNINTPTR)( int );
typedef int (*FNPTR) ( void );
typedef int (*FNINTPTR) ( int );
typedef int (*FNUIPTR) ( UINT );
typedef double( *DBLFNPTR)( void );
typedef float( *FLTFNPTR)( void );
#endif // _FG_TYPEDEFS