libmusicbrainz5
5.0.1
|
00001 /* -------------------------------------------------------------------------- 00002 00003 libmusicbrainz5 - Client library to access MusicBrainz 00004 00005 Copyright (C) 2012 Andrew Hawkins 00006 00007 This file is part of libmusicbrainz5. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of v2 of the GNU Lesser General Public 00011 License as published by the Free Software Foundation. 00012 00013 libmusicbrainz5 is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 00021 $Id$ 00022 00023 ----------------------------------------------------------------------------*/ 00024 00025 #ifndef _MUSICBRAINZ5_WORK_H 00026 #define _MUSICBRAINZ5_WORK_H 00027 00028 #include <string> 00029 00030 #include "musicbrainz5/Entity.h" 00031 #include "musicbrainz5/AliasList.h" 00032 #include "musicbrainz5/RelationList.h" 00033 #include "musicbrainz5/TagList.h" 00034 #include "musicbrainz5/UserTagList.h" 00035 #include "musicbrainz5/ISWCList.h" 00036 00037 #include "musicbrainz5/xmlParser.h" 00038 00039 namespace MusicBrainz5 00040 { 00041 class CWorkPrivate; 00042 00043 class CArtistCredit; 00044 class CISWC; 00045 class CRating; 00046 class CUserRating; 00047 00048 class CWork: public CEntity 00049 { 00050 public: 00051 CWork(const XMLNode& Node=XMLNode::emptyNode()); 00052 CWork(const CWork& Other); 00053 CWork& operator =(const CWork& Other); 00054 virtual ~CWork(); 00055 00056 virtual CWork *Clone(); 00057 00058 std::string ID() const; 00059 std::string Type() const; 00060 std::string Title() const; 00061 CArtistCredit *ArtistCredit() const; 00062 CISWCList *ISWCList() const; 00063 std::string Disambiguation() const; 00064 CAliasList *AliasList() const; 00065 CRelationListList *RelationListList() const; 00066 CTagList *TagList() const; 00067 CUserTagList *UserTagList() const; 00068 CRating *Rating() const; 00069 CUserRating *UserRating() const; 00070 std::string Language() const; 00071 00072 virtual std::ostream& Serialise(std::ostream& os) const; 00073 static std::string GetElementName(); 00074 00075 protected: 00076 virtual void ParseAttribute(const std::string& Name, const std::string& Value); 00077 virtual void ParseElement(const XMLNode& Node); 00078 00079 private: 00080 void Cleanup(); 00081 00082 CWorkPrivate * const m_d; 00083 }; 00084 } 00085 00086 #endif 00087