Changeset 271 for bdm/stat/loggers_ui.h

Show
Ignore:
Timestamp:
02/16/09 10:03:13 (15 years ago)
Author:
smidl
Message:

Next major revision

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/loggers_ui.h

    r263 r271  
     1 
    12/*! 
    23  \file 
     
    1920using namespace bdm; 
    2021 
     22/*! \brief UI for class RV (description of data vectors) 
     23 
     24\code 
     25rv = { 
     26        type = "rv"; //identifier of the description 
     27        // UNIQUE IDENTIFIER same names = same variable 
     28        names = ["a", "b", "c", ...];   // which will be used e.g. in loggers  
     29 
     30        //optional arguments 
     31        sizes = [1, 2, 3, ...];         // (optional) default = ones() 
     32        times = [-1, -2, 0, ...];       // time shifts with respect to current time (optional) default = zeros() 
     33} 
     34\endcode 
     35*/ 
     36class UIrv: public UIbuilder{ 
     37        public: 
     38                UIrv():UIbuilder("rv"){}; 
     39                bdmroot* build(Setting &S) const{ 
     40                        Array<string> A=get_as(S["names"]); 
     41                        ivec szs; 
     42                        ivec tms; 
     43                        if (S.exists("sizes")){  
     44                                szs=getivec(S["sizes"]); 
     45                        } else { 
     46                                szs = ones_i(A.length()); 
     47                        } 
     48                        if (S.exists("times")){  
     49                                tms=getivec(S["times"]); 
     50                        } else { 
     51                                tms = zeros_i(A.length()); 
     52                        } 
     53                        RV *tmp = new RV(A,szs,tms); 
     54                        return tmp; 
     55                }; 
     56}; 
     57UIREGISTER(UIrv); 
     58 
     59/*! \brief UI for dirfilelog (Kst file format)  
     60\code 
     61logger = { 
     62        type = "dirfilelog"; 
     63        dirmane = "directory_for_files"; // resulting files will be stored there 
     64        maxlen = 100;                    // size of memory buffer, when full results are written to disk 
     65} 
     66\endcode 
     67*/ 
    2168class UIdirfilelog : public UIbuilder { 
    2269        public: