libmusicbrainz5  5.0.1
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 v2 of the GNU Lesser General Public
11  License as published by the Free Software Foundation.
12 
13  libmusicbrainz5 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 _MUSICBRAINZ5_WORK_H
26 #define _MUSICBRAINZ5_WORK_H
27 
28 #include <string>
29 
30 #include "musicbrainz5/Entity.h"
31 #include "musicbrainz5/AliasList.h"
33 #include "musicbrainz5/TagList.h"
35 #include "musicbrainz5/ISWCList.h"
36 
37 #include "musicbrainz5/xmlParser.h"
38 
39 namespace MusicBrainz5
40 {
41  class CWorkPrivate;
42 
43  class CArtistCredit;
44  class CISWC;
45  class CRating;
46  class CUserRating;
47 
48  class CWork: public CEntity
49  {
50  public:
51  CWork(const XMLNode& Node=XMLNode::emptyNode());
52  CWork(const CWork& Other);
53  CWork& operator =(const CWork& Other);
54  virtual ~CWork();
55 
56  virtual CWork *Clone();
57 
58  std::string ID() const;
59  std::string Type() const;
60  std::string Title() const;
61  CArtistCredit *ArtistCredit() const;
62  CISWCList *ISWCList() const;
63  std::string Disambiguation() const;
64  CAliasList *AliasList() const;
66  CTagList *TagList() const;
67  CUserTagList *UserTagList() const;
68  CRating *Rating() const;
69  CUserRating *UserRating() const;
70  std::string Language() const;
71 
72  virtual std::ostream& Serialise(std::ostream& os) const;
73  static std::string GetElementName();
74 
75  protected:
76  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
77  virtual void ParseElement(const XMLNode& Node);
78 
79  private:
80  void Cleanup();
81 
82  CWorkPrivate * const m_d;
83  };
84 }
85 
86 #endif
87 
CTagList * TagList() const
CUserTagList * UserTagList() const
CWork(const XMLNode &Node=XMLNode::emptyNode())
Definition: Alias.h:35
Definition: Entity.h:41
std::string Language() const
Definition: ISWCList.h:40
Definition: RelationListList.h:38
Definition: UserRating.h:38
CISWCList * ISWCList() const
std::string Type() const
Definition: ListImpl.h:33
Definition: Work.h:48
CWork & operator=(const CWork &Other)
virtual void ParseElement(const XMLNode &Node)
CRating * Rating() const
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
virtual CWork * Clone()
CRelationListList * RelationListList() const
std::string Disambiguation() const
CAliasList * AliasList() const
CUserRating * UserRating() const
std::string Title() const
Definition: Rating.h:38
virtual std::ostream & Serialise(std::ostream &os) const
CArtistCredit * ArtistCredit() const
Definition: ArtistCredit.h:39
std::string ID() const
static std::string GetElementName()