Changeset 853 for library/bdm/bdmroot.h

Show
Ignore:
Timestamp:
03/05/10 11:12:07 (14 years ago)
Author:
mido
Message:

small patch of LOGGERS and DOCUMENTATION

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/bdmroot.h

    r850 r853  
    3838void UI_DBG (const Setting &S, const string &spc, ostream &out ); 
    3939         
    40  
    4140//! level of details that will be logged to a logger 
    4241// DULEZITE TODO - zde musi respektovat aktualne ulozene hodnoty, tj. nacist je, pak pridat 
     
    5352        bitset<32> values; 
    5453 
    55         virtual const Array<string> &names() const 
    56         { 
    57                 return T::__option_names(); 
     54        const Array<string> &names() const 
     55        { 
     56                return T::option_names(); 
    5857        } 
    5958 
     
    7776 
    7877// MUZEME INTERNE POUZIVAT ENUMY, A KLIDNE MENIT JEJICH PORADI, DIKY TOMUHLE MAKRU SE VZDY NAMAPUJI NA TY SPRAVNE STRINGY  
    79 #define LOG_LEVEL(CLASSNAME,...) private: friend class logged_options<CLASSNAME>; static const Array<string> &__option_names() { static const Array<string> option_names( "{"#__VA_ARGS__"}" ); return option_names; }; public: enum possible_options { __VA_ARGS__ }; logged_options<CLASSNAME> log_level; 
     78#define LOG_LEVEL(CLASSNAME,...) private: friend class logged_options<CLASSNAME>; static const Array<string> &option_names() { static const Array<string> option_names( "{"#__VA_ARGS__"}" ); return option_names; }; public: enum possible_options { __VA_ARGS__ }; logged_options<CLASSNAME> log_level; 
    8079 
    8180//forward declaration 
     
    9695//! Root class of BDM objects 
    9796class root { 
     97private: 
     98        //! It is necessary to allow calling of from_setting and to_setting within the UI class ++ i log_options 
     99        friend class UI; 
     100 
     101        // TODO okomentovat 
     102        static const Array<string> &option_names()  
     103        {  
     104                static const Array<string> option_names;  
     105                return option_names;  
     106        };  
     107 
    98108protected: 
    99109        //! record of connections to the logger 
    100110        log_record* logrec; 
    101  
    102         //! It is necessary to allow calling of from_setting and to_setting within the UI class 
    103         friend class UI; 
    104111 
    105112        /*!      
     
    182189 
    183190public: 
    184         enum possible_options{}; 
     191        // TODO okomentovat 
     192        enum possible_options { }; 
     193 
    185194        //!default constructor 
    186195        root() : logrec ( NULL ) {};