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