[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] HACKING/architecture: Add short text explaining Meta types.
From:       Bart Cerneels <bart.cerneels () kde ! org>
Date:       2012-09-22 15:12:16
Message-ID: 20120922151216.3A3ABA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 670b5c686a4053ec0aa9affb4efcf7d685077764 by Bart Cerneels.
Committed on 22/09/2012 at 11:13.
Pushed by shanachie into branch 'master'.

Add short text explaining Meta types.

A  +13   -0    HACKING/architecture/Meta.txt

http://commits.kde.org/amarok/670b5c686a4053ec0aa9affb4efcf7d685077764

diff --git a/HACKING/architecture/Meta.txt b/HACKING/architecture/Meta.txt
new file mode 100644
index 0000000..d3b3171
--- /dev/null
+++ b/HACKING/architecture/Meta.txt
@@ -0,0 +1,13 @@
+Meta Architecture
+-----------------
+
+Objects representing a media in a hierarchy. There are classes for Tracks,=
 Albums, Artists, Composers, Genres, Years and Labels.
+These classes all derive from Meta::MetaBase to facilitate their common me=
thods (name and sorting) and observer interaction. They are not QObjects to=
 avoid the overhead of the Qt MetaObject support variables. Collections are=
 potentially millions of tracks where a significant proportion of tracks (i=
n the case of MemoryCollections: all tracks) could at any time be loaded in=
 memory.
+
+Meta::Observer is a virtual class that can be derived from by components t=
hat are interested in changes to the tracks during application lifetime. It=
 has metadataChanged() methods for each of the Meta types and the ability t=
o subscribe to any Meta object.
+
+[Note] Playlists will be made part of Meta as well. They have a similar Ob=
server pattern but have been kept seperate because PlaylistObserver require=
s more functions. Pollution of the Observer class could be avoided using a =
playlistChanged(enum Change, QVariant value) type method.
+
+KSharedPtr is used for all functions returning a pointer in the Meta class=
es. It strong, reference tracking smart pointer which will only delete an o=
bject once the last reference holding KSharedPtr goes out of scope or is de=
leted.
+
+[Mat=C4=95j's proposal] Use only value-passing for Meta types with implici=
t data sharing. This can be implemented using QSharedDataPointer. An exampl=
e of such a value class is QString.
\ No newline at end of file

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic