Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ALBUM_H
- #define ALBUM_H
- #include <string>
- #include "Track.h"
- #include <vector>
- using std::vector;
- using namespace std;
- class Album
- {
- public:
- Album();
- Album(string a, string t);
- void setArtist(string a);
- void setTitle(string t);
- void setTracklist(vector<Track> tList);
- string getArtist() const;
- string getTitle() const;
- vector<Track>& getTrackList();
- void addTrack(Track t);
- bool compareAlbums(const Album* a1,const Album* a2);
- Track getTrack(string title);
- friend ostream& operator<< (ostream& str, Album& a){
- str << "Album: " << a.getTitle() << " Artist: " << a.getArtist() << "\n";
- for (vector<Track>::iterator it = a.getTrackList().begin(); it != a.getTrackList().end(); it++){
- Track& t = *it;
- str << t <<"\n";
- }
- return str << endl;
- }
- Duration totalTime();
- protected:
- private:
- std::string artist;
- std::string title;
- vector<Track> tracks;
- };
- istream& operator>>(istream& is, Album& a);
- bool compareAlbums(const Album* a1,const Album* a2);
- #endif // ALBUM_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement