Slice Tools
  • Home
  • SourceForge Page


  • libFoundation
  • Home
  • Class Hierarchy
  • Class List
  • Class Members
  • Examples


  • SourceForge.net Logo
     

    CategoryInformation.hh

    Go to the documentation of this file.
    00001 // $Id: CategoryInformation.hh,v 1.1 2005/07/29 02:55:15 mschatz Exp $
    00002 
    00005 
    00006 #ifndef CATEGORYINFORMATION_HH
    00007 #define CATEGORYINFORMATION_HH 1
    00008 
    00009 #include <string>
    00010 #include <list>
    00011 #include "MessageLevel.hh"
    00012 
    00013 class Logger;
    00014 #include "Logger.hh"
    00015 
    00017 
    00023 class CategoryInformation
    00024 {
    00025 public:
    00026   std::string getCategoryName() const;
    00027 
    00028   bool         isEnabled();
    00029   MessageLevel getFilterLevel() const;
    00030   void         setFilterLevel(MessageLevel filterLevel);
    00031 
    00032   MessageLevel getMessageLevel() const;
    00033   void         setMessageLevel(MessageLevel messageLevel);
    00034 
    00035   void         pushMessageLevel(MessageLevel messageLevel);
    00036   void         popMessageLevel();
    00037 
    00038   bool         doLog(MessageLevel messagelevel) const;
    00039 
    00040 private:
    00041   // Only the log manager can create or delete category information
    00042   friend class Logger;
    00043   CategoryInformation(std::string categoryName,
    00044                       MessageLevel messageLevel,
    00045                       MessageLevel filterLevel);
    00046 
    00047   ~CategoryInformation();
    00048 
    00050   bool m_categoryEnabled;
    00051 
    00053   MessageLevel m_messageLevel;
    00054 
    00056   MessageLevel m_filterLevel;
    00057 
    00059   std::string m_categoryName;
    00060 
    00062   std::list<MessageLevel> m_messageLevelStack;
    00063 };
    00064 
    00065 #endif
    00066