comparison liboctave/Array.h @ 5900:c20eb7330d13

[project @ 2006-07-22 08:31:16 by jwe]
author jwe
date Sat, 22 Jul 2006 08:31:17 +0000
parents ace8d8d26933
children 143b556ce725
comparison
equal deleted inserted replaced
5899:82c38ce145a7 5900:c20eb7330d13
129 else 129 else
130 rep->fill (val); 130 rep->fill (val);
131 } 131 }
132 132
133 public: 133 public:
134
135 typedef T element_type;
134 136
135 // !!! WARNING !!! -- these should be protected, not public. You 137 // !!! WARNING !!! -- these should be protected, not public. You
136 // should not access these data members directly! 138 // should not access these data members directly!
137 139
138 typename Array<T>::ArrayRep *rep; 140 typename Array<T>::ArrayRep *rep;
532 const T& rfv = resize_fill_value (T ())) const; 534 const T& rfv = resize_fill_value (T ())) const;
533 535
534 // static T resize_fill_value (void) { return T (); } 536 // static T resize_fill_value (void) { return T (); }
535 537
536 void print_info (std::ostream& os, const std::string& prefix) const; 538 void print_info (std::ostream& os, const std::string& prefix) const;
539
540 // Unsafe. This function exists to support the MEX interface.
541 // You should not use it anywhere else.
542 void *mex_get_data (void) const { return const_cast<T *> (data ()); }
537 }; 543 };
538 544
539 // NOTE: these functions should be friends of the Array<T> class and 545 // NOTE: these functions should be friends of the Array<T> class and
540 // Array<T>::dimensions should be protected, not public, but we can't 546 // Array<T>::dimensions should be protected, not public, but we can't
541 // do that because of bugs in gcc prior to 3.3. 547 // do that because of bugs in gcc prior to 3.3.