summaryrefslogtreecommitdiff
path: root/src/drumkit.h
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-03-29 15:36:53 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-31 17:35:47 +0200
commitbc4e506e48785ce448f18098b96c0d7333abb801 (patch)
tree1f282fe53493fe0292ef51a791c8f61283e44542 /src/drumkit.h
parent1a8361a1f6a1bf442d474cf5baf2e9a09f511777 (diff)
API Refactoring for class Drumkit
Diffstat (limited to 'src/drumkit.h')
-rw-r--r--src/drumkit.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/drumkit.h b/src/drumkit.h
index 24fce99..1ceef3e 100644
--- a/src/drumkit.h
+++ b/src/drumkit.h
@@ -24,8 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_DRUMKIT_H__
-#define __DRUMGIZMO_DRUMKIT_H__
+#pragma once
#include <map>
#include <string>
@@ -35,36 +34,36 @@
#include "versionstr.h"
class DrumKitParser;
-class DrumKit {
- friend class DrumKitParser;
+class DrumKit
+{
+ friend class DrumKitParser;
+
public:
- DrumKit();
- ~DrumKit();
+ DrumKit();
+ ~DrumKit();
+
+ std::string getFile() const;
- std::string file();
+ std::string getName() const;
+ std::string getDescription() const;
- std::string name();
- std::string description();
-
- Instruments instruments;
- Channels channels;
-
- void clear();
+ Instruments instruments;
+ Channels channels;
- bool isValid();
+ void clear();
- size_t samplerate();
+ bool isValid() const;
+
+ size_t getSamplerate() const;
private:
- void *magic{nullptr};
+ void* magic{nullptr};
- std::string _file;
+ std::string _file;
- std::string _name;
- std::string _description;
+ std::string _name;
+ std::string _description;
size_t _samplerate{0};
- VersionStr _version;
+ VersionStr _version;
};
-
-#endif/*__DRUMGIZMO_DRUMKIT_H__*/