Binding.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
00004  *       mailto: <tevs@mpi-sb.mpg.de>                                      *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  ***************************************************************************/
00012 
00013 #ifndef __BINDINGS_PLUGIN_H_
00014 #define __BINDINGS_PLUGIN_H_
00015 
00016 //----------------------------------------------------------------------------------
00017 // Includes
00018 //----------------------------------------------------------------------------------
00019 #include "Prerequisities.h"
00020 
00021 //----------------------------------------------------------------------------------
00022 // Redefine Export/Import Macros for win32 systems
00023 //----------------------------------------------------------------------------------
00024 #define _NRBindingExport
00025 
00026 #if NR_PLATFORM == NR_PLATFORM_WIN32
00027 
00028 // first we define our own export/import macro
00029 #if defined (BUILD_PLUGIN) || defined (BUILD_BINDING)
00030 #   undef _NRBindingExport
00031 #       define _NRBindingExport __declspec( dllexport )
00032 #endif
00033 //#if defined (BUILD_BINDING)
00034 //#   undef _NRBindingExport
00035 //#     define _NRBindingExport
00036 //#endif
00037 
00038 
00039 // if we built a binding, so we should import from engine's main dll
00040 #if defined (BUILD_BINDING) || defined (BUILD_PLUGIN)
00041 #   undef _NRExport
00042 #       define _NRExport __declspec( dllimport )
00043 #endif
00044 
00045 #endif
00046 
00047 
00048 //----------------------------------------------------------------------------------
00049 // Namespaces and classes
00050 //----------------------------------------------------------------------------------
00051 namespace nrEngine {
00052 
00053         //! Binding abstract classes for the engine
00054         /**
00055          * Bindings are loadtime plugins provide to the engine
00056          * new functionality. They do not linked within the engine library
00057          * but with application written for the engine.
00058          *
00059          * This is an abstract class providing some default methods
00060          * which has to be overwritten by the binding. Later on we could
00061          * create a binding manager, so it could initialize the bindings
00062          * by user wish.
00063          *
00064          * \ingroup plugin
00065          **/
00066         class _NRBindingExport Binding{
00067                 public:
00068 
00069                         //! Initialize the binding and its subsystems
00070                         Binding() {}
00071 
00072                         //! Release used memory and close binded subsystem
00073                         virtual ~Binding() {}
00074 
00075                         //! Get the name of the binding
00076                         virtual const std::string& getName() = 0;
00077 
00078                         //! Get a full name including authors, version,... strings of the bindings
00079                         virtual const std::string& getFullName() = 0;
00080 
00081         };
00082 
00083 };
00084 
00085 #endif
00086 

Generated on Wed Sep 12 23:19:42 2007 for nrEngine by  doxygen 1.5.1