Mercurial > hg > octave-nkf
diff src/ov-cell.h @ 8815:af907aeedbf4
cache cellstr_value in ov-cell
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 19 Feb 2009 16:37:17 +0100 |
parents | 3ef774603887 |
children | 3efa512a0957 |
line wrap: on
line diff
--- a/src/ov-cell.h +++ b/src/ov-cell.h @@ -86,6 +86,12 @@ const std::list<octave_value_list>& idx, const octave_value& rhs); + void assign (const octave_value_list& idx, const Cell& rhs); + + void assign (const octave_value_list& idx, const octave_value& rhs); + + void delete_elements (const octave_value_list& idx); + size_t byte_size (void) const; octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; @@ -105,7 +111,7 @@ bool is_cell (void) const { return true; } - bool is_cellstr (void) const { return matrix.is_cellstr (); } + bool is_cellstr (void) const; bool is_true (void) const; @@ -160,8 +166,18 @@ mxArray *as_mxArray (void) const; + // Unsafe. This function exists to support the MEX interface. + // You should not use it anywhere else. + void *mex_get_data (void) const; + private: + void clear_cellstr_cache (void) const; + + mutable Array<std::string> cellstr_cache; + + void make_cellstr_cache (void) const; + DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA