home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / business / printcar / printcar.exe / src / Util / AppPreferencesInputStream.h < prev    next >
C/C++ Source or Header  |  2000-06-03  |  1KB  |  47 lines

  1. //
  2. //  $Id: AppPreferencesInputStream.h,v 1.1.1.1 2000/06/02 22:23:01 sergey Exp $
  3. //
  4.  
  5. #ifndef _AppPreferencesInputStream_h_
  6. #define _AppPreferencesInputStream_h_
  7.  
  8. #include "DataInputStream.h"
  9. #include "MemBuffer.h"
  10.  
  11.  
  12. namespace Util
  13. {
  14.     //
  15.     //  This class represents an Application preferences as an input data stream.
  16.     //  The process of loading the application preferences could be easily done through
  17.     //  the Serializable interface.
  18.     //
  19.     class AppPreferencesInputStream: public DataInputStream
  20.     {
  21.     public:
  22.         AppPreferencesInputStream();
  23.         virtual ~AppPreferencesInputStream();
  24.  
  25.     // copy is not alloved
  26.     private:
  27.         AppPreferencesInputStream(const AppPreferencesInputStream& other);
  28.         AppPreferencesInputStream& operator =(const AppPreferencesInputStream& other);
  29.  
  30.     // operations
  31.     public:
  32.         bool open(DWord creatorID, Word preferencesID);
  33.         void close();
  34.  
  35.         virtual int readData(void* data, int size) const;
  36.         virtual bool eof() const;
  37.  
  38.     // data member
  39.     private:
  40.         MemBuffer   _buffer;
  41.         mutable int _position;
  42.     };
  43. }
  44. // namespace Util
  45.  
  46. #endif // _AppPreferences_h_
  47.