libmusicbrainz4  4.0.3
Metadata.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_METADATA_H
00026 #define _MUSICBRAINZ4_METADATA_H
00027 
00028 #include "musicbrainz4/Entity.h"
00029 #include "musicbrainz4/ReleaseList.h"
00030 #include "musicbrainz4/ArtistList.h"
00031 #include "musicbrainz4/WorkList.h"
00032 #include "musicbrainz4/ISRCList.h"
00033 #include "musicbrainz4/LabelInfoList.h"
00034 #include "musicbrainz4/ReleaseGroupList.h"
00035 #include "musicbrainz4/RecordingList.h"
00036 #include "musicbrainz4/LabelList.h"
00037 #include "musicbrainz4/AnnotationList.h"
00038 #include "musicbrainz4/CDStubList.h"
00039 #include "musicbrainz4/FreeDBDiscList.h"
00040 #include "musicbrainz4/TagList.h"
00041 #include "musicbrainz4/UserTagList.h"
00042 #include "musicbrainz4/CollectionList.h"
00043 
00044 #include "musicbrainz4/xmlParser.h"
00045 
00046 #include <string>
00047 
00048 namespace MusicBrainz4
00049 {
00050         class CMetadataPrivate;
00051 
00052         class CArtist;
00053         class CRelease;
00054         class CReleaseGroup;
00055         class CRecording;
00056         class CLabel;
00057         class CPUID;
00058         class CISRC;
00059         class CDisc;
00060         class CRating;
00061         class CUserRating;
00062         class CCollection;
00063         class CArtist;
00064         class CWork;
00065         class CCDStub;
00066         class CMessage;
00067 
00068         class CMetadata: public CEntity
00069         {
00070         public:
00071                 CMetadata(const XMLNode& Node=XMLNode::emptyNode());
00072                 CMetadata(const CMetadata& Other);
00073                 CMetadata& operator =(const CMetadata& Other);
00074                 virtual ~CMetadata();
00075 
00076                 virtual CMetadata *Clone();
00077 
00078                 std::string XMLNS() const;
00079                 std::string XMLNSExt() const;
00080                 std::string Generator() const;
00081                 std::string Created() const;
00082                 CArtist *Artist() const;
00083                 CRelease *Release() const;
00084                 CReleaseGroup *ReleaseGroup() const;
00085                 CRecording *Recording() const;
00086                 CLabel *Label() const;
00087                 CWork *Work() const;
00088                 CPUID *PUID() const;
00089                 CISRC *ISRC() const;
00090                 CDisc *Disc() const;
00091                 CLabelInfoList *LabelInfoList() const;
00092                 CRating *Rating() const;
00093                 CUserRating *UserRating() const;
00094                 CCollection *Collection() const;
00095                 CArtistList *ArtistList() const;
00096                 CReleaseList *ReleaseList() const;
00097                 CReleaseGroupList *ReleaseGroupList() const;
00098                 CRecordingList *RecordingList() const;
00099                 CLabelList *LabelList() const;
00100                 CWorkList *WorkList() const;
00101                 CISRCList *ISRCList() const;
00102                 CAnnotationList *AnnotationList() const;
00103                 CCDStubList *CDStubList() const;
00104                 CFreeDBDiscList *FreeDBDiscList() const;
00105                 CTagList *TagList() const;
00106                 CUserTagList *UserTagList() const;
00107                 CCollectionList *CollectionList() const;
00108                 CCDStub *CDStub() const;
00109                 CMessage *Message() const;
00110 
00111                 virtual std::ostream& Serialise(std::ostream& os) const;
00112                 static std::string GetElementName();
00113 
00114         protected:
00115                 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
00116                 virtual void ParseElement(const XMLNode& Node);
00117 
00118         private:
00119                 void Cleanup();
00120 
00121                 CMetadataPrivate * const m_d;
00122         };
00123 }
00124 
00125 #endif
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Defines