libmusicbrainz4  4.0.3
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
ReleaseGroup.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_RELEASE_GROUP_H
26 #define _MUSICBRAINZ4_RELEASE_GROUP_H
27 
28 #include <string>
29 #include <iostream>
30 
31 #include "musicbrainz4/Entity.h"
34 #include "musicbrainz4/TagList.h"
37 
38 #include "musicbrainz4/xmlParser.h"
39 
40 namespace MusicBrainz4
41 {
42  class CReleaseGroupPrivate;
43 
44  class CArtistCredit;
45  class CRating;
46  class CUserRating;
47  class CSecondaryType;
48 
49  class CReleaseGroup: public CEntity
50  {
51  public:
52  CReleaseGroup(const XMLNode& Node=XMLNode::emptyNode());
53  CReleaseGroup(const CReleaseGroup& Other);
54  CReleaseGroup& operator =(const CReleaseGroup& Other);
55  virtual ~CReleaseGroup();
56 
57  virtual CReleaseGroup *Clone();
58 
59  std::string ID() const;
60 
73  std::string PrimaryType() const;
74  std::string Title() const;
75  std::string Disambiguation() const;
76  std::string FirstReleaseDate() const;
77  CArtistCredit *ArtistCredit() const;
78  CReleaseList *ReleaseList() const;
79 
93  CTagList *TagList() const;
94  CUserTagList *UserTagList() const;
95  CRating *Rating() const;
96  CUserRating *UserRating() const;
98 
99  virtual std::ostream& Serialise(std::ostream& os) const;
100  static std::string GetElementName();
101 
102  protected:
103  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
104  virtual void ParseElement(const XMLNode& Node);
105 
106  private:
107  void Cleanup();
108 
109  CReleaseGroupPrivate * const m_d;
110  };
111 }
112 
113 #endif