VR-Forces 4.0.4 Class Documentation
include/tmqt/pluginExtension.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: pluginExtension.h,v $ $Revision: 1.19 $ $State: Exp $
00007 *******************************************************************************/
00008 
00012 
00013 #ifndef PLUGINEXTENSION_H_
00014 #define PLUGINEXTENSION_H_
00015 
00016 #include <vlutil/vlString.h>
00017 
00019 #pragma warning (disable:4251)
00020 #ifdef WIN32
00021    #ifdef DT_DLL_BUILD
00022       #ifdef DT_PLUGIN_EXPORTS
00023          #define DT_DLL_PLUGIN __declspec(dllexport)
00024       #else
00025          #define DT_DLL_PLUGIN __declspec(dllimport)
00026       #endif
00027    #else
00028       #define DT_DLL_PLUGIN
00029    #endif
00030 #else
00031    #define DT_DLL_PLUGIN
00032 #endif
00033 
00034 class DtTMApplication;
00035 
00036 #define DtInitializePluginFunction "DtInitializePlugin"
00037 #define DtPostAppInitialize "DtPostInitializePlugin"
00038 #define DtGuiUnloadPlugin "DtUnloadPlugin"
00039 #define DtPluginVersionFunction "DtPluginVersion"
00040 
00043 typedef struct _DtPluginInformation
00044 {
00045    DtString    pluginName;
00046    DtString    pluginVersion;
00047    DtString    pluginDescription;
00048    DtString    pluginCreator;
00049    DtString    pluginCreatorEmail;
00050    DtString    pluginContactWebPage;
00051    DtString    pluginContactMailingAddress;
00052    DtString    pluginContactPhone;
00053    DtString    applicationVersion;
00054 } DtPluginInformation;
00055 
00056 typedef bool (*DtInitializePluginFcn)(DtTMApplication* app, DtPluginInformation&);
00057 typedef bool (*DtPostAppInitializeFcn)(DtTMApplication* app, DtPluginInformation&);
00058 typedef bool (*DtUnloadPluginFcn)();
00059 typedef void (*DtPluginVersionFcn)(DtString&);
00060 
00069 //extern "C" {
00091 //}
00095 
00100 #if defined (BUILDING_PLUGIN)
00101    #if !defined (APPLICATION_VERSION)
00102       #pragma message ("APPLICATION_VERSION is not defined for plugin.")
00103       #pragma message ("If building a tdbTool plugin, include tdbToolVersion.h")
00104       #pragma message ("If building a PVD plugin, include pvdVersion.h")
00105       #pragma message ("If building a VRF GUI plugin, include vrfGuiVersion.h")
00106       #pragma message ("Not including one of these headers could cause application instability if this plugin is used against a later version of an application.")
00107    #else
00108       #include <vlutil/vlString.h>
00109 
00110       extern "C" {
00111          DT_DLL_PLUGIN void DtPluginVersion(DtString& version)
00112          {
00113             version = PLUGIN_COMPATIBLE_VERSION;
00114 #ifdef WIN32
00115 #ifdef NDEBUG
00116             version += " Release";
00117 #else
00118             version += " Debug";
00119 #endif
00120 #endif
00121          }
00122       }
00123    #endif
00124 #endif
00125 
00126 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)