home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / PROFILE.H < prev    next >
C/C++ Source or Header  |  1996-01-05  |  752b  |  36 lines

  1. #ifndef _TLX_PROFILE_H
  2. #define _TLX_PROFILE_H
  3.  
  4. #ifndef _TLX_TLX_H
  5. #include <tlx\501\tlx.h>
  6. #endif
  7.  
  8. //
  9. //  class TProfile
  10. //  ----- --------
  11. //
  12. class _TLXCLASS TProfile
  13. {
  14.   public:
  15.     // Use system profile for filename==0
  16.     //
  17.     TProfile(const char* section, const char* filename = 0);
  18.    ~TProfile();
  19.  
  20.     int GetInt(const char* key, int defaultInt = 0);
  21.  
  22.     // Returns all section values if key==0
  23.     //
  24.     bool GetString(const char* key, char buff[],
  25.                    unsigned buffSize, const char* defaultString = "");
  26.  
  27.     bool WriteInt(const char* key, int value);
  28.     bool WriteString(const char* key, const char* str);
  29.  
  30.   private:
  31.     char* Section;
  32.     char* FileName;
  33. };
  34.  
  35. #endif  // _TLX_PROFILE_H
  36.