author | eilers <eilers> | 2002-09-25 15:53:30 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-09-25 15:53:30 (UTC) |
commit | 5b7e930de7cc42f14b078072b8d23b977001e7b6 (patch) (unidiff) | |
tree | 328e7f5a860e98ba1d1b0c2df456f05baa278209 | |
parent | 38240090027bd68d8dd15d7d46ecf17792edb732 (diff) | |
download | opie-5b7e930de7cc42f14b078072b8d23b977001e7b6.zip opie-5b7e930de7cc42f14b078072b8d23b977001e7b6.tar.gz opie-5b7e930de7cc42f14b078072b8d23b977001e7b6.tar.bz2 |
a small comment be me...
-rw-r--r-- | libopie/pim/DESIGN | 14 |
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 | |||
@@ -1,50 +1,62 @@ | |||
1 | Hija to the DESIGN of our OPIE PIM stuff | 1 | Hija to the DESIGN of our OPIE PIM stuff |
2 | 2 | ||
3 | This design was firstly discussed in the train | 3 | This design was firstly discussed in the train |
4 | from Frankfurt to Hannover between me (zecke ) and eilers. | 4 | from Frankfurt to Hannover between me (zecke ) and eilers. |
5 | 5 | ||
6 | We had a look at our pim implementation and the one from | 6 | We had a look at our pim implementation and the one from |
7 | trolltech and we looked what was missing. | 7 | trolltech and we looked what was missing. |
8 | 8 | ||
9 | GOALS: | 9 | GOALS: |
10 | - clean implementation | 10 | - clean implementation |
11 | - share code | 11 | - share code |
12 | - ObjectOriented Design | 12 | - ObjectOriented Design |
13 | - Scalable | 13 | - Scalable |
14 | - Integration into common solutions like STL and Qt | 14 | - Integration into common solutions like STL and Qt |
15 | - Addition | 15 | - Addition |
16 | - Ease of Use | 16 | - Ease of Use |
17 | 17 | ||
18 | GENERAL: | 18 | GENERAL: |
19 | - use templates | 19 | - use templates |
20 | - have a common base class for all Records OPimRecord | 20 | - have a common base class for all Records OPimRecord |
21 | - use references instead of pointers | 21 | - use references instead of pointers |
22 | - make use of QShared internally memory consumption | 22 | - make use of QShared internally memory consumption |
23 | 23 | ||
24 | We've a 'public' and 'private' part in our lib | 24 | We've a 'public' and 'private' part in our lib |
25 | OPimAccessTemplate is the public part. This will be used | 25 | OPimAccessTemplate is the public part. This will be used |
26 | by 3rd party developers to access the PIMs. | 26 | by 3rd party developers to access the PIMs. |
27 | OPimAccessBackend is the backend. You could also call it | 27 | OPimAccessBackend is the backend. You could also call it |
28 | resource. | 28 | resource. |
29 | 29 | ||
30 | Both things need to be implemented for different kind of records. | 30 | Both things need to be implemented for different kind of records. |
31 | By using templates we can make sure we share code and the reason | 31 | By using templates we can make sure we share code and the reason |
32 | not to use simple inheretance is that we can specialise quite easy. | 32 | not to use simple inheretance is that we can specialise quite easy. |
33 | 33 | ||
34 | For example we have OTodoAccess : public OPimAccessTemplate<OTodo>; | 34 | For example we have OTodoAccess : public OPimAccessTemplate<OTodo>; |
35 | the we would do | 35 | the we would do |
36 | OTodoAccess::List list = otodoAccess.all(); | 36 | OTodoAccess::List list = otodoAccess.all(); |
37 | OTodoAccess::List::Iterator it; | 37 | OTodoAccess::List::Iterator it; |
38 | for( it = list.begin(); it != list.end(); ++it ); | 38 | for( it = list.begin(); it != list.end(); ++it ); |
39 | 39 | ||
40 | 40 | ||
41 | as you can see from here it just behaves like you expect from Qt or STL. | 41 | as you can see from here it just behaves like you expect from Qt or STL. |
42 | 42 | ||
43 | The kewlest thing is that List and List::Iterator is free to use if you | 43 | The kewlest thing is that List and List::Iterator is free to use if you |
44 | want to implement your own OPimAccessTemplate. | 44 | want to implement your own OPimAccessTemplate. |
45 | You just have to sub class it and voila you're done | 45 | You just have to sub class it and voila you're done |
46 | 46 | ||
47 | 47 | ||
48 | Hope you enjoy using OPIE PIM | 48 | Hope you enjoy using OPIE PIM |
49 | 49 | ||
50 | regards Holger 'zecke' Freyther \ No newline at end of file | 50 | regards Holger 'zecke' Freyther |
51 | |||
52 | |||
53 | Comment by Stefan Eilers: | ||
54 | |||
55 | The opimaccesstemplate defines "SortOrder": | ||
56 | I think sortorder is the wrong name for the meaning of it and | ||
57 | it should be defined by the childs of opimaccesstemplate (every | ||
58 | implementation may use different values for this..) | ||
59 | |||
60 | |||
61 | |||
62 | |||