Blame include/musicbrainz5/Relation.h

Packit f70c98
/* --------------------------------------------------------------------------
Packit f70c98
Packit f70c98
   libmusicbrainz5 - Client library to access MusicBrainz
Packit f70c98
Packit f70c98
   Copyright (C) 2012 Andrew Hawkins
Packit f70c98
Packit f70c98
   This file is part of libmusicbrainz5.
Packit f70c98
Packit f70c98
   This library is free software; you can redistribute it and/or
Packit f70c98
   modify it under the terms of the GNU Lesser General Public
Packit f70c98
   License as published by the Free Software Foundation; either
Packit f70c98
   version 2.1 of the License, or (at your option) any later version.
Packit f70c98
Packit f70c98
   libmusicbrainz5 is distributed in the hope that it will be useful,
Packit f70c98
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit f70c98
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit f70c98
   Lesser General Public License for more details.
Packit f70c98
Packit f70c98
   You should have received a copy of the GNU General Public License
Packit f70c98
   along with this library.  If not, see <http://www.gnu.org/licenses/>.
Packit f70c98
Packit f70c98
     $Id$
Packit f70c98
Packit f70c98
----------------------------------------------------------------------------*/
Packit f70c98
Packit f70c98
#ifndef _MUSICBRAINZ5_RELATION_H
Packit f70c98
#define _MUSICBRAINZ5_RELATION_H
Packit f70c98
Packit f70c98
#include <string>
Packit f70c98
#include <iostream>
Packit f70c98
Packit f70c98
#include "musicbrainz5/Entity.h"
Packit f70c98
#include "musicbrainz5/AttributeList.h"
Packit f70c98
Packit f70c98
#include "musicbrainz5/xmlParser.h"
Packit f70c98
Packit f70c98
namespace MusicBrainz5
Packit f70c98
{
Packit f70c98
	class CRelationPrivate;
Packit f70c98
Packit f70c98
	class CArtist;
Packit f70c98
	class CRelease;
Packit f70c98
	class CReleaseGroup;
Packit f70c98
	class CRecording;
Packit f70c98
	class CLabel;
Packit f70c98
	class CWork;
Packit f70c98
Packit f70c98
	class CRelation: public CEntity
Packit f70c98
	{
Packit f70c98
	public:
Packit f70c98
		CRelation(const XMLNode& Node=XMLNode::emptyNode());
Packit f70c98
		CRelation(const CRelation& Other);
Packit f70c98
		CRelation& operator =(const CRelation& Other);
Packit f70c98
		virtual ~CRelation();
Packit f70c98
Packit f70c98
		virtual CRelation *Clone();
Packit f70c98
Packit f70c98
		std::string Type() const;
Packit f70c98
		std::string Target() const;
Packit f70c98
		std::string Direction() const;
Packit f70c98
		CAttributeList *AttributeList() const;
Packit f70c98
		std::string Begin() const;
Packit f70c98
		std::string End() const;
Packit f70c98
		std::string Ended() const;
Packit f70c98
		CArtist *Artist() const;
Packit f70c98
		CRelease *Release() const;
Packit f70c98
		CReleaseGroup *ReleaseGroup() const;
Packit f70c98
		CRecording *Recording() const;
Packit f70c98
		CLabel *Label() const;
Packit f70c98
		CWork *Work() const;
Packit f70c98
Packit f70c98
		virtual std::ostream& Serialise(std::ostream& os) const;
Packit f70c98
		static std::string GetElementName();
Packit f70c98
Packit f70c98
	protected:
Packit f70c98
		virtual void ParseAttribute(const std::string& Name, const std::string& Value);
Packit f70c98
		virtual void ParseElement(const XMLNode& Node);
Packit f70c98
Packit f70c98
	private:
Packit f70c98
		void Cleanup();
Packit f70c98
Packit f70c98
		CRelationPrivate * const m_d;
Packit f70c98
	};
Packit f70c98
}
Packit f70c98
Packit f70c98
#endif