libmusicbrainz3  3.0.2
 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  * $Id: results.h 8466 2006-09-05 08:59:44Z luks $
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 ReleaseResult : public Result
120  {
121  public:
122 
126  ReleaseResult(Release *release, int score);
127 
131  ~ReleaseResult();
132 
138  Release *getRelease();
139 
145  void setRelease(Release *release);
146 
147  private:
148 
149  Release *release;
150  };
151 
159  class MB_API TrackResult : public Result
160  {
161  public:
162 
166  TrackResult(Track *track, int score);
167 
171  ~TrackResult();
172 
178  Track *getTrack();
179 
185  void setTrack(Track *track);
186 
187  private:
188 
189  Track *track;
190  };
191 
192 }
193 
194 #endif