Changeset 373

Show
Ignore:
Timestamp:
06/11/09 16:38:30 (15 years ago)
Author:
smidl
Message:

adaptation of mexes to new UI (compiles - does not work!!)

Location:
library/mex
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • library/mex/estimator.cpp

    r314 r373  
    11#include <itpp/itmex.h> 
    22 
    3 #include <stat/libDS_ui.h> 
    4 #include <estim/arx_ui.h> 
     3#include "estim/arx.h" 
     4#include "stat/libDS.h" 
     5#include "stat/loggers.h" 
     6#include "mexlog.h" 
    57 
    6 #include "mexlog.h" 
    7 #include "mexds.h" 
     8//#include "mexds.h" 
    89 
    910using namespace bdm; 
     
    2021         
    2122        printf("name: %s", fname.c_str()); 
    22         UIFile F ( fname.c_str()); 
     23        UI_File F ( fname.c_str()); 
    2324 
    24         logger* L; 
    25         DS * DS; 
    26         BM* E; 
    27         int Ndat; 
    28  
    29         try { 
    30                 UIbuild ( F.lookup ( "logger" ),L ); 
    31                 UIbuild ( F.lookup ( "system" ),DS ); 
    32                 F.lookupValue ( "experiment.ndat",Ndat ); 
    33                 UIbuild ( F.lookup ( "estimator" ),E ); 
    34         } 
    35         catch UICATCH; 
     25        logger* L = UI::build<logger>( F, "logger"); 
     26        ArxDS * DS = UI::build<ArxDS>( F, "system" ); 
     27        BM* E = UI::build<BM>( F, "estimator" ); 
     28        int Ndat = F.lookupValue ( "experiment.ndat",Ndat ); 
    3629 
    3730        DS->log_add ( *L ); 
  • library/mex/mexds.h

    r342 r373  
    1 #include "../bdm/stat/libDS_ui.h" 
     1//#include "../bdm/stat/libDS_ui.h" 
    22 
    33/*! \brief Create memory data source from mxArray 
  • library/mex/mexlog.h

    r347 r373  
    1 #include "../bdm/stat/loggers_ui.h" 
     1#include "stat/loggers.h" 
    22 
     3namespace bdm{ 
    34int mxReplaceFieldNM(mxArray *X,const char * fname,mxArray *X1) 
    45{ 
     
    1920}; 
    2021 
    21 class mexlog : public memlog{ 
     22class mexlog : public memlog { 
    2223        public: 
    2324        //! constructor 
    24         mexlog(int maxlen): memlog(maxlen,"mx"){}; 
     25        mexlog(): memlog(0,"mx"){}; 
    2526        //! 
    2627        mxArray* toCell(){ 
     
    4849                return tmp; 
    4950        } 
     51        void from_setting (const Setting &root){ 
     52          maxlen=root["maxlen"]; 
     53        } 
    5054}; 
    51  
    52 class UImexlog: public UIbuilder{ 
    53         public: 
    54                 UImexlog():UIbuilder("mexlog"){}; 
    55                 bdmroot* build(Setting &S) const{ 
    56                         return new mexlog(S["maxlen"]); 
    57                 }; 
    58 }; 
    59 UIREGISTER(UImexlog); 
     55UIREGISTER(mexlog); 
     56}