libmusicbrainz5  5.1.0
Rating.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_RATING_H
27 #define _MUSICBRAINZ5_RATING_H
28 
29 #include <iostream>
30 
31 #include "musicbrainz5/Entity.h"
32 
33 #include "musicbrainz5/xmlParser.h"
34 
35 namespace MusicBrainz5
36 {
37  class CRatingPrivate;
38 
39  class CRating: public CEntity
40  {
41  public:
42  CRating(const XMLNode& Node=XMLNode::emptyNode());
43  CRating(const CRating& Other);
44  CRating& operator =(const CRating& Other);
45  virtual ~CRating();
46 
47  virtual CRating *Clone();
48 
49  int VotesCount() const;
50  double Rating() const;
51 
52  virtual std::ostream& Serialise(std::ostream& os) const;
53  static std::string GetElementName();
54 
55  protected:
56  virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57  virtual void ParseElement(const XMLNode& Node);
58 
59  private:
60  CRatingPrivate * const m_d;
61  };
62 }
63 
64 #endif
MusicBrainz5::CRating
Definition: Rating.h:39
MusicBrainz5::CRating::ParseAttribute
virtual void ParseAttribute(const std::string &Name, const std::string &Value)
MusicBrainz5::CRating::~CRating
virtual ~CRating()
MusicBrainz5::CRating::Serialise
virtual std::ostream & Serialise(std::ostream &os) const
MusicBrainz5::CRating::Clone
virtual CRating * Clone()
MusicBrainz5::CRating::GetElementName
static std::string GetElementName()
MusicBrainz5::CEntity
Definition: Entity.h:42
MusicBrainz5::CRating::CRating
CRating(const XMLNode &Node=XMLNode::emptyNode())
Entity.h
MusicBrainz5::CRating::Rating
double Rating() const
MusicBrainz5::CRating::VotesCount
int VotesCount() const
MusicBrainz5::CRating::ParseElement
virtual void ParseElement(const XMLNode &Node)
MusicBrainz5
Definition: Alias.h:36
MusicBrainz5::CRating::operator=
CRating & operator=(const CRating &Other)