libmusicbrainz5  5.1.0
Work.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2 
3  libmusicbrainz5 - Client library to access MusicBrainz
4 
5  Copyright (C) 2012 Andrew Hawkins
6 
7  This file is part of libmusicbrainz5.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  libmusicbrainz5 is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this library. If not, see <http://www.gnu.org/licenses/>.
21 
22  $Id$
23 
24 ----------------------------------------------------------------------------*/
25 
26 #ifndef _MUSICBRAINZ5_WORK_H
27 #define _MUSICBRAINZ5_WORK_H
28 
29 #include <string>
30 
31 #include "musicbrainz5/Entity.h"
32 #include "musicbrainz5/AliasList.h"
34 #include "musicbrainz5/TagList.h"
36 #include "musicbrainz5/ISWCList.h"
37 
38 #include "musicbrainz5/xmlParser.h"
39 
40 namespace MusicBrainz5
41 {
42  class CWorkPrivate;
43 
44  class CArtistCredit;
45  class CISWC;
46  class CRating;
47  class CUserRating;
48 
49  class CWork: public CEntity
50  {
51  public:
52  CWork(const XMLNode& Node=XMLNode::emptyNode());
53  CWork(const CWork& Other);
54  CWork& operator =(const CWork& Other);
55  virtual ~CWork();
56 
57  virtual CWork *Clone();
58 
59  std::string ID() const;
60  std::string Type() const;
61  std::string Title() const;
62  CArtistCredit *ArtistCredit() const;
63  CISWCList *ISWCList() const;
64  std::string Disambiguation() const;
65  CAliasList *AliasList() const;
67  CTagList *TagList() const;
68  CUserTagList *UserTagList() const;
69  CRating *Rating() const;
70  CUserRating *UserRating() const;
71  std::string Language() const;
72 
73  virtual std::ostream& Serialise(std::ostream& os) const;
74  static std::string GetElementName();
75 
76  protected:
77  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
78  virtual void ParseElement(const XMLNode& Node);
79 
80  private:
81  void Cleanup();
82 
83  CWorkPrivate * const m_d;
84  };
85 }
86 
87 #endif
88 
virtual std::ostream & Serialise(std::ostream &os) const
CRating * Rating() const
CWork(const XMLNode &Node=XMLNode::emptyNode())
Definition: Alias.h:36
Definition: Entity.h:42
std::string Type() const
std::string Language() const
std::string ID() const
Definition: ISWCList.h:41
Definition: RelationListList.h:39
Definition: UserRating.h:39
std::string Disambiguation() const
CTagList * TagList() const
Definition: ListImpl.h:34
Definition: Work.h:49
std::string Title() const
CWork & operator=(const CWork &Other)
virtual void ParseElement(const XMLNode &Node)
CRelationListList * RelationListList() const
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
virtual CWork * Clone()
CUserRating * UserRating() const
Definition: Rating.h:39
CISWCList * ISWCList() const
Definition: ArtistCredit.h:40
CAliasList * AliasList() const
CArtistCredit * ArtistCredit() const
static std::string GetElementName()
CUserTagList * UserTagList() const