Changeset 942 for library/bdm/bdmroot.h

Show
Ignore:
Timestamp:
05/14/10 12:16:00 (14 years ago)
Author:
mido
Message:

the functionality of user info was improved, it supports an initialization of root descendant via UI::get directly, however it is save only for static attributes, for dynamically allocated attributes UI::build should be called to handle with intahrence issues

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/bdmroot.h

    r915 r942  
    4141//! Forward class declaration 
    4242class logger; 
    43  
    44 //! base class for all log_levels 
    45 //! 
    46 //! the existence of this class is forced by the necessity of passing log_levels to user_info methods, however, the main functionality 
    47 //! is located in \c log_level_template class 
    48 class log_level_base { 
    49 private: 
    50         // UserInfo class have to be able to read all the internal  
    51         // attributes to be able to write/read log_level to/from a Setting structure 
    52         friend class UI; 
    53  
    54         //! this is necessary to allow logger to set ids vector appropriately and also to set registered_logger 
    55         friend class logger;  
    56  
    57 protected: 
    58         //! boolean flags related indicating which details will be logged to a logger 
    59         bitset<32> values; 
    60          
    61         //! vector of vectors of log IDs - one element for each entry and multiple entries can be stored on the position of one enum 
    62         Vec<ivec> ids; 
    63  
    64         //! internal pointer to the logger to which this log_level is registered 
    65         //!  
    66         //! it is set to NULL at the beginning 
    67         logger * registered_logger; 
    68  
    69 public: 
    70         //! default constructor 
    71         log_level_base() { 
    72                 registered_logger = NULL; 
    73         } 
    74  
    75  
    76         //! a general utility transforming a comma-separated sequence of strings into an instance of Array<strings> 
    77         static Array<string> string2Array( const string &input ); 
    78  
    79         //! string equivalents of the used enumerations which are filled with a help of #LOG_LEVEL macro within class T 
    80         virtual const Array<string> &names() const = 0; 
    81 }; 
    8243 
    8344//! Root class of BDM objects