comparison libinterp/corefcn/symtab.h @ 21134:2e5c1f766ac9

provide replacement hints for deprecated C++ functions * oct-conf-post.in.h (OCTAVE_DEPRECATED): Accept message argument. * error.h, errwarn.h, gripes.h, symtab.h, variables.h, * ov-base-sparse.h, ov-base.h, ov.h, Array.h, DiagArray2.h, * PermMatrix.h, Range.h, Sparse.h, dSparse.h, lo-array-errwarn.h, * lo-array-gripes.h, unwind-prot.h: Change all uses of OCTAVE_DEPRECATED.
author John W. Eaton <jwe@octave.org>
date Fri, 22 Jan 2016 12:15:12 -0500
parents 258c787cd9ce
children 538b57866b90
comparison
equal deleted inserted replaced
21133:31674b9d202b 21134:2e5c1f766ac9
1337 1337
1338 if (inst) 1338 if (inst)
1339 inst->do_assign (name, value, context, force_add); 1339 inst->do_assign (name, value, context, force_add);
1340 } 1340 }
1341 1341
1342 // Use assign (name, value, scope, context, force_add) instead. 1342 OCTAVE_DEPRECATED ("use 'assign' instead")
1343 OCTAVE_DEPRECATED static 1343 static octave_value&
1344 octave_value&
1345 varref (const std::string& name, scope_id scope = xcurrent_scope, 1344 varref (const std::string& name, scope_id scope = xcurrent_scope,
1346 context_id context = xdefault_context, bool force_add = false) 1345 context_id context = xdefault_context, bool force_add = false)
1347 { 1346 {
1348 static octave_value foobar; 1347 static octave_value foobar;
1349 1348
1361 context_id context = xdefault_context) 1360 context_id context = xdefault_context)
1362 { 1361 {
1363 assign (name, value, scope, context, true); 1362 assign (name, value, scope, context, true);
1364 } 1363 }
1365 1364
1366 // Use force_assign (name, value, scope, context) instead. 1365 OCTAVE_DEPRECATED ("use 'force_assign' instead")
1367 OCTAVE_DEPRECATED static 1366 static octave_value&
1368 octave_value&
1369 force_varref (const std::string& name, scope_id scope = xcurrent_scope, 1367 force_varref (const std::string& name, scope_id scope = xcurrent_scope,
1370 context_id context = xdefault_context) 1368 context_id context = xdefault_context)
1371 { 1369 {
1372 static octave_value foobar; 1370 static octave_value foobar;
1373 1371
1396 global_table[name] = value; 1394 global_table[name] = value;
1397 else 1395 else
1398 p->second = value; 1396 p->second = value;
1399 } 1397 }
1400 1398
1401 // Use global_assign (name, value) instead. 1399 OCTAVE_DEPRECATED ("use 'global_assign' instead")
1402 OCTAVE_DEPRECATED static 1400 static octave_value&
1403 octave_value&
1404 global_varref (const std::string& name) 1401 global_varref (const std::string& name)
1405 1402
1406 { 1403 {
1407 global_table_iterator p = global_table.find (name); 1404 global_table_iterator p = global_table.find (name);
1408 1405
1422 const octave_value& value = octave_value ()) 1419 const octave_value& value = octave_value ())
1423 { 1420 {
1424 assign (name, value, top_scope (), 0); 1421 assign (name, value, top_scope (), 0);
1425 } 1422 }
1426 1423
1427 // Use top_level_assign (name, value) instead. 1424 OCTAVE_DEPRECATED ("use 'top_level_assign' instead")
1428 OCTAVE_DEPRECATED static 1425 static octave_value&
1429 octave_value&
1430 top_level_varref (const std::string& name) 1426 top_level_varref (const std::string& name)
1431 { 1427 {
1432 static octave_value foobar; 1428 static octave_value foobar;
1433 1429
1434 symbol_table *inst = get_instance (top_scope ()); 1430 symbol_table *inst = get_instance (top_scope ());
1450 1446
1451 if (inst) 1447 if (inst)
1452 inst->do_persistent_assign (name, value); 1448 inst->do_persistent_assign (name, value);
1453 } 1449 }
1454 1450
1455 // Use persistent_assign (name, value) instead. 1451 OCTAVE_DEPRECATED ("use 'persistent_assign' instead")
1456 OCTAVE_DEPRECATED static 1452 static octave_value&
1457 octave_value&
1458 persistent_varref (const std::string& name) 1453 persistent_varref (const std::string& name)
1459 { 1454 {
1460 static octave_value foobar; 1455 static octave_value foobar;
1461 1456
1462 symbol_table *inst = get_instance (xcurrent_scope); 1457 symbol_table *inst = get_instance (xcurrent_scope);