diff options
| author | Lars Bisballe Jensen <larsbisballe@gmail.com> | 2014-10-21 14:58:48 +0200 | 
|---|---|---|
| committer | Lars Bisballe Jensen <larsbisballe@gmail.com> | 2014-10-21 14:58:48 +0200 | 
| commit | ad43e35a0ff422fc30c61e0f91c05ec35e5d89f0 (patch) | |
| tree | 88304776185dec36fb00dcc56f209f642ee9fea9 /src | |
| parent | 4c4c5e8f3f6069977289055903ae54b7affcba23 (diff) | |
Instrument name now set
Diffstat (limited to 'src')
| -rw-r--r-- | src/drumkitparser.cc | 1 | ||||
| -rw-r--r-- | src/instrument.cc | 5 | ||||
| -rw-r--r-- | src/instrument.h | 3 | 
3 files changed, 8 insertions, 1 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index 4085ea2..63c4471 100644 --- a/src/drumkitparser.cc +++ b/src/drumkitparser.cc @@ -232,6 +232,7 @@ void DrumKitParser::endTag(std::string name)    if(name == "instrument") {      Instrument *i = new Instrument(); +    i->setName(instr_name);      i->setDescription(instr_description);      i->setGroup(instr_group);      //    Instrument &i = kit.instruments[kit.instruments.size() - 1]; diff --git a/src/instrument.cc b/src/instrument.cc index 2e010e6..12d5af3 100644 --- a/src/instrument.cc +++ b/src/instrument.cc @@ -141,6 +141,11 @@ void Instrument::setGroup(std::string g)    _group = g;  } +void Instrument::setName(std::string n) +{ +  _name = n; +} +  void Instrument::setDescription(std::string d)  {    _description = d; diff --git a/src/instrument.h b/src/instrument.h index 7c8b8dc..46e95f9 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -51,7 +51,7 @@ public:    void setGroup(std::string group);    void setDescription(std::string description); - +  void setName(std::string name);    //  std::map<std::string, std::string> channelmap;    std::vector<AudioFile*> audiofiles; @@ -62,6 +62,7 @@ private:    void *magic;    std::string _id; +  std::string _name;    std::string _description;    std::string _group;  | 
