source: nrEngine/include/Binding.h @ 1

Revision 1, 2.9 KB checked in by art, 13 years ago (diff)
Line 
1/***************************************************************************
2 *                                                                         *
3 *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
4 *       mailto: <tevs@mpi-sb.mpg.de>                                      *
5 *                                                                         *
6 *   This program is free software; you can redistribute it and/or modify  *
7 *   it under the terms of the GNU General Public License as published by  *
8 *   the Free Software Foundation; either version 2 of the License, or     *
9 *   (at your option) any later version.                                   *
10 *                                                                         *
11 ***************************************************************************/
12
13#ifndef __BINDINGS_PLUGIN_H_
14#define __BINDINGS_PLUGIN_H_
15
16//----------------------------------------------------------------------------------
17// Includes
18//----------------------------------------------------------------------------------
19#include "Prerequisities.h"
20
21//----------------------------------------------------------------------------------
22// Redefine Export/Import Macros for win32 systems
23//----------------------------------------------------------------------------------
24#define _NRBindingExport
25
26#if NR_PLATFORM == NR_PLATFORM_WIN32
27
28// first we define our own export/import macro
29#if defined (BUILD_PLUGIN) || defined (BUILD_BINDING)
30#   undef _NRBindingExport
31#       define _NRBindingExport __declspec( dllexport )
32#endif
33//#if defined (BUILD_BINDING)
34//#   undef _NRBindingExport
35//#     define _NRBindingExport
36//#endif
37
38
39// if we built a binding, so we should import from engine's main dll
40#if defined (BUILD_BINDING) || defined (BUILD_PLUGIN)
41#   undef _NRExport
42#       define _NRExport __declspec( dllimport )
43#endif
44
45#endif
46
47
48//----------------------------------------------------------------------------------
49// Namespaces and classes
50//----------------------------------------------------------------------------------
51namespace nrEngine {
52
53        //! Binding abstract classes for the engine
54        /**
55         * Bindings are loadtime plugins provide to the engine
56         * new functionality. They do not linked within the engine library
57         * but with application written for the engine.
58         *
59         * This is an abstract class providing some default methods
60         * which has to be overwritten by the binding. Later on we could
61         * create a binding manager, so it could initialize the bindings
62         * by user wish.
63         *
64         * \ingroup plugin
65         **/
66        class _NRBindingExport Binding{
67                public:
68
69                        //! Initialize the binding and its subsystems
70                        Binding() {}
71
72                        //! Release used memory and close binded subsystem
73                        virtual ~Binding() {}
74
75                        //! Get the name of the binding
76                        virtual const std::string& getName() = 0;
77
78                        //! Get a full name including authors, version,... strings of the bindings
79                        virtual const std::string& getFullName() = 0;
80
81        };
82
83};
84
85#endif
86
Note: See TracBrowser for help on using the repository browser.