aboutsummaryrefslogtreecommitdiff
path: root/midifmt-plugin/midifmtplugin.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 00:58:40 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 00:58:40 +0800
commita7407edaf81c685d4a389785a405a53a5de4b148 (patch)
treee6e4f2d85f2172c94ac83a6e8f01e1e90a78ede9 /midifmt-plugin/midifmtplugin.hpp
parent437b7b16c322a8e53ac55a5f831098494d9a7073 (diff)
downloadQMidiPlayer-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 'midifmt-plugin/midifmtplugin.hpp')
-rw-r--r--midifmt-plugin/midifmtplugin.hpp64
1 files changed, 34 insertions, 30 deletions
diff --git a/midifmt-plugin/midifmtplugin.hpp b/midifmt-plugin/midifmtplugin.hpp
index 038a2a7..b4eeddb 100644
--- a/midifmt-plugin/midifmtplugin.hpp
+++ b/midifmt-plugin/midifmtplugin.hpp
@@ -4,42 +4,46 @@
#include <cstdio>
#include "../include/qmpcorepublic.hpp"
-class CMidiStreamReader:public qmpFileReader
+class CMidiStreamReader: public qmpFileReader
{
- private:
- CMidiFile* ret;
- FILE* f;
- int eventdiscarded,fmt;
- uint32_t readDWLE();
- bool RIFFHeaderReader();
- bool midsBodyReader();
- public:
- CMidiStreamReader();
- ~CMidiStreamReader();
- CMidiFile* readFile(const char *fn);
- void discardCurrentEvent();
- void commitEventChange(SEvent d);
+private:
+ CMidiFile *ret;
+ FILE *f;
+ int eventdiscarded, fmt;
+ uint32_t readDWLE();
+ bool RIFFHeaderReader();
+ bool midsBodyReader();
+public:
+ CMidiStreamReader();
+ ~CMidiStreamReader();
+ CMidiFile *readFile(const char *fn);
+ void discardCurrentEvent();
+ void commitEventChange(SEvent d);
};
-class qmpMidiFmtPlugin:public qmpPluginIntf
+class qmpMidiFmtPlugin: public qmpPluginIntf
{
- private:
- CMidiStreamReader* mdsreader;
- public:
- static qmpPluginAPI* api;
- qmpMidiFmtPlugin(qmpPluginAPI* _api);
- ~qmpMidiFmtPlugin();
- void init();
- void deinit();
- const char* pluginGetName();
- const char* pluginGetVersion();
+private:
+ CMidiStreamReader *mdsreader;
+public:
+ static qmpPluginAPI *api;
+ qmpMidiFmtPlugin(qmpPluginAPI *_api);
+ ~qmpMidiFmtPlugin();
+ void init();
+ void deinit();
+ const char *pluginGetName();
+ const char *pluginGetVersion();
};
-extern "C"{
- EXPORTSYM qmpPluginIntf* qmpPluginGetInterface(qmpPluginAPI* api)
- {return new qmpMidiFmtPlugin(api);}
- EXPORTSYM const char* qmpPluginGetAPIRev()
- {return QMP_PLUGIN_API_REV;}
+extern "C" {
+ EXPORTSYM qmpPluginIntf *qmpPluginGetInterface(qmpPluginAPI *api)
+ {
+ return new qmpMidiFmtPlugin(api);
+ }
+ EXPORTSYM const char *qmpPluginGetAPIRev()
+ {
+ return QMP_PLUGIN_API_REV;
+ }
}
#endif // MIDIFMTPLUGIN_HPP