diff options
author | Chris Xiong <chirs241097@gmail.com> | 2020-05-12 00:58:40 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2020-05-12 00:58:40 +0800 |
commit | a7407edaf81c685d4a389785a405a53a5de4b148 (patch) | |
tree | e6e4f2d85f2172c94ac83a6e8f01e1e90a78ede9 /sample-plugin | |
parent | 437b7b16c322a8e53ac55a5f831098494d9a7073 (diff) | |
download | QMidiPlayer-a7407edaf81c685d4a389785a405a53a5de4b148.tar.xz |
Format EVERYTHING.
Hopefully this will make the source code less horrendous and actually
readable.
The command used was:
```
astyle --suffix=none --style=allman --attach-extern-c --attach-closing-while --indent-switches --indent-after-parens --pad-oper --pad-header --unpad-paren --align-pointer=name --recursive './*.cpp,*.hpp'
```
Diffstat (limited to 'sample-plugin')
-rw-r--r-- | sample-plugin/sampleplugin.cpp | 28 | ||||
-rw-r--r-- | sample-plugin/sampleplugin.hpp | 34 |
2 files changed, 41 insertions, 21 deletions
diff --git a/sample-plugin/sampleplugin.cpp b/sample-plugin/sampleplugin.cpp index baf2786..6ca9b3e 100644 --- a/sample-plugin/sampleplugin.cpp +++ b/sample-plugin/sampleplugin.cpp @@ -1,11 +1,27 @@ #include <cstdio> #include "sampleplugin.hpp" -qmpSamplePlugin::qmpSamplePlugin(qmpPluginAPI* _api){api=_api;} -qmpSamplePlugin::~qmpSamplePlugin(){api=nullptr;} +qmpSamplePlugin::qmpSamplePlugin(qmpPluginAPI *_api) +{ + api = _api; +} +qmpSamplePlugin::~qmpSamplePlugin() +{ + api = nullptr; +} void qmpSamplePlugin::init() -{fputs("Hello world from plugin init!\n",stderr);} +{ + fputs("Hello world from plugin init!\n", stderr); +} void qmpSamplePlugin::deinit() -{fputs("Bye!\n",stderr);} -const char* qmpSamplePlugin::pluginGetName(){return "QMidiPlayer Sample Plugin";} -const char* qmpSamplePlugin::pluginGetVersion(){return "0.0.0";} +{ + fputs("Bye!\n", stderr); +} +const char *qmpSamplePlugin::pluginGetName() +{ + return "QMidiPlayer Sample Plugin"; +} +const char *qmpSamplePlugin::pluginGetVersion() +{ + return "0.0.0"; +} diff --git a/sample-plugin/sampleplugin.hpp b/sample-plugin/sampleplugin.hpp index ffb3d77..7c981c1 100644 --- a/sample-plugin/sampleplugin.hpp +++ b/sample-plugin/sampleplugin.hpp @@ -3,24 +3,28 @@ #include "../include/qmpcorepublic.hpp" -class qmpSamplePlugin:public qmpPluginIntf +class qmpSamplePlugin: public qmpPluginIntf { - private: - qmpPluginAPI* api; - public: - qmpSamplePlugin(qmpPluginAPI* _api); - ~qmpSamplePlugin(); - void init(); - void deinit(); - const char* pluginGetName(); - const char* pluginGetVersion(); +private: + qmpPluginAPI *api; +public: + qmpSamplePlugin(qmpPluginAPI *_api); + ~qmpSamplePlugin(); + void init(); + void deinit(); + const char *pluginGetName(); + const char *pluginGetVersion(); }; -extern "C"{ - EXPORTSYM qmpPluginIntf* qmpPluginGetInterface(qmpPluginAPI* api) - {return new qmpSamplePlugin(api);} - EXPORTSYM const char* qmpPluginGetAPIRev() - {return QMP_PLUGIN_API_REV;} +extern "C" { + EXPORTSYM qmpPluginIntf *qmpPluginGetInterface(qmpPluginAPI *api) + { + return new qmpSamplePlugin(api); + } + EXPORTSYM const char *qmpPluginGetAPIRev() + { + return QMP_PLUGIN_API_REV; + } } #endif // SAMPLEPLUGIN_H |