- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# mex_datasource.h

    00001 #include "../bdm/bdmerror.h"
    00002 #include "../bdm/stat/datasources.h"
    00003 #include "mex_parser.h"
    00004
    00005 namespace bdm {
    00013 class MexDS : public MemDS {
    00015         MexDS () {};
    00016
    00034         void from_setting ( const Setting &set ) {
    00035                 Data = mxArray2mat ( mexGetVariable ( "base", set["varname"] ) );
    00036                 UI::get ( rowid, set, "rids" , UI::compulsory );
    00037                 bdm_assert_debug ( max ( rowid ) <= Data.rows(), "MemDS rowid is too high for given Dat." );
    00038
    00039                 UI::get ( delays, set, "tds", UI::compulsory );
    00040                 time = max ( delays );
    00041                 bdm_assert_debug ( time < Data.cols(), "MemDS delays are too high." );
    00042
    00043                 shared_ptr<RV> r = UI::build<RV> ( set, "rv", UI::compulsory );
    00044                 RV ru = RV();
    00045                 set_rvs ( *r, ru );
    00046         }
    00047
    00048
    00049         // TODO dodelat void to_setting( Setting &set ) const;
    00050 };
    00051
    00052 UIREGISTER ( MexDS );
    00053 SHAREDPTR ( MexDS );
    00054
    00055 }