From bc4e506e48785ce448f18098b96c0d7333abb801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 15:36:53 +0200 Subject: API Refactoring for class Drumkit --- src/drumkit.h | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'src/drumkit.h') 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 #include @@ -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__*/ -- cgit v1.2.3