3 * Declares the PluginModule class.
4 * @ingroup generic-plugin
8 * Copyright 2012 Joel Baxter
10 * This file is part of MeshTex.
12 * MeshTex is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 2 of the License, or
15 * (at your option) any later version.
17 * MeshTex is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with MeshTex. If not, see <http://www.gnu.org/licenses/>.
26 #if !defined(INCLUDED_PLUGINMODULE_H)
27 #define INCLUDED_PLUGINMODULE_H
29 #include "PluginProperties.h"
32 #include "typesystem.h"
33 #include "qerplugin.h"
36 * A singleton object that handles registering as a plugin with Radiant.
38 * @ingroup generic-plugin
40 class PluginModule : public TypeSystemRef
42 public: // public types
44 /// @cond DOXYGEN_INTERNAL_RADIANT_ODDITIES_SKIP
47 * Prepare for uses of the token Type in singletonmodule.h; indicate
48 * that _QERPluginTable should be substituted there.
50 typedef _QERPluginTable Type;
53 * Radiant constant wrapper for the plugin's name string.
55 STRING_CONSTANT(Name, PLUGIN_NAME);
59 public: // public methods
66 /// @name Plugin function table interface
68 _QERPluginTable *getTable();
70 /// @name Plugin function table members
72 static const char *QERPluginInit(void *hApp,
74 static const char *QERPluginGetName();
75 static const char *QERPluginGetCommandList();
76 static const char *QERPluginGetCommandTitleList();
77 static void QERPluginDispatch(const char *command,
83 private: // private member vars
85 static _QERPluginTable _pluginAPI;
88 #endif // #if !defined(INCLUDED_PLUGINMODULE_H)