Changeset 383
- Timestamp:
- 06/17/09 23:54:11 (16 years ago)
- Files:
-
- 1 added
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libBM.h
r378 r383 566 566 567 567 */ 568 class mepdf : public mpdf 569 { 570 public: 571 //!Default constructor 572 mepdf(epdf* em) : mpdf() {ep = em ;}; 573 mepdf(const epdf* em) : mpdf() {ep = const_cast<epdf*>(em);}; 574 void condition(const vec &cond) {} 568 class mepdf : public mpdf { 569 bool owning_ep; // flag trigers deleting ep by destructor 570 public: 571 //!Default constructor 572 mepdf ( epdf* em, bool owning_ep0=false ) :mpdf ( ) {ep= em ;owning_ep=owning_ep0;}; 573 mepdf (const epdf* em ) :mpdf ( ) {ep=const_cast<epdf*>( em );}; 574 void condition ( const vec &cond ) {} 575 ~mepdf(){if (owning_ep) delete ep;} 575 576 }; 576 577 … … 578 579 //!this abstract class is common to epdf and mpdf 579 580 //!\todo Think of better design - global functions rv=get_rv(Array<mpdf*> mpdfs); ?? 580 class compositepdf 581 { 581 class compositepdf { 582 582 protected: 583 583 //!Number of mpdfs in the composite -
bdm/user_info.cpp
r377 r383 106 106 const Setting& UI::SettingResolver::initialize_reference(UI_File *&file, const Setting &potential_link) 107 107 { 108 file = NULL; 109 108 110 if ( potential_link.getType() != Setting::TypeString ) 109 111 return potential_link; … … 122 124 else 123 125 { 124 file = NULL;125 126 result = &potential_link; 126 127 while ( !result->isRoot() ) -
bdm/user_info.h
r378 r383 232 232 { 233 233 T* instance; 234 from_setting<T>( to_child_setting( element, index ) );234 from_setting<T>( instance, to_child_setting( element, index ) ); 235 235 return instance; 236 236 } -
library/mex/mexlog.h
r373 r383 20 20 }; 21 21 22 void Arrayvec2mxArray(const Array<vec> &in, mxArray *out) 23 { 24 int rows, cols, r, c; 25 26 double* temp = (double *) mxGetPr(out); 27 if (temp == 0) mexErrMsgTxt("mat2mxArray: Pointer to data is NULL"); 28 29 cols = in.size(); 30 if (cols == 0) mexErrMsgTxt("mat2mxArray: Data has zero columns"); 31 32 rows = in(0).length(); //length of the first vec 33 if (rows == 0) mexErrMsgTxt("mat2mxArray: Data has zero rows"); 34 35 for (c = 0; c < cols; c++) { 36 for (r = 0; r < rows; r++) { 37 *temp++ = in(c)(r); 38 } 39 } 40 41 } 22 42 class mexlog : public memlog { 23 43 public: