libmusicbrainz4  4.0.1
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Defines
Work.h
Go to the documentation of this file.
00001 /* --------------------------------------------------------------------------
00002 
00003    libmusicbrainz4 - Client library to access MusicBrainz
00004 
00005    Copyright (C) 2011 Andrew Hawkins
00006 
00007    This file is part of libmusicbrainz4.
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    libmusicbrainz4 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 _MUSICBRAINZ4_WORK_H
00026 #define _MUSICBRAINZ4_WORK_H
00027 
00028 #include <string>
00029 
00030 #include "musicbrainz4/Entity.h"
00031 #include "musicbrainz4/AliasList.h"
00032 #include "musicbrainz4/RelationList.h"
00033 #include "musicbrainz4/TagList.h"
00034 #include "musicbrainz4/UserTagList.h"
00035 
00036 #include "musicbrainz4/xmlParser.h"
00037 
00038 namespace MusicBrainz4
00039 {
00040         class CWorkPrivate;
00041 
00042         class CArtistCredit;
00043         class CISWC;
00044         class CRating;
00045         class CUserRating;
00046 
00047         class CWork: public CEntity
00048         {
00049         public:
00050                 CWork(const XMLNode& Node=XMLNode::emptyNode());
00051                 CWork(const CWork& Other);
00052                 CWork& operator =(const CWork& Other);
00053                 virtual ~CWork();
00054 
00055                 virtual CWork *Clone();
00056 
00057                 std::string ID() const;
00058                 std::string Type() const;
00059                 std::string Title() const;
00060                 CArtistCredit *ArtistCredit() const;
00061                 std::string ISWC() const;
00062                 std::string Disambiguation() const;
00063                 CAliasList *AliasList() const;
00064 
00076                 CRelationList *RelationList() const LIBMB4_DEPRECATED;
00077                 CRelationListList *RelationListList() const;
00078                 CTagList *TagList() const;
00079                 CUserTagList *UserTagList() const;
00080                 CRating *Rating() const;
00081                 CUserRating *UserRating() const;
00082 
00083                 virtual std::ostream& Serialise(std::ostream& os) const;
00084                 static std::string GetElementName();
00085 
00086         protected:
00087                 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);
00088                 virtual bool ParseElement(const XMLNode& Node);
00089 
00090         private:
00091                 void Cleanup();
00092 
00093                 CWorkPrivate * const m_d;
00094         };
00095 }
00096 
00097 #endif
00098