36 // ======== MEMBER FUNCTIONS ======== |
36 // ======== MEMBER FUNCTIONS ======== |
37 |
37 |
38 /*! |
38 /*! |
39 |
39 |
40 \class CaService. |
40 \class CaService. |
41 \brief This class operates on data, anable creating and inserting new entry |
41 \brief This class operates on data, enables creating and inserting new entry |
42 to DB, removing entry from DB, update entry or get entry from DB, execute |
42 to DB, removing entry from DB, update entry or get entry from DB, execute |
43 command on entry and create notifier to notify client about changes onto DB. |
43 command on entry and create notifier to notify a client about changes onto DB. |
44 |
44 |
45 CaService class uses singleton design pattern, so that it contains static |
45 CaService class uses singleton design pattern, so that it contains static |
46 method called instance() to get instance of a class. |
46 method called instance() to get instance of a class. |
47 |
47 |
|
48 References to CaService instance are counted. When the number of references |
|
49 drops to zero the instance is deleted to save memory. |
|
50 CaNotifier class contains a member referencing to the CaService instance so |
|
51 it is not deleted unless all CaNotifier instances are deleted (and there are |
|
52 no variables referencing CaService). |
|
53 |
48 \code |
54 \code |
49 QSharedPointer<CaService> service = CaService::instance(); |
55 QSharedPointer<CaService> service = CaService::instance(); |
50 \endcode |
56 \endcode |
51 |
57 |
52 For every operations on data is used always one instantiation of a class. |
58 For every operations on data is used always one instantiation of the class. |
53 Below are examples how to create data and work on those ones. |
59 Below, there are examples how to create data and work on those ones. |
54 |
60 |
55 */ |
61 */ |
56 |
62 |
57 /*! |
63 /*! |
58 \var CaServicePrivate::m_q |
64 \var CaServicePrivate::m_q |