ActiveBubbleSorter.h
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:1k
源码类别:

Symbian

开发平台:

C/C++

  1. // Copyright (c) 2006 Nokia Corporation.
  2. #ifndef __ACTIVEBUBBLESORTER_H__
  3. #define __ACTIVEBUBBLESORTER_H__
  4. #include <e32base.h>
  5. #include <f32file.h>
  6. class MBubbleSortNotify; 
  7. class CActiveBubbleSorter : public CActive
  8. {
  9. public: // Construction/destruction
  10.      static CActiveBubbleSorter* NewL(MBubbleSortNotify& aNotifier);
  11.      ~CActiveBubbleSorter();
  12. protected: // from CActive
  13. // from CActive
  14.      void DoCancel();
  15.      void RunL();
  16. TInt RunError(TInt aError);
  17. private: // Construction
  18.     
  19.      CActiveBubbleSorter(MBubbleSortNotify& aNotifier);
  20.      void ConstructL();
  21. public: // Public functions
  22.      void StartL();
  23.     
  24. private: // Internal functions
  25. void ReadNumbersFromFileL();
  26. void WriteNumbersToFileL();
  27. private: // data
  28.  
  29. TInt                iX;
  30. TInt                iY;
  31.     RArray<TInt>        iNumbersArray;
  32.     MBubbleSortNotify&  iNotifier;  
  33. };
  34. #endif // __ACTIVEBUBBLESORTER_H__
  35. // End of file