Namespace hierarchies
Bart Cerneels
bart.cerneels at kde.org
Mon Mar 29 21:10:18 CEST 2010
...continuing a discussion started on IRC.
In core we have several new namespaces: Meta, Collections, Podcasts,
Playlists, ...
There are 2 options for namespace hierarchies in the implementations:
1) grouped by implementation backend:
ex. for Sql
Sql::Collecion
Sql::Meta::Track
Sql::Playlist
Sql::Podcast::Episode
2) or by core namespace:
Collections::SqlCollection
Meta::Sql::Track
Playlists::Sql::Playlist
Podcasts::Sql::Episode
Before any more big commits are made we should discuss.
Note that we already use both in a way:
- Podcasts::SqlPodcastChannel though it's generally agreed that this
is misuse of the namespace.
- MetaFile::Track
I think 1) is superior because it saves massively on typing (ex):
using namespace Sql:::Podcast;
QString
Channel::title()
{}
Bart
More information about the Amarok-devel
mailing list