00001
00002
00003 #ifndef __ACTIVEBUBBLESORTER_H__
00004 #define __ACTIVEBUBBLESORTER_H__
00005
00006 #include <e32base.h>
00007 #include <f32file.h>
00008
00009 class MBubbleSortNotify;
00010
00011 class CActiveBubbleSorter : public CActive
00012 {
00013 public:
00014
00015 static CActiveBubbleSorter* NewL(MBubbleSortNotify& aNotifier);
00016 ~CActiveBubbleSorter();
00017
00018 protected:
00019
00020
00021 void DoCancel();
00022 void RunL();
00023 TInt RunError(TInt aError);
00024
00025 private:
00026
00027 CActiveBubbleSorter(MBubbleSortNotify& aNotifier);
00028 void ConstructL();
00029
00030 public:
00031
00032 void StartL();
00033
00034 private:
00035
00036 void ReadNumbersFromFileL();
00037 void WriteNumbersToFileL();
00038
00039 private:
00040
00041 TInt iX;
00042 TInt iY;
00043 RArray<TInt> iNumbersArray;
00044 MBubbleSortNotify& iNotifier;
00045 };
00046
00047 #endif // __ACTIVEBUBBLESORTER_H__
00048
00049