libmusicbrainz3  3.0.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
results.h
Go to the documentation of this file.
1 /*
2  * MusicBrainz -- The Internet music metadatabase
3  *
4  * Copyright (C) 2006 Lukas Lalinsky
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  *
21  */
22 
23 #ifndef __MUSICBRAINZ3_RESULTS_H__
24 #define __MUSICBRAINZ3_RESULTS_H__
25 
26 #include <musicbrainz3/model.h>
27 
28 namespace MusicBrainz
29 {
30 
34  class MB_API Result
35  {
36  public:
37 
43  Result(int score);
44 
48  virtual ~Result() {};
49 
58  int getScore();
59 
65  void setScore(int score);
66 
67  private:
68 
69  int score;
70  };
71 
79  class MB_API ArtistResult : public Result
80  {
81  public:
82 
86  ArtistResult(Artist *artist, int score);
87 
91  ~ArtistResult();
92 
98  Artist *getArtist();
99 
105  void setArtist(Artist *artist);
106 
107  private:
108 
109  Artist *artist;
110  };
111 
119  class MB_API LabelResult : public Result
120  {
121  public:
122 
126  LabelResult(Label *label, int score);
127 
131  ~LabelResult();
132 
138  Label *getLabel();
139 
145  void setLabel(Label *label);
146 
147  private:
148 
149  Label *label;
150  };
151 
159  class MB_API ReleaseResult : public Result
160  {
161  public:
162 
166  ReleaseResult(Release *release, int score);
167 
171  ~ReleaseResult();
172 
178  Release *getRelease();
179 
185  void setRelease(Release *release);
186 
187  private:
188 
189  Release *release;
190  };
191 
200  {
201  public:
202 
206  ReleaseGroupResult(ReleaseGroup *releaseGroup, int score);
207 
212 
218  ReleaseGroup *getReleaseGroup();
219 
225  void setReleaseGroup(ReleaseGroup *releaseGroup);
226 
227  private:
228 
229  ReleaseGroup *releaseGroup;
230  };
231 
239  class MB_API TrackResult : public Result
240  {
241  public:
242 
246  TrackResult(Track *track, int score);
247 
251  ~TrackResult();
252 
258  Track *getTrack();
259 
265  void setTrack(Track *track);
266 
267  private:
268 
269  Track *track;
270  };
271 
272 }
273 
274 #endif
Represents an artist.
Definition: artist.h:46
Represents an artist result.
Definition: results.h:79
Represents an track result.
Definition: results.h:239
Represents a track.
Definition: track.h:51
virtual ~Result()
Destructor.
Definition: results.h:48
Represents an releaseGroup result.
Definition: results.h:199
Represents an label result.
Definition: results.h:119
Represents an release result.
Definition: results.h:159
Represents a Release Group.
Definition: releasegroup.h:40
Represents a record label.
Definition: label.h:38
Represents generic search result.
Definition: results.h:34
#define MB_API
Definition: defines.h:40
Represents a Release.
Definition: release.h:47