GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
cdef-object.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2012-2026 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_cdef_object_h)
27#define octave_cdef_object_h 1
28
29#include "octave-config.h"
30
31#include <map>
32#include <string>
33
34#include "oct-refcount.h"
35
36#include "cdef-fwd.h"
37#include "error.h"
38#include "oct-map.h"
39#include "ov.h"
40#include "ovl.h"
41
43
44// This is mainly a bootstrap class to declare the expected interface.
45// The actual base class is cdef_class_base, which is declared after
46// cdef_object, such that it can contain cdef_object objects.
47
48class OCTINTERP_API cdef_object_rep
49{
50public:
51
52 friend class cdef_object;
53
54 cdef_object_rep () : m_count (1) { }
55
57
58 virtual ~cdef_object_rep () = default;
59
60 virtual cdef_class get_class () const;
61
62 virtual void set_class (const cdef_class&)
63 {
64 err_invalid_object ("set_class");
65 }
66
67 virtual cdef_object_rep * clone () const
68 {
69 err_invalid_object ("clone");
70 }
71
72 virtual cdef_object_rep * empty_clone () const
73 {
74 err_invalid_object ("empty_clone");
75 }
76
77 virtual cdef_object_rep * copy () const
78 {
79 err_invalid_object ("copy");
80 }
81
82 virtual cdef_object_rep * make_array () const
83 {
84 err_invalid_object ("make_array");
85 }
86
87 virtual bool is_array () const { return false; }
88
89 virtual bool is_value_object () const { return false; }
90
91 virtual bool is_handle_object () const { return false; }
92
93 virtual bool is_meta_object () const { return false; }
94
96 {
97 err_invalid_object ("array_value");
98 }
99
100 virtual void put (const std::string&, const octave_value&)
101 { err_invalid_object ("put"); }
102
103 virtual octave_value get (const std::string&) const
104 {
105 err_invalid_object ("get");
106 }
107
108 virtual void set_property (octave_idx_type, const std::string&,
109 const octave_value&)
110 {
111 err_invalid_object ("set_property");
112 }
113
114 virtual octave_value get_property (octave_idx_type, const std::string&) const
115 {
116 err_invalid_object ("get_property");
117 }
118
119 virtual void break_closure_cycles (const std::shared_ptr<stack_frame>&)
120 {
121 err_invalid_object ("break_closure_cycles");
122 }
123
124 virtual octave_value_list
125 subsref (const std::string&, const std::list<octave_value_list>&,
126 int, std::size_t&, const cdef_class&, bool)
127 {
128 err_invalid_object ("subsref");
129 }
130
131 virtual octave_value
132 subsasgn (const std::string&, const std::list<octave_value_list>&,
133 const octave_value&)
134 {
135 err_invalid_object ("subsasgn");
136 }
137
138 virtual octave_value reshape (const dim_vector&) const
139 {
140 err_invalid_object ("reshape");
141 }
142
143 virtual string_vector map_keys () const;
144
145 virtual bool is_valid () const { return false; }
146
147 OCTINTERP_API std::string class_name () const;
148
149 virtual void mark_for_construction (const cdef_class&)
150 {
151 err_invalid_object ("mark_for_construction");
152 }
153
154 virtual bool is_constructed_for (const cdef_class&) const
155 {
156 err_invalid_object ("is_constructed_for");
157 }
158
159 virtual bool is_partially_constructed_for (const cdef_class&) const
160 {
161 err_invalid_object ("is_partially_constructed_for");
162 }
163
164 virtual void mark_as_constructed ()
165 {
166 err_invalid_object ("mark_as_constructed");
167 }
168
169 virtual void mark_as_constructed (const cdef_class&)
170 {
171 err_invalid_object ("mark_as_constructed");
172 }
173
174 virtual bool is_constructed () const
175 {
176 err_invalid_object ("is_constructed");
177 }
178
179 virtual octave_idx_type static_count () const { return 0; }
180
181 virtual void destroy () { delete this; }
182
183 OCTINTERP_API void release (const cdef_object& obj);
184
185 virtual dim_vector dims () const { return dim_vector (); }
186
187 virtual cdef_object_rep * permute (const Array<int>&, bool = false) const
188 {
189 err_invalid_object ("permute");
190 }
191
192 virtual cdef_object_rep * resize (const dim_vector&, bool = false) const
193 {
194 err_invalid_object ("resize");
195 }
196
197 virtual cdef_object_rep * transpose () const
198 {
199 err_invalid_object ("transpose");
200 }
201
202protected:
203
204 // Reference count
206
207 // Restricted copying.
208
209 cdef_object_rep (const cdef_object_rep&) : m_count (1) { }
210
211private:
212
213 OCTAVE_NORETURN void err_invalid_object (const char *who) const
214 {
215 error ("%s: invalid object", who);
216 }
217};
218
219class OCTINTERP_API cdef_object
220{
221public:
222
223 // FIXME: use a null object?
224 cdef_object () : m_rep (new cdef_object_rep ()) { }
225
226 cdef_object (const cdef_object& obj) : m_rep (obj.m_rep)
227 { m_rep->m_count++; }
228
229 cdef_object (cdef_object_rep *r) : m_rep (r) { }
230
231 virtual ~cdef_object () { m_rep->release (*this); }
232
233 cdef_object& operator = (const cdef_object& obj)
234 {
235 if (m_rep != obj.m_rep)
236 {
237 m_rep->release (*this);
238
239 m_rep = obj.m_rep;
240 m_rep->m_count++;
241 }
242
243 return *this;
244 }
245
246 OCTINTERP_API cdef_class get_class () const;
247
248 void set_class (const cdef_class& cls) { m_rep->set_class (cls); }
249
250 std::string class_name () const { return m_rep->class_name (); }
251
252 cdef_object clone () const { return cdef_object (m_rep->clone ()); }
253
255 {
256 return cdef_object (m_rep->empty_clone ());
257 }
258
259 dim_vector dims () const { return m_rep->dims (); }
260
262 {
263 return cdef_object (m_rep->make_array ());
264 }
265
266 cdef_object copy () const { return cdef_object (m_rep->copy ()); }
267
268 bool is_array () const { return m_rep->is_array (); }
269
270 bool is_value_object () const { return m_rep->is_value_object (); }
271
272 bool is_handle_object () const { return m_rep->is_handle_object (); }
273
274 bool is_meta_object () const { return m_rep->is_meta_object (); }
275
277 { return m_rep->array_value (); }
278
279 void put (const std::string& pname, const octave_value& val)
280 {
281 m_rep->put (pname, val);
282 }
283
284 octave_value get (const std::string& pname) const
285 {
286 return m_rep->get (pname);
287 }
288
289 void set_property (octave_idx_type idx, const std::string& pname,
290 const octave_value& pval)
291 {
292 return m_rep->set_property (idx, pname, pval);
293 }
294
296 get_property (octave_idx_type idx, const std::string& pname) const
297 {
298 return m_rep->get_property (idx, pname);
299 }
300
301 void break_closure_cycles (const std::shared_ptr<stack_frame>& frame)
302 {
303 m_rep->break_closure_cycles (frame);
304 }
305
307 subsref (const std::string& type, const std::list<octave_value_list>& idx,
308 int nargout, std::size_t& skip, const cdef_class& context,
309 bool auto_add = false)
310 {
311 return m_rep->subsref (type, idx, nargout, skip, context, auto_add);
312 }
313
315 subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
316 const octave_value& rhs, int ignore_copies = 0)
317 {
318 make_unique (ignore_copies);
319 return m_rep->subsasgn (type, idx, rhs);
320 }
321
322 octave_value reshape (const dim_vector& new_dims) const
323 {
324 return m_rep->reshape (new_dims);
325 }
326
327 string_vector map_keys () const { return m_rep->map_keys (); }
328
329 OCTINTERP_API octave_map
330 map_value (bool warn = true, bool for_save = false) const;
331
332 const cdef_object_rep * get_rep () const { return m_rep; }
333
334 bool ok () const { return m_rep->is_valid (); }
335
337 {
338 m_rep->mark_for_construction (cls);
339 }
340
341 bool is_constructed () const { return m_rep->is_constructed (); }
342
343 bool is_constructed_for (const cdef_class& cls) const
344 {
345 return m_rep->is_constructed_for (cls);
346 }
347
349 {
350 return m_rep->is_partially_constructed_for (cls);
351 }
352
353 void mark_as_constructed () { m_rep->mark_as_constructed (); }
354
356 { m_rep->mark_as_constructed (cls); }
357
358 bool is (const cdef_object& obj) const { return m_rep == obj.m_rep; }
359
360 cdef_object permute (const Array<int>& vec, bool inv = false) const
361 { return cdef_object (m_rep->permute (vec, inv)); }
362
363 cdef_object resize (const dim_vector& dv, bool fill = false) const
364 { return cdef_object (m_rep->resize (dv, fill)); }
365
367 { return cdef_object (m_rep->transpose ()); }
368
369protected:
370
371 cdef_object_rep * get_rep () { return m_rep; }
372
373 void make_unique (int ignore_copies)
374 {
375 if (m_rep->m_count > ignore_copies + 1)
376 *this = clone ();
377 }
378
379private:
380
381 cdef_object_rep *m_rep;
382};
383
384class OCTINTERP_API cdef_object_base : public cdef_object_rep
385{
386public:
387
389 : cdef_object_rep (), m_klass ()
390 { }
391
392 cdef_object_base& operator = (const cdef_object_base&) = delete;
393
395
396 OCTINTERP_API cdef_class get_class () const;
397
398 OCTINTERP_API void set_class (const cdef_class& cls);
399
401 {
402 return new cdef_object_base (*this);
403 }
404
405 OCTINTERP_API cdef_object_rep * make_array () const;
406
407protected:
408
409 // Restricted copying!
411 : cdef_object_rep (obj), m_klass (obj.m_klass)
412 { }
413
414private:
415
416 // The class of the object
417 cdef_object m_klass;
418};
419
420class OCTINTERP_API cdef_object_array : public cdef_object_base
421{
422public:
423
425
427 : cdef_object_base (), m_array (a)
428 { }
429
430 cdef_object_array& operator = (const cdef_object_array&) = delete;
431
432 ~cdef_object_array () = default;
433
434 OCTINTERP_API cdef_object_rep * clone () const;
435
436 dim_vector dims () const { return m_array.dims (); }
437
438 OCTINTERP_API void
439 break_closure_cycles (const std::shared_ptr<stack_frame>& frame);
440
441 bool is_valid () const { return true; }
442
443 bool is_array () const { return true; }
444
445 Array<cdef_object> array_value () const { return m_array; }
446
447 OCTINTERP_API octave_value_list
448 subsref (const std::string& type, const std::list<octave_value_list>& idx,
449 int nargout, std::size_t& skip, const cdef_class& context,
450 bool auto_add);
451
452 OCTINTERP_API octave_value
453 subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
454 const octave_value& rhs);
455
456 OCTINTERP_API octave_value reshape (const dim_vector& new_dims) const;
457
458 void set_property (octave_idx_type idx, const std::string& pname,
459 const octave_value& pval)
460 {
461 cdef_object& tmp = m_array.elem (idx);
462
463 return tmp.put (pname, pval);
464 }
465
467 get_property (octave_idx_type idx, const std::string& pname) const
468 {
469 cdef_object tmp = m_array.elem (idx);
470
471 return tmp.get (pname);
472 }
473
474 OCTINTERP_API cdef_object_rep *
475 permute (const Array<int>& vec, bool inv = false) const;
476
477 OCTINTERP_API cdef_object_rep *
478 resize (const dim_vector& dv, bool fill = false) const;
479
480 cdef_object_rep * transpose () const;
481
483
484 OCTINTERP_API void fill_empty_values (Array<cdef_object>& arr);
485
486private:
487
488 Array<cdef_object> m_array;
489
490 // Private copying!
492 : cdef_object_base (obj), m_array (obj.m_array)
493 { }
494};
495
496class OCTINTERP_API cdef_object_scalar : public cdef_object_base
497{
498public:
499
501
502 cdef_object_scalar& operator = (const cdef_object_scalar&) = delete;
503
505
506 dim_vector dims () const { return dim_vector (1, 1); }
507
508 void break_closure_cycles (const std::shared_ptr<stack_frame>& frame);
509
510 void put (const std::string& pname, const octave_value& val)
511 {
512 m_map.assign (pname, val);
513 }
514
515 octave_value get (const std::string& pname) const
516 {
517 Cell val = m_map.contents (pname);
518
519 if (val.numel () < 1)
520 error ("get: unknown slot: %s", pname.c_str ());
521
522 return val(0, 0);
523 }
524
525 void set_property (octave_idx_type idx, const std::string& pname,
526 const octave_value& pval)
527 {
528 if (idx != 0)
529 error ("invalid index"); // FIXME
530
531 put (pname, pval);
532 }
533
535 get_property (octave_idx_type idx, const std::string& pname) const
536 {
537 if (idx != 0)
538 error ("invalid index"); // FIXME
539
540 return get (pname);
541 }
542
543 OCTINTERP_API octave_value_list
544 subsref (const std::string& type, const std::list<octave_value_list>& idx,
545 int nargout, std::size_t& skip, const cdef_class& context,
546 bool auto_add);
547
548 OCTINTERP_API octave_value
549 subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
550 const octave_value& rhs);
551
552 octave_value reshape (const dim_vector& new_dims) const;
553
555 permute ([[maybe_unused]] const Array<int>& vec,
556 [[maybe_unused]] bool inv = false) const
557 {
558 return clone ();
559 }
560
561 OCTINTERP_API cdef_object_rep *
562 resize (const dim_vector& dv, bool fill = false) const;
563
565 {
566 return clone ();
567 }
568
569 OCTINTERP_API void mark_for_construction (const cdef_class&);
570
571 OCTINTERP_API bool is_constructed_for (const cdef_class& cls) const;
572
573 OCTINTERP_API bool
574 is_partially_constructed_for (const cdef_class& cls) const;
575
576 void mark_as_constructed () { m_ctor_list.clear (); }
577
578 OCTINTERP_API void mark_as_constructed (const cdef_class& cls);
579
580 bool is_constructed () const { return m_ctor_list.empty (); }
581
582protected:
583
584 // Object property values
586
587 // Internal/temporary structure used during object construction
588 std::map< cdef_class, std::list<cdef_class>> m_ctor_list;
589
590protected:
591
592 // Restricted object copying!
594 : cdef_object_base (obj), m_map (obj.m_map), m_ctor_list (obj.m_ctor_list)
595 { }
596};
597
598class OCTINTERP_API handle_cdef_object : public cdef_object_scalar
599{
600public:
601
603
604 handle_cdef_object& operator = (const handle_cdef_object&) = delete;
605
606 OCTINTERP_API ~handle_cdef_object ();
607
609 {
610 handle_cdef_object *obj = const_cast<handle_cdef_object *> (this);
611 obj->m_count++;
612 return obj;
613 }
614
616 {
617 return new handle_cdef_object (*this);
618 }
619
620 bool is_valid () const { return true; }
621
622 bool is_handle_object () const { return true; }
623
624protected:
625
626 // Restricted copying!
630};
631
632class OCTINTERP_API value_cdef_object : public cdef_object_scalar
633{
634public:
635
637
638 value_cdef_object& operator = (const value_cdef_object&) = delete;
639
640 OCTINTERP_API ~value_cdef_object ();
641
643 {
644 return new value_cdef_object (*this);
645 }
646
647 cdef_object_rep * copy () const { return clone (); }
648
649 bool is_valid () const { return true; }
650
651 bool is_value_object () const { return true; }
652
653private:
654
655 // Private copying!
657 : cdef_object_scalar (obj)
658 { }
659};
660
661class OCTINTERP_API cdef_meta_object_rep : public handle_cdef_object
662{
663public:
664
666
667 cdef_meta_object_rep& operator = (const cdef_meta_object_rep&) = delete;
668
670
672 { return new cdef_meta_object_rep (*this); }
673
674 bool is_meta_object () const { return true; }
675
676 virtual bool is_class () const { return false; }
677
678 virtual bool is_property () const { return false; }
679
680 virtual bool is_method () const { return false; }
681
682 virtual bool is_package () const { return false; }
683
684 void doc_string (const std::string& txt) { m_doc_string = txt; }
685
686 std::string doc_string () const { return m_doc_string; }
687
688 virtual octave_value_list
689 meta_subsref (const std::string& /* type */,
690 const std::list<octave_value_list>& /* idx */,
691 int /* nargout */)
692 {
693 error ("subsref: invalid meta object");
694 }
695
696 virtual void meta_release () { }
697
698 virtual bool meta_accepts_postfix_index (char /* type */) const
699 {
700 return false;
701 }
702
703protected:
704
705 std::string m_doc_string;
706
707 // Restricted copying!
711};
712
713class OCTINTERP_API cdef_meta_object : public cdef_object
714{
715public:
716
718
719 // Object consistency is checked in sub-classes.
721
723
724 cdef_meta_object (const cdef_object& obj) : cdef_object (obj) { }
725
726 cdef_meta_object& operator = (const cdef_object&) = delete;
727
728 ~cdef_meta_object () = default;
729
730 bool is_class () const { return get_rep ()->is_class (); }
731
732 bool is_property () const { return get_rep ()->is_property (); }
733
734 bool is_method () const { return get_rep ()->is_method (); }
735
736 bool is_package () const { return get_rep ()->is_package (); }
737
738 void doc_string (const std::string& txt) { get_rep ()->doc_string (txt); }
739
740 std::string doc_string () const { return get_rep ()->doc_string (); }
741
743 meta_subsref (const std::string& type,
744 const std::list<octave_value_list>& idx, int nargout)
745 {
746 return get_rep ()->meta_subsref (type, idx, nargout);
747 }
748
749 void meta_release () { get_rep ()->meta_release (); }
750
751 bool meta_accepts_postfix_index (char type) const
752 {
753 return get_rep ()->meta_accepts_postfix_index (type);
754 }
755
756private:
757
758 cdef_meta_object_rep * get_rep ()
759 {
760 return dynamic_cast<cdef_meta_object_rep *> (cdef_object::get_rep ());
761 }
762
763 const cdef_meta_object_rep * get_rep () const
764 {
765 return dynamic_cast<const cdef_meta_object_rep *> (cdef_object::get_rep ());
766 }
767};
768
769OCTAVE_END_NAMESPACE(octave)
770
771#endif
N Dimensional Array with copy-on-write semantics.
Definition Array-base.h:130
octave_idx_type numel() const
Number of elements in the array.
Definition Array-base.h:440
Definition Cell.h:41
cdef_meta_object_rep(const cdef_meta_object_rep &obj)
virtual bool meta_accepts_postfix_index(char) const
cdef_object_rep * copy() const
virtual bool is_class() const
~cdef_meta_object_rep()=default
bool is_meta_object() const
std::string doc_string() const
virtual void meta_release()
virtual octave_value_list meta_subsref(const std::string &, const std::list< octave_value_list > &, int)
void doc_string(const std::string &txt)
virtual bool is_package() const
std::string m_doc_string
virtual bool is_property() const
virtual bool is_method() const
bool meta_accepts_postfix_index(char type) const
bool is_property() const
bool is_package() const
cdef_meta_object(const cdef_object &obj)
bool is_method() const
cdef_meta_object(cdef_meta_object_rep *r)
bool is_class() const
cdef_meta_object(const cdef_meta_object &obj)
~cdef_meta_object()=default
void doc_string(const std::string &txt)
octave_value_list meta_subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
std::string doc_string() const
bool is_valid() const
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
dim_vector dims() const
~cdef_object_array()=default
Array< cdef_object > array_value() const
octave_value get_property(octave_idx_type idx, const std::string &pname) const
bool is_array() const
cdef_object_array(const Array< cdef_object > &a)
cdef_object_rep * empty_clone() const
cdef_object_base(const cdef_object_base &obj)
virtual void break_closure_cycles(const std::shared_ptr< stack_frame > &)
virtual octave_value_list subsref(const std::string &, const std::list< octave_value_list > &, int, std::size_t &, const cdef_class &, bool)
virtual bool is_array() const
Definition cdef-object.h:87
virtual void mark_as_constructed(const cdef_class &)
virtual void mark_as_constructed()
virtual cdef_object_rep * clone() const
Definition cdef-object.h:67
virtual cdef_object_rep * permute(const Array< int > &, bool=false) const
virtual bool is_constructed_for(const cdef_class &) const
virtual void set_class(const cdef_class &)
Definition cdef-object.h:62
virtual void set_property(octave_idx_type, const std::string &, const octave_value &)
virtual ~cdef_object_rep()=default
virtual Array< cdef_object > array_value() const
Definition cdef-object.h:95
virtual octave_value get(const std::string &) const
virtual bool is_constructed() const
virtual cdef_object_rep * resize(const dim_vector &, bool=false) const
virtual bool is_meta_object() const
Definition cdef-object.h:93
virtual octave_value get_property(octave_idx_type, const std::string &) const
virtual cdef_object_rep * transpose() const
virtual octave_value reshape(const dim_vector &) const
virtual bool is_partially_constructed_for(const cdef_class &) const
cdef_object_rep(const cdef_object_rep &)
virtual void put(const std::string &, const octave_value &)
virtual cdef_object_rep * make_array() const
Definition cdef-object.h:82
virtual void destroy()
virtual bool is_handle_object() const
Definition cdef-object.h:91
virtual octave_idx_type static_count() const
virtual cdef_object_rep * copy() const
Definition cdef-object.h:77
virtual bool is_valid() const
virtual void mark_for_construction(const cdef_class &)
virtual cdef_object_rep * empty_clone() const
Definition cdef-object.h:72
virtual octave_value subsasgn(const std::string &, const std::list< octave_value_list > &, const octave_value &)
virtual dim_vector dims() const
virtual bool is_value_object() const
Definition cdef-object.h:89
refcount< octave_idx_type > m_count
octave_scalar_map m_map
std::map< cdef_class, std::list< cdef_class > > m_ctor_list
cdef_object_rep * transpose() const
bool is_constructed() const
octave_value get_property(octave_idx_type idx, const std::string &pname) const
dim_vector dims() const
cdef_object_rep * permute(const Array< int > &vec, bool inv=false) const
void put(const std::string &pname, const octave_value &val)
octave_value get(const std::string &pname) const
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
cdef_object_scalar(const cdef_object_scalar &obj)
~cdef_object_scalar()=default
cdef_object clone() const
bool is_array() const
bool is_constructed() const
void break_closure_cycles(const std::shared_ptr< stack_frame > &frame)
void mark_as_constructed(const cdef_class &cls)
cdef_class get_class() const
void mark_for_construction(const cdef_class &cls)
bool is_partially_constructed_for(const cdef_class &cls) const
octave_value reshape(const dim_vector &new_dims) const
bool is_handle_object() const
void put(const std::string &pname, const octave_value &val)
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
cdef_object transpose() const
virtual ~cdef_object()
cdef_object resize(const dim_vector &dv, bool fill=false) const
bool ok() const
cdef_object(const cdef_object &obj)
string_vector map_keys() const
void mark_as_constructed()
void set_class(const cdef_class &cls)
std::string class_name() const
bool is_meta_object() const
cdef_object_rep * get_rep()
dim_vector dims() const
cdef_object make_array() const
cdef_object & operator=(const cdef_object &obj)
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs, int ignore_copies=0)
const cdef_object_rep * get_rep() const
cdef_object empty_clone() const
bool is_value_object() const
cdef_object copy() const
cdef_object(cdef_object_rep *r)
bool is(const cdef_object &obj) const
void make_unique(int ignore_copies)
cdef_object permute(const Array< int > &vec, bool inv=false) const
octave_value get(const std::string &pname) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout, std::size_t &skip, const cdef_class &context, bool auto_add=false)
bool is_constructed_for(const cdef_class &cls) const
octave_value get_property(octave_idx_type idx, const std::string &pname) const
Array< cdef_object > array_value() const
Vector representing the dimensions (size) of an Array.
Definition dim-vector.h:92
handle_cdef_object(const handle_cdef_object &obj)
cdef_object_rep * copy() const
bool is_handle_object() const
cdef_object_rep * clone() const
bool is_valid() const
octave_value reshape(const dim_vector &dv) const
Definition ov.h:569
cdef_object_rep * copy() const
bool is_value_object() const
bool is_valid() const
cdef_object_rep * clone() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::string release()
Definition defaults.cc:150
void error(const char *fmt,...)
Definition error.cc:1008