libmusicbrainz4  4.0.3
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
Recording.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2 
3  libmusicbrainz4 - Client library to access MusicBrainz
4 
5  Copyright (C) 2011 Andrew Hawkins
6 
7  This file is part of libmusicbrainz4.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of v2 of the GNU Lesser General Public
11  License as published by the Free Software Foundation.
12 
13  libmusicbrainz4 is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21  $Id$
22 
23 ----------------------------------------------------------------------------*/
24 
25 #ifndef _MUSICBRAINZ4_RECORDING_H
26 #define _MUSICBRAINZ4_RECORDING_H
27 
28 #include <string>
29 #include <iostream>
30 
31 namespace MusicBrainz4
32 {
33  class CRecording;
34 }
35 
36 #include "musicbrainz4/Entity.h"
38 #include "musicbrainz4/PUIDList.h"
39 #include "musicbrainz4/ISRCList.h"
41 #include "musicbrainz4/TagList.h"
43 
44 #include "musicbrainz4/xmlParser.h"
45 
46 namespace MusicBrainz4
47 {
48  class CRecordingPrivate;
49 
50  class CArtistCredit;
51  class CRating;
52  class CUserRating;
53 
54  class CRecording: public CEntity
55  {
56  public:
57  CRecording(const XMLNode& Node=XMLNode::emptyNode());
58  CRecording(const CRecording& Other);
59  CRecording& operator =(const CRecording& Other);
60  virtual ~CRecording();
61 
62  virtual CRecording *Clone();
63 
64  std::string ID() const;
65  std::string Title() const;
66  int Length() const;
67  std::string Disambiguation() const;
68  CArtistCredit *ArtistCredit() const;
69  CReleaseList *ReleaseList() const;
70  CPUIDList *PUIDList() const;
71  CISRCList *ISRCList() const;
72 
86  CTagList *TagList() const;
87  CUserTagList *UserTagList() const;
88  CRating *Rating() const;
89  CUserRating *UserRating() const;
90 
91  virtual std::ostream& Serialise(std::ostream& os) const;
92  static std::string GetElementName();
93 
94  protected:
95  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
96  virtual void ParseElement(const XMLNode& Node);
97 
98  private:
99  void Cleanup();
100 
101  CRecordingPrivate * const m_d;
102  };
103 }
104 
105 #endif