libmusicbrainz4  4.0.3
List.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_LIST_H
00026 #define _MUSICBRAINZ4_LIST_H
00027 
00028 #include "musicbrainz4/Entity.h"
00029 
00030 #include "musicbrainz4/xmlParser.h"
00031 
00032 namespace MusicBrainz4
00033 {
00034         class CListPrivate;
00035 
00036         class CList: public CEntity
00037         {
00038         public:
00039                 CList();
00040                 CList(const CList& Other);
00041                 CList& operator =(const CList& Other);
00042                 virtual ~CList();
00043 
00044                 virtual CList *Clone();
00045 
00046                 int NumItems() const;
00047                 int Offset() const;
00048                 int Count() const;
00049 
00050                 virtual std::ostream& Serialise(std::ostream& os) const;
00051                 static std::string GetElementName();
00052 
00053         protected:
00054                 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
00055                 virtual void ParseElement(const XMLNode& Node);
00056 
00057                 void AddItem(CEntity *Item);
00058                 CEntity *Item(int Item) const;
00059 
00060         private:
00061                 CListPrivate *m_d;
00062 
00063                 void Cleanup();
00064         };
00065 }
00066 
00067 #endif
00068 
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Defines