libmusicbrainz5  5.0.1
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
Label.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_LABEL_H
26 #define _MUSICBRAINZ5_LABEL_H
27 
28 #include <string>
29 #include <iostream>
30 
31 #include "musicbrainz5/Entity.h"
32 #include "musicbrainz5/IPIList.h"
34 #include "musicbrainz5/AliasList.h"
36 #include "musicbrainz5/TagList.h"
38 
39 #include "musicbrainz5/xmlParser.h"
40 
41 namespace MusicBrainz5
42 {
43  class CLabelPrivate;
44 
45  class CLifespan;
46  class CRating;
47  class CUserRating;
48 
49  class CLabel: public CEntity
50  {
51  public:
52  CLabel(const XMLNode& Node=XMLNode::emptyNode());
53  CLabel(const CLabel& Other);
54  CLabel& operator =(const CLabel& Other);
55  virtual ~CLabel();
56 
57  virtual CLabel *Clone();
58 
59  std::string ID() const;
60  std::string Type() const;
61  std::string Name() const;
62  std::string SortName() const;
63  int LabelCode() const;
64  CIPIList *IPIList() const;
65  std::string Disambiguation() const;
66  std::string Country() const;
67  CLifespan *Lifespan() const;
68  CAliasList *AliasList() const;
69  CReleaseList *ReleaseList() const;
71  CTagList *TagList() const;
72  CUserTagList *UserTagList() const;
73  CRating *Rating() const;
74  CUserRating *UserRating() const;
75 
76  virtual std::ostream& Serialise(std::ostream& os) const;
77  static std::string GetElementName();
78 
79  protected:
80  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
81  virtual void ParseElement(const XMLNode& Node);
82 
83  private:
84  void Cleanup();
85 
86  CLabelPrivate * const m_d;
87  };
88 }
89 
90 #endif
virtual void ParseElement(const XMLNode &Node)
Definition: Label.h:49
int LabelCode() const
CLabel & operator=(const CLabel &Other)
Definition: Alias.h:35
std::string Disambiguation() const
static std::string GetElementName()
std::string Country() const
Definition: Entity.h:41
CReleaseList * ReleaseList() const
std::string ID() const
Definition: RelationListList.h:38
Definition: UserRating.h:38
CLifespan * Lifespan() const
virtual CLabel * Clone()
CRating * Rating() const
Definition: ListImpl.h:33
virtual std::ostream & Serialise(std::ostream &os) const
CTagList * TagList() const
CUserRating * UserRating() const
CAliasList * AliasList() const
std::string SortName() const
std::string Name() const
CRelationListList * RelationListList() const
Definition: Lifespan.h:39
CUserTagList * UserTagList() const
Definition: Rating.h:38
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
CLabel(const XMLNode &Node=XMLNode::emptyNode())
CIPIList * IPIList() const
std::string Type() const