home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / profile / advprof / enhprof.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  1.7 KB  |  85 lines

  1. #ifndef _ENHPROF_
  2. #define _ENHPROF_
  3. //************************************************************
  4. // GUI Profile Viewer Example
  5. //
  6. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  7. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  8. // All Rights Reserved.
  9. //************************************************************
  10. #include <istring.hpp>
  11. #include <iprofile.hpp>
  12.  
  13. class ostream;
  14.  
  15. class EnhancedProfile : public IProfile {
  16. public:
  17.   EnhancedProfile ( const IString &name, 
  18.                     Boolean createIfNotFound = false );
  19.   EnhancedProfile ( const IProfile &profile );
  20.  
  21. virtual void
  22.   displayOn ( ostream &aStream, 
  23.               const IString &apps,
  24.               const IString &keys ) const;
  25.  
  26. EnhancedProfile
  27.  &open ( );
  28.  
  29. protected:
  30. static IString
  31.   validate ( const IString &name, 
  32.              Boolean createIfNotFound );
  33. };
  34.  
  35.  
  36. class ProfileApplication : public IVBase {
  37. public:
  38.   ProfileApplication ( const IProfile &profile, 
  39.                        const IString &name );
  40.   ~ProfileApplication ( );
  41.  
  42. virtual IString
  43.   name ( ) const;
  44.  
  45. virtual IProfile
  46.   profile ( ) const;
  47.  
  48. virtual void
  49.   displayOn ( ostream &aStream, 
  50.               const IString &keys ) const;
  51.  
  52. private: 
  53. IProfile
  54.   prof;
  55. IString
  56.   nm;
  57. };
  58.  
  59.  
  60. class ProfileKey : public IVBase {
  61. public:
  62.   ProfileKey ( const ProfileApplication &profApp, 
  63.                const IString &name );
  64.   ~ProfileKey ( );
  65.  
  66. virtual IString
  67.   name      ( ) const,
  68.   value     ( ) const,
  69.   formatted ( unsigned tabs = 0 ) const;
  70.  
  71. virtual ProfileApplication
  72.   application ( ) const;
  73.  
  74. virtual void
  75.   displayOn ( ostream &aStream ) const;
  76.  
  77. private: 
  78. ProfileApplication
  79.   app;
  80. IString
  81.   nm;
  82. }; 
  83.  
  84. #endif // _ENHPROF_
  85.