libmusicbrainz4  4.0.3
Medium.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2 
3  libmusicbrainz4 - Client library to access MusicBrainz
4 
5  Copyright (C) 2011 Andrew Hawkins
6 
7  This file is part of libmusicbrainz4.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of v2 of the GNU Lesser General Public
11  License as published by the Free Software Foundation.
12 
13  libmusicbrainz4 is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21  $Id$
22 
23 ----------------------------------------------------------------------------*/
24 
25 #ifndef _MUSICBRAINZ4_MEDIUM_H
26 #define _MUSICBRAINZ4_MEDIUM_H
27 
28 #include <string>
29 #include <iostream>
30 
31 #include "musicbrainz4/Entity.h"
32 #include "musicbrainz4/DiscList.h"
33 #include "musicbrainz4/TrackList.h"
34 
35 #include "musicbrainz4/xmlParser.h"
36 
37 namespace MusicBrainz4
38 {
39  class CMediumPrivate;
40 
41  class CMedium: public CEntity
42  {
43  public:
44  CMedium(const XMLNode& Node=XMLNode::emptyNode());
45  CMedium(const CMedium& Other);
46  CMedium& operator =(const CMedium& Other);
47  virtual ~CMedium();
48 
49  virtual CMedium *Clone();
50 
51  std::string Title() const;
52  int Position() const;
53  std::string Format() const;
54  CDiscList *DiscList() const;
55  CTrackList *TrackList() const;
56 
57  bool ContainsDiscID(const std::string& DiscID) const;
58 
59  virtual std::ostream& Serialise(std::ostream& os) const;
60  static std::string GetElementName();
61 
62  protected:
63  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
64  virtual void ParseElement(const XMLNode& Node);
65 
66  private:
67  void Cleanup();
68 
69  CMediumPrivate * const m_d;
70  };
71 }
72 
73 #endif
static std::string GetElementName()
std::string Title() const
CMedium(const XMLNode &Node=XMLNode::emptyNode())
Definition: Entity.h:41
Definition: Medium.h:41
virtual void ParseElement(const XMLNode &Node)
std::string Format() const
CTrackList * TrackList() const
virtual std::ostream & Serialise(std::ostream &os) const
bool ContainsDiscID(const std::string &DiscID) const
CMedium & operator=(const CMedium &Other)
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
CDiscList * DiscList() const
virtual CMedium * Clone()
Definition: Alias.h:35
Definition: ListImpl.h:33