libmusicbrainz4  4.0.3
Label.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_LABEL_H
26 #define _MUSICBRAINZ4_LABEL_H
27 
28 #include <string>
29 #include <iostream>
30 
31 #include "musicbrainz4/Entity.h"
32 #include "musicbrainz4/IPIList.h"
34 #include "musicbrainz4/AliasList.h"
36 #include "musicbrainz4/TagList.h"
38 
39 #include "musicbrainz4/xmlParser.h"
40 
41 namespace MusicBrainz4
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 
77  CIPIList *IPIList() const;
78  std::string Disambiguation() const;
79  std::string Country() const;
80  CLifespan *Lifespan() const;
81  CAliasList *AliasList() const;
82  CReleaseList *ReleaseList() const;
83 
97  CTagList *TagList() const;
98  CUserTagList *UserTagList() const;
99  CRating *Rating() const;
100  CUserRating *UserRating() const;
101 
102  virtual std::ostream& Serialise(std::ostream& os) const;
103  static std::string GetElementName();
104 
105  protected:
106  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
107  virtual void ParseElement(const XMLNode& Node);
108 
109  private:
110  void Cleanup();
111 
112  CLabelPrivate * const m_d;
113  };
114 }
115 
116 #endif
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
CRelationListList * RelationListList() const
std::string Country() const
int LabelCode() const
CLabel(const XMLNode &Node=XMLNode::emptyNode())
CUserTagList * UserTagList() const
Definition: Entity.h:41
virtual void ParseElement(const XMLNode &Node)
CTagList * TagList() const
CAliasList * AliasList() const
std::string IPI() const
virtual std::ostream & Serialise(std::ostream &os) const
Definition: RelationList.h:40
Definition: Label.h:49
CLifespan * Lifespan() const
CReleaseList * ReleaseList() const
virtual CLabel * Clone()
#define LIBMB4_DEPRECATED(f)
Definition: defines.h:38
CRelationList * RelationList() const
std::string ID() const
CRating * Rating() const
CUserRating * UserRating() const
std::string SortName() const
std::string Disambiguation() const
Definition: UserRating.h:38
Definition: Rating.h:38
std::string Name() const
Definition: Lifespan.h:39
std::string Type() const
Definition: RelationListList.h:38
CLabel & operator=(const CLabel &Other)
static std::string GetElementName()
Definition: Alias.h:35
CIPIList * IPIList() const
Definition: ListImpl.h:33