home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / TESTDIR.PAK / FILEDATA.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  2KB  |  81 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*  FILEDATA.H                                                            */
  4. /*                                                                        */
  5. /*  Copyright (c) 1991, 1993 Borland International                        */
  6. /*  All Rights Reserved.                                                  */
  7. /*                                                                        */
  8. /*  Sorted container example header file                                  */
  9. /*                                                                        */
  10. /*------------------------------------------------------------------------*/
  11.  
  12. #ifndef __FILEDATA_H
  13. #define __FILEDATA_H
  14.  
  15. #if !defined( __CSTRING_H )
  16. #include <cstring.h>
  17. #endif  // __CSTRING_H
  18.  
  19. #if !defined( __CLASSLIB__TIME_H )
  20. #include "classlib\time.h"
  21. #endif  // __LTIME_H
  22.  
  23. #ifndef __DIR_H
  24. #include <dir.h>
  25. #endif
  26.  
  27. class FileData
  28. {
  29.  
  30. public:
  31.  
  32.     FileData( ffblk& );
  33.  
  34.     friend ostream& operator << ( ostream&, const FileData& );
  35.  
  36. protected:
  37.  
  38.     string FileName;
  39.     TTime FileTime;
  40.     long FileSize;
  41.  
  42. };
  43.  
  44. class FilesByName : public FileData
  45. {
  46.  
  47. public:
  48.  
  49.     FilesByName( ffblk& blk ) : FileData( blk ) {}
  50.  
  51.     int operator == ( const FilesByName& ) const;
  52.     int operator <  ( const FilesByName& ) const ;
  53.  
  54. };
  55.  
  56. class FilesByDate : public FileData
  57. {
  58.  
  59. public:
  60.  
  61.     FilesByDate( ffblk& blk ) : FileData( blk ) {}
  62.  
  63.     int operator == ( const FilesByDate& ) const;
  64.     int operator <  ( const FilesByDate& ) const;
  65.  
  66. };
  67.  
  68. class FilesBySize : public FileData
  69. {
  70.  
  71. public:
  72.  
  73.     FilesBySize( ffblk& blk ) : FileData( blk ) {}
  74.  
  75.     int operator == ( const FilesBySize& ) const;
  76.     int operator <  ( const FilesBySize& ) const;
  77.  
  78. };
  79.  
  80. #endif    
  81.