00001
00014 #ifndef LGR_UI_H
00015 #define LGR_UI_H
00016
00017 #include "loggers.h"
00018 #include "uibuilder.h"
00019
00020 using namespace bdm;
00021
00036 class UIrv: public UIbuilder{
00037 public:
00038 UIrv():UIbuilder("rv"){};
00039 bdmroot* build(Setting &S) const{
00040 Array<string> A=get_as(S["names"]);
00041 ivec szs;
00042 ivec tms;
00043 if (S.exists("sizes")){
00044 szs=getivec(S["sizes"]);
00045 } else {
00046 szs = ones_i(A.length());
00047 }
00048 if (S.exists("times")){
00049 tms=getivec(S["times"]);
00050 } else {
00051 tms = zeros_i(A.length());
00052 }
00053 RV *tmp = new RV(A,szs,tms);
00054 return tmp;
00055 };
00056 };
00057 UIREGISTER(UIrv);
00058
00068 class UIdirfilelog : public UIbuilder {
00069 public:
00070 UIdirfilelog():UIbuilder("dirfilelog"){};
00071 bdmroot* build(Setting &S) const{
00072 return new dirfilelog(S["dirname"],S["maxlen"]);
00073 };
00074 };
00075
00076 UIREGISTER(UIdirfilelog);
00077
00078
00088 class UIitpplog : public UIbuilder {
00089 public:
00090 UIitpplog():UIbuilder("itpplog"){};
00091 bdmroot* build(Setting &S) const{
00092 return new memlog(S["maxlen"],S["filename"]);
00093 };
00094 };
00095
00096 UIREGISTER(UIitpplog);
00097 #endif // LGR_H