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

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Definition of TProfile class
  6. //----------------------------------------------------------------------------
  7. #if !defined(OWL_PROFILE_H)
  8. #define OWL_PROFILE_H
  9.  
  10. #if !defined(OWL_OWLDEFS_H)
  11. # include <owl/owldefs.h>
  12. #endif
  13.  
  14. //
  15. //  class TProfile
  16. //  ----- --------
  17. //
  18. class _OWLCLASS TProfile  {
  19.   public:
  20.     // Use system profile for filename==0
  21.     //
  22.     TProfile(const char* section, const char* filename = 0);
  23.    ~TProfile();
  24.  
  25.     int GetInt(const char* key, int defaultInt = 0);
  26.  
  27.     // Returns all section values if key==0
  28.     //
  29.     bool GetString(const char* key, char buff[], 
  30.                    unsigned buffSize, const char* defaultString = "");
  31.  
  32.     bool WriteInt(const char* key, int value);
  33.     bool WriteString(const char* key, const char* str);
  34.  
  35.   private:
  36.     char* Section;
  37.     char* FileName;
  38. };
  39.  
  40. #endif  // OWL_PROFILE_H
  41.