comparison libinterp/octave-value/ov.h @ 31448:9a0ce9eea1b7

maint: Remove more function deprecated in Octave 7
author Arun Giridhar <arungiridhar@gmail.com>
date Wed, 16 Nov 2022 06:07:14 -0500
parents c5c8bf50449c
children 0f968958d7d5
comparison
equal deleted inserted replaced
31447:903fac22b29d 31448:9a0ce9eea1b7
298 static OCTINTERP_API octave_base_value * 298 static OCTINTERP_API octave_base_value *
299 make_range_rep_deprecated (const Range& r, bool force_range); 299 make_range_rep_deprecated (const Range& r, bool force_range);
300 300
301 public: 301 public:
302 302
303 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
304 OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
305 octave_value (double base, double limit, double inc)
306 : m_rep (make_range_rep_deprecated (base, inc, limit))
307 {
308 maybe_mutate ();
309 }
310
311 OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
312 octave_value (const Range& r, bool force_range = false)
313 : m_rep (make_range_rep_deprecated (r, force_range))
314 {
315 maybe_mutate ();
316 }
317 #endif
318
319 OCTINTERP_API octave_value (const octave::range<double>& r, 303 OCTINTERP_API octave_value (const octave::range<double>& r,
320 bool force_range = false); 304 bool force_range = false);
321 305
322 // For now, disable all but range<double>. 306 // For now, disable all but range<double>.
323 307
550 octave_value index_op (const octave_value_list& idx, bool resize_ok = false) 534 octave_value index_op (const octave_value_list& idx, bool resize_ok = false)
551 { 535 {
552 return m_rep->do_index_op (idx, resize_ok); 536 return m_rep->do_index_op (idx, resize_ok);
553 } 537 }
554 538
555 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
556 OCTAVE_DEPRECATED (7, "use 'octave_value::index_op' instead")
557 octave_value do_index_op (const octave_value_list& idx,
558 bool resize_ok = false)
559 {
560 return index_op (idx, resize_ok);
561 }
562 #endif
563
564 OCTINTERP_API octave_value 539 OCTINTERP_API octave_value
565 subsasgn (const std::string& type, const std::list<octave_value_list>& idx, 540 subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
566 const octave_value& rhs); 541 const octave_value& rhs);
567 542
568 OCTINTERP_API octave_value 543 OCTINTERP_API octave_value
1457 // non-member functions for unary and binary operations declared 1432 // non-member functions for unary and binary operations declared
1458 // below, outside of the octave_value class declaration. 1433 // below, outside of the octave_value class declaration.
1459 1434
1460 OCTINTERP_API octave_value& non_const_unary_op (unary_op op); 1435 OCTINTERP_API octave_value& non_const_unary_op (unary_op op);
1461 1436
1462 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1463 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1464 octave_value& do_non_const_unary_op (unary_op op)
1465 {
1466 return non_const_unary_op (op);
1467 }
1468 #endif
1469
1470 OCTINTERP_API octave_value& 1437 OCTINTERP_API octave_value&
1471 non_const_unary_op (unary_op op, const std::string& type, 1438 non_const_unary_op (unary_op op, const std::string& type,
1472 const std::list<octave_value_list>& idx); 1439 const std::list<octave_value_list>& idx);
1473
1474 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1475 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1476 octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
1477 const std::list<octave_value_list>& idx)
1478 {
1479 return non_const_unary_op (op, type, idx);
1480 }
1481 #endif
1482 1440
1483 const octave_base_value& get_rep (void) const { return *m_rep; } 1441 const octave_base_value& get_rep (void) const { return *m_rep; }
1484 1442
1485 bool is_copy_of (const octave_value& val) const { return m_rep == val.m_rep; } 1443 bool is_copy_of (const octave_value& val) const { return m_rep == val.m_rep; }
1486 1444
1734 return colon_op (base, octave_value (), limit, is_for_cmd_expr); 1692 return colon_op (base, octave_value (), limit, is_for_cmd_expr);
1735 } 1693 }
1736 1694
1737 OCTAVE_NAMESPACE_END 1695 OCTAVE_NAMESPACE_END
1738 1696
1739 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1740 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1741 inline octave_value
1742 do_unary_op (octave::type_info& ti, octave_value::unary_op op,
1743 const octave_value& a)
1744 {
1745 return octave::unary_op (ti, op, a);
1746 }
1747
1748 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1749 inline octave_value
1750 do_unary_op (octave_value::unary_op op, const octave_value& a)
1751 {
1752 return octave::unary_op (op, a);
1753 }
1754
1755 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1756 inline octave_value
1757 do_binary_op (octave::type_info& ti, octave_value::binary_op op,
1758 const octave_value& a, const octave_value& b)
1759 {
1760 return octave::binary_op (ti, op, a, b);
1761 }
1762
1763 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1764 inline octave_value
1765 do_binary_op (octave::type_info& ti, octave_value::compound_binary_op op,
1766 const octave_value& a, const octave_value& b)
1767 {
1768 return octave::binary_op (ti, op, a, b);
1769 }
1770
1771 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1772 inline octave_value
1773 do_binary_op (octave_value::binary_op op, const octave_value& a,
1774 const octave_value& b)
1775 {
1776 return octave::binary_op (op, a, b);
1777 }
1778
1779 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1780 inline octave_value
1781 do_binary_op (octave_value::compound_binary_op op, const octave_value& a,
1782 const octave_value& b)
1783 {
1784 return octave::binary_op (op, a, b);
1785 }
1786
1787 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1788 inline octave_value
1789 do_cat_op (octave::type_info& ti, const octave_value& a,
1790 const octave_value& b, const Array<octave_idx_type>& ra_idx)
1791 {
1792 return octave::cat_op (ti, a, b, ra_idx);
1793 }
1794
1795 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1796 inline octave_value
1797 do_cat_op (const octave_value& a, const octave_value& b,
1798 const Array<octave_idx_type>& ra_idx)
1799 {
1800 return octave::cat_op (a, b, ra_idx);
1801 }
1802
1803 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1804 inline octave_value
1805 do_colon_op (const octave_value& base, const octave_value& increment,
1806 const octave_value& limit, bool is_for_cmd_expr = false)
1807 {
1808 return octave::colon_op (base, increment, limit, is_for_cmd_expr);
1809 }
1810
1811 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1812 inline octave_value
1813 do_colon_op (const octave_value& base, const octave_value& limit,
1814 bool is_for_cmd_expr = false)
1815 {
1816 return octave::colon_op (base, limit, is_for_cmd_expr);
1817 }
1818 #endif
1819
1820 #define OV_UNOP_FN(name) \ 1697 #define OV_UNOP_FN(name) \
1821 inline octave_value \ 1698 inline octave_value \
1822 name (const octave_value& a) \ 1699 name (const octave_value& a) \
1823 { \ 1700 { \
1824 return octave::unary_op (octave_value::name, a); \ 1701 return octave::unary_op (octave_value::name, a); \