dllinterface.h

Go to the documentation of this file.
00001 
00002 //**************************************************************************/
00003 // Copyright (c) 2008 Autodesk, Inc.
00004 // All rights reserved.
00005 //
00006 // Use of this software is subject to the terms of the Autodesk license
00007 // agreement provided at the time of installation or download, or which
00008 // otherwise accompanies this software in either electronic or hard copy form.
00009 //
00010 //**************************************************************************/
00011 // DESCRIPTION:
00012 // CREATED: October 2008
00013 //**************************************************************************/
00014 
00015 #ifndef __MUDBOX_DLLINTERFACE_H__
00016 #define __MUDBOX_DLLINTERFACE_H__
00017 
00018 #if defined(WIN32) || defined(WIN64)
00019 #define MUDBOX_DLLEXPORT   __declspec(dllexport)
00020 #define MUDBOX_DLLIMPORT   __declspec(dllimport)
00021 #define MUDBOX_DLLINTERNAL
00022 #elif defined(__GNUC__)
00023 #define MUDBOX_DLLEXPORT   __attribute__ ((visibility("default")))
00024 #define MUDBOX_DLLIMPORT   __attribute__ ((visibility("default")))
00025 #define MUDBOX_DLLINTERNAL __attribute__ ((visibility("hidden")))
00026 #else
00027 #define MUDBOX_DLLEXPORT
00028 #define MUDBOX_DLLIMPORT
00029 #define MUDBOX_DLLINTERNAL
00030 #endif
00031 
00032 #if defined(COMPILING_MUDBOX_DLL)
00033 #define MBDLL_DECL MUDBOX_DLLEXPORT
00034 #else
00035 #define MBDLL_DECL MUDBOX_DLLIMPORT
00036 #endif
00037 
00038 // On Windows, Template Declaration requires no special argument to be passed 
00039 // On Unixes, however, we need to declare them as exported because, internally,
00040 // it is using the typeinfo pointers instead of class names to perform dynamic_cast.
00041 #if defined(WIN32)
00042 #define MBDLL_TEMPLATE_DECL
00043 #else
00044 #define MBDLL_TEMPLATE_DECL MBDLL_DECL
00045 #endif
00046 
00047 #endif