libmusicbrainz5 5.1.0
Loading...
Searching...
No Matches
Relation.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_RELATION_H
27#define _MUSICBRAINZ5_RELATION_H
28
29#include <string>
30#include <iostream>
31
32#include "musicbrainz5/Entity.h"
34
35#include "musicbrainz5/xmlParser.h"
36
37namespace MusicBrainz5
38{
39 class CRelationPrivate;
40
41 class CArtist;
42 class CRelease;
43 class CReleaseGroup;
44 class CRecording;
45 class CLabel;
46 class CWork;
47
48 class CRelation: public CEntity
49 {
50 public:
51 CRelation(const XMLNode& Node=XMLNode::emptyNode());
52 CRelation(const CRelation& Other);
54 virtual ~CRelation();
55
56 virtual CRelation *Clone();
57
58 std::string Type() const;
59 std::string Target() const;
60 std::string Direction() const;
62 std::string Begin() const;
63 std::string End() const;
64 std::string Ended() const;
65 CArtist *Artist() const;
66 CRelease *Release() const;
69 CLabel *Label() const;
70 CWork *Work() 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 CRelationPrivate * const m_d;
83 };
84}
85
86#endif
Definition: Artist.h:54
Definition: Entity.h:43
Definition: Label.h:51
Definition: ListImpl.h:35
Definition: Recording.h:56
Definition: Relation.h:49
std::string Ended() const
std::string Begin() const
CAttributeList * AttributeList() const
std::string End() const
CLabel * Label() const
CWork * Work() const
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
CReleaseGroup * ReleaseGroup() const
CArtist * Artist() const
CRelation(const XMLNode &Node=XMLNode::emptyNode())
CRecording * Recording() const
CRelation(const CRelation &Other)
CRelease * Release() const
CRelation & operator=(const CRelation &Other)
std::string Target() const
std::string Type() const
virtual void ParseElement(const XMLNode &Node)
virtual CRelation * Clone()
virtual std::ostream & Serialise(std::ostream &os) const
std::string Direction() const
static std::string GetElementName()
Definition: ReleaseGroup.h:51
Definition: Release.h:50
Definition: Work.h:50
Definition: Alias.h:37