Re: metadatabase
David Vrabel <[email protected]>
| Newsgroups | gmane.comp.audio.zinf.devel |
|---|---|
| Message-ID | <[email protected]> |
> I think this direction is fine, in fact I have an initial version
> with a vector like "playsheet" that is just a wrapper over
> a vector<string> with some added functionality..
>
> class Playsheet {
> public:
> typedef std::vector<std::string> playlist_type;
> .... other typedefs
> public: // vector interface
> iterator begin() { return m_urls.begin();}
> iterator end() { return m_urls.end();}
> ... other vector intrfaces
>
> public: //Extended interface
> Playsheet();
>
> uint32_t find(const string&url);
> void shuffle();
>
> ...
> }
There's no need for find(const string& url) and shuffle() to be part of
a class. There's, probably, no need for the Playsheet class with it's
extra functions at all in fact -- the Standard Library already has
functions in <algorithm> for searching (find(), find_if() etc) and
shuffling (random_shuffle()) and whole heaps of other stuff.
David Vrabel
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php