summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/DESIGN14
1 files changed, 13 insertions, 1 deletions
diff --git a/libopie/pim/DESIGN b/libopie/pim/DESIGN
index d878f45..4def7b9 100644
--- a/libopie/pim/DESIGN
+++ b/libopie/pim/DESIGN
@@ -26,25 +26,37 @@ OPimAccessTemplate is the public part. This will be used
26by 3rd party developers to access the PIMs. 26by 3rd party developers to access the PIMs.
27OPimAccessBackend is the backend. You could also call it 27OPimAccessBackend is the backend. You could also call it
28resource. 28resource.
29 29
30Both things need to be implemented for different kind of records. 30Both things need to be implemented for different kind of records.
31By using templates we can make sure we share code and the reason 31By using templates we can make sure we share code and the reason
32not to use simple inheretance is that we can specialise quite easy. 32not to use simple inheretance is that we can specialise quite easy.
33 33
34For example we have OTodoAccess : public OPimAccessTemplate<OTodo>; 34For example we have OTodoAccess : public OPimAccessTemplate<OTodo>;
35the we would do 35the we would do
36OTodoAccess::List list = otodoAccess.all(); 36OTodoAccess::List list = otodoAccess.all();
37OTodoAccess::List::Iterator it; 37OTodoAccess::List::Iterator it;
38for( it = list.begin(); it != list.end(); ++it ); 38for( it = list.begin(); it != list.end(); ++it );
39 39
40 40
41as you can see from here it just behaves like you expect from Qt or STL. 41as you can see from here it just behaves like you expect from Qt or STL.
42 42
43The kewlest thing is that List and List::Iterator is free to use if you 43The kewlest thing is that List and List::Iterator is free to use if you
44want to implement your own OPimAccessTemplate. 44want to implement your own OPimAccessTemplate.
45You just have to sub class it and voila you're done 45You just have to sub class it and voila you're done
46 46
47 47
48Hope you enjoy using OPIE PIM 48Hope you enjoy using OPIE PIM
49 49
50regards Holger 'zecke' Freyther \ No newline at end of file 50regards Holger 'zecke' Freyther
51
52
53Comment by Stefan Eilers:
54
55The opimaccesstemplate defines "SortOrder":
56I think sortorder is the wrong name for the meaning of it and
57it should be defined by the childs of opimaccesstemplate (every
58implementation may use different values for this..)
59
60
61
62