diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_database.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_database.html Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,257 @@ + + +TB10.1 Example Applications: CDatabase Class Reference + + + + +

CDatabase Class Reference

+

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual ~CDatabase ()
void CreateDatabaseL ()
void ReadfromDatabaseL ()
void WritetoDatabaseL ()
void PeriodicReadFuncL ()
void PeriodicWriteFuncL ()

Static Public Member Functions

static CDatabaseNewL ()
static TInt PeriodicReadL (TAny *aPtr)
static TInt PeriodicWriteL (TAny *aPtr)

Protected Member Functions

void ConstructL ()
+


Detailed Description

+This is a database class which is used by two different threads to demonstrate thread synchronization using a semaphore. +

Definition at line 28 of file CDatabase.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
CDatabase::~CDatabase (  )  [virtual]
+
+
+ +

+Destructor +

Definition at line 41 of file CDatabase.cpp.

+ +
+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
CDatabase * CDatabase::NewL (  )  [static]
+
+
+ +

+NewL() +

Definition at line 29 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::CreateDatabaseL (  ) 
+
+
+ +

+Creates database in the store and create a table and add columns to it. +

Definition at line 79 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::ReadfromDatabaseL (  ) 
+
+
+ +

+This function is called by the ReaderThread in SemaphoreExample. It creates a console to display the data read from the database and starts a periodic function to read the database at an interval of 1 second. +

Definition at line 220 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::WritetoDatabaseL (  ) 
+
+
+ +

+This function is called by the WriteThread in the SemaphoreExample and it starts a periodic function to write data in the database at an interval of 1 sec. +

Definition at line 135 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + + +
TInt CDatabase::PeriodicReadL (TAny *  aPtr  )  [static]
+
+
+ +

+The call back function associated with the CPeriodic object of the CDatabase class and is called by the ReadfromDatabaseL() function. +

Definition at line 237 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::PeriodicReadFuncL (  ) 
+
+
+ +

+This function is called periodically at an interval of 1 second, it opens the database , reads one row and displays the numbers to the console. +

Definition at line 248 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + + +
TInt CDatabase::PeriodicWriteL (TAny *  aPtr  )  [static]
+
+
+ +

+The call back function associated with the CPeriodic object of the CDatabase class and is called by the WritetoDatabaseL() function. +

Definition at line 145 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::PeriodicWriteFuncL (  ) 
+
+
+ +

+This function is called periodically at an interval of 1 sec, it opens the database, inserts one row and fills it with integer values. +

Definition at line 157 of file CDatabase.cpp.

+ +
+

+ +

+
+ + + + + + + + +
void CDatabase::ConstructL (  )  [protected]
+
+
+ +

+Constructs a CPeriodic object, a database , opens the global semaphore. +

Definition at line 54 of file CDatabase.cpp.

+ +
+

+


Generated on Thu Jan 21 10:33:04 2010 for TB10.1 Example Applications by  + +doxygen 1.5.3
+ +