GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cdef-object.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2012-2021 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 "error.h"
37 #include "oct-map.h"
38 #include "ov.h"
39 #include "ovl.h"
40 
41 namespace octave
42 {
43  class cdef_object;
44  class cdef_class;
45 
46  // This is mainly a bootstrap class to declare the expected interface.
47  // The actual base class is cdef_class_base, which is declared after
48  // cdef_object, such that it can contain cdef_object objects.
49 
50  class
52  {
53  public:
54 
55  friend class cdef_object;
56 
57  cdef_object_rep (void) : m_count (1) { }
58 
59  cdef_object_rep& operator = (const cdef_object_rep&) = delete;
60 
61  virtual ~cdef_object_rep (void) = default;
62 
63  virtual cdef_class get_class (void) const;
64 
65  virtual void set_class (const cdef_class&)
66  {
67  err_invalid_object ("set_class");
68  }
69 
70  virtual cdef_object_rep * clone (void) const
71  {
72  err_invalid_object ("clone");
73  }
74 
75  virtual cdef_object_rep * empty_clone (void) const
76  {
77  err_invalid_object ("empty_clone");
78  }
79 
80  virtual cdef_object_rep * copy (void) const
81  {
82  err_invalid_object ("copy");
83  }
84 
85  virtual cdef_object_rep * make_array (void) const
86  {
87  err_invalid_object ("make_array");
88  }
89 
90  virtual bool is_array (void) const { return false; }
91 
92  virtual bool is_value_object (void) const { return false; }
93 
94  virtual bool is_handle_object (void) const { return false; }
95 
96  virtual bool is_meta_object (void) const { return false; }
97 
98  virtual Array<cdef_object> array_value (void) const
99  {
100  err_invalid_object ("array_value");
101  }
102 
103  virtual void put (const std::string&, const octave_value&)
104  { err_invalid_object ("put"); }
105 
106  virtual octave_value get (const std::string&) const
107  {
108  err_invalid_object ("get");
109  }
110 
111  virtual void set_property (octave_idx_type, const std::string&,
112  const octave_value&)
113  {
114  err_invalid_object ("set_property");
115  }
116 
117  virtual octave_value get_property (octave_idx_type, const std::string&) const
118  {
119  err_invalid_object ("get_property");
120  }
121 
122  virtual octave_value_list
123  subsref (const std::string&, const std::list<octave_value_list>&,
124  int, size_t&, const cdef_class&, bool)
125  {
126  err_invalid_object ("subsref");
127  }
128 
129  virtual octave_value
130  subsasgn (const std::string&, const std::list<octave_value_list>&,
131  const octave_value&)
132  {
133  err_invalid_object ("subsasgn");
134  }
135 
136  virtual string_vector map_keys (void) const;
137 
138  virtual bool is_valid (void) const { return false; }
139 
140  std::string class_name (void) const;
141 
142  virtual void mark_for_construction (const cdef_class&)
143  {
144  err_invalid_object ("mark_for_construction");
145  }
146 
147  virtual bool is_constructed_for (const cdef_class&) const
148  {
149  err_invalid_object ("is_constructed_for");
150  }
151 
152  virtual bool is_partially_constructed_for (const cdef_class&) const
153  {
154  err_invalid_object ("is_partially_constructed_for");
155  }
156 
157  virtual void mark_as_constructed (void)
158  {
159  err_invalid_object ("mark_as_constructed");
160  }
161 
162  virtual void mark_as_constructed (const cdef_class&)
163  {
164  err_invalid_object ("mark_as_constructed");
165  }
166 
167  virtual bool is_constructed (void) const
168  {
169  err_invalid_object ("is_constructed");
170  }
171 
172  virtual octave_idx_type static_count (void) const { return 0; }
173 
174  virtual void destroy (void) { delete this; }
175 
176  void release (const cdef_object& obj);
177 
178  virtual dim_vector dims (void) const { return dim_vector (); }
179 
180  protected:
181 
182  // Reference count
184 
185  // Restricted copying.
186 
187  cdef_object_rep (const cdef_object_rep&) : m_count (1) { }
188 
189  private:
190 
191  OCTAVE_NORETURN void err_invalid_object (const char *who) const
192  {
193  error ("%s: invalid object", who);
194  }
195  };
196 
197  class
199  {
200  public:
201 
202  // FIXME: use a null object?
203  cdef_object (void) : rep (new cdef_object_rep ()) { }
204 
205  cdef_object (const cdef_object& obj) : rep (obj.rep) { rep->m_count++; }
206 
208 
209  virtual ~cdef_object (void) { rep->release (*this); }
210 
211  cdef_object& operator = (const cdef_object& obj)
212  {
213  if (rep != obj.rep)
214  {
215  rep->release (*this);
216 
217  rep = obj.rep;
218  rep->m_count++;
219  }
220 
221  return *this;
222  }
223 
224  cdef_class get_class (void) const;
225 
226  void set_class (const cdef_class& cls) { rep->set_class (cls); }
227 
228  std::string class_name (void) const { return rep->class_name (); }
229 
230  cdef_object clone (void) const { return cdef_object (rep->clone ()); }
231 
233  {
234  return cdef_object (rep->empty_clone ());
235  }
236 
237  dim_vector dims (void) const { return rep->dims (); }
238 
239  cdef_object make_array (void) const
240  {
241  return cdef_object (rep->make_array ());
242  }
243 
244  cdef_object copy (void) const { return cdef_object (rep->copy ()); }
245 
246  bool is_array (void) const { return rep->is_array (); }
247 
248  bool is_value_object (void) const { return rep->is_value_object (); }
249 
250  bool is_handle_object (void) const { return rep->is_handle_object (); }
251 
252  bool is_meta_object (void) const { return rep->is_meta_object (); }
253 
254  Array<cdef_object> array_value (void) const { return rep->array_value (); }
255 
256  void put (const std::string& pname, const octave_value& val)
257  {
258  rep->put (pname, val);
259  }
260 
261  octave_value get (const std::string& pname) const
262  {
263  return rep->get (pname);
264  }
265 
266  void set_property (octave_idx_type idx, const std::string& pname,
267  const octave_value& pval)
268  {
269  return rep->set_property (idx, pname, pval);
270  }
271 
273  get_property (octave_idx_type idx, const std::string& pname) const
274  {
275  return rep->get_property (idx, pname);
276  }
277 
279  subsref (const std::string& type, const std::list<octave_value_list>& idx,
280  int nargout, size_t& skip, const cdef_class& context,
281  bool auto_add = false)
282  {
283  return rep->subsref (type, idx, nargout, skip, context, auto_add);
284  }
285 
287  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
288  const octave_value& rhs, int ignore_copies = 0)
289  {
290  make_unique (ignore_copies);
291  return rep->subsasgn (type, idx, rhs);
292  }
293 
294  string_vector map_keys (void) const { return rep->map_keys (); }
295 
296  octave_map map_value (void) const;
297 
298  const cdef_object_rep * get_rep (void) const { return rep; }
299 
300  bool ok (void) const { return rep->is_valid (); }
301 
303  {
304  rep->mark_for_construction (cls);
305  }
306 
307  bool is_constructed (void) const { return rep->is_constructed (); }
308 
309  bool is_constructed_for (const cdef_class& cls) const
310  {
311  return rep->is_constructed_for (cls);
312  }
313 
314  bool is_partially_constructed_for (const cdef_class& cls) const
315  {
316  return rep->is_partially_constructed_for (cls);
317  }
318 
319  void mark_as_constructed (void) { rep->mark_as_constructed (); }
320 
321  void mark_as_constructed (const cdef_class& cls)
322  { rep->mark_as_constructed (cls); }
323 
324  bool is (const cdef_object& obj) const { return rep == obj.rep; }
325 
326  protected:
327 
328  cdef_object_rep * get_rep (void) { return rep; }
329 
330  void make_unique (int ignore_copies)
331  {
332  if (rep->m_count > ignore_copies + 1)
333  *this = clone ();
334  }
335 
336  private:
337 
339  };
340 
341  class
343  {
344  public:
345 
347  : cdef_object_rep (), klass ()
348  { }
349 
350  cdef_object_base& operator = (const cdef_object_base&) = delete;
351 
352  ~cdef_object_base (void) { }
353 
354  cdef_class get_class (void) const;
355 
356  void set_class (const cdef_class& cls);
357 
359  {
360  return new cdef_object_base (*this);
361  }
362 
363  cdef_object_rep * make_array (void) const;
364 
365  protected:
366 
367  // Restricted copying!
369  : cdef_object_rep (obj), klass (obj.klass)
370  { }
371 
372  private:
373 
374  // The class of the object
376  };
377 
378  class
380  {
381  public:
382 
384 
386  : cdef_object_base (), array (a)
387  { }
388 
389  cdef_object_array& operator = (const cdef_object_array&) = delete;
390 
391  ~cdef_object_array (void) = default;
392 
393  cdef_object_rep * clone (void) const
394  {
395  return new cdef_object_array (*this);
396  }
397 
398  dim_vector dims (void) const { return array.dims (); }
399 
400  bool is_valid (void) const { return true; }
401 
402  bool is_array (void) const { return true; }
403 
404  Array<cdef_object> array_value (void) const { return array; }
405 
407  subsref (const std::string& type, const std::list<octave_value_list>& idx,
408  int nargout, size_t& skip, const cdef_class& context,
409  bool auto_add);
410 
412  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
413  const octave_value& rhs);
414 
415  void set_property (octave_idx_type idx, const std::string& pname,
416  const octave_value& pval)
417  {
418  cdef_object& tmp = array.elem (idx);
419 
420  return tmp.put (pname, pval);
421  }
422 
424  get_property (octave_idx_type idx, const std::string& pname) const
425  {
426  cdef_object tmp = array.elem (idx);
427 
428  return tmp.get (pname);
429  }
430 
431  private:
432 
434 
435  void fill_empty_values (void) { fill_empty_values (array); }
436 
437  void fill_empty_values (Array<cdef_object>& arr);
438 
439  // Private copying!
441  : cdef_object_base (obj), array (obj.array)
442  { }
443  };
444 
445  class
447  {
448  public:
449 
451 
452  cdef_object_scalar& operator = (const cdef_object_scalar&) = delete;
453 
454  ~cdef_object_scalar (void) = default;
455 
456  dim_vector dims (void) const { return dim_vector (1, 1); }
457 
458  void put (const std::string& pname, const octave_value& val)
459  {
460  map.assign (pname, val);
461  }
462 
463  octave_value get (const std::string& pname) const
464  {
465  Cell val = map.contents (pname);
466 
467  if (val.numel () < 1)
468  error ("get: unknown slot: %s", pname.c_str ());
469 
470  return val(0, 0);
471  }
472 
473  void set_property (octave_idx_type idx, const std::string& pname,
474  const octave_value& pval)
475  {
476  if (idx != 0)
477  error ("invalid index"); // FIXME
478 
479  put (pname, pval);
480  }
481 
483  get_property (octave_idx_type idx, const std::string& pname) const
484  {
485  if (idx != 0)
486  error ("invalid index"); // FIXME
487 
488  return get (pname);
489  }
490 
492  subsref (const std::string& type, const std::list<octave_value_list>& idx,
493  int nargout, size_t& skip, const cdef_class& context,
494  bool auto_add);
495 
497  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
498  const octave_value& rhs);
499 
500  void mark_for_construction (const cdef_class&);
501 
502  bool is_constructed_for (const cdef_class& cls) const;
503 
504  bool is_partially_constructed_for (const cdef_class& cls) const;
505 
506  void mark_as_constructed (void) { ctor_list.clear (); }
507 
508  void mark_as_constructed (const cdef_class& cls);
509 
510  bool is_constructed (void) const { return ctor_list.empty (); }
511 
512  protected:
513 
514  // Object property values
516 
517  // Internal/temporary structure used during object construction
518  std::map< cdef_class, std::list<cdef_class>> ctor_list;
519 
520  protected:
521 
522  // Restricted object copying!
524  : cdef_object_base (obj), map (obj.map), ctor_list (obj.ctor_list)
525  { }
526  };
527 
528  class
530  {
531  public:
532 
534 
535  handle_cdef_object& operator = (const handle_cdef_object&) = delete;
536 
537  ~handle_cdef_object (void);
538 
539  cdef_object_rep * clone (void) const
540  {
541  handle_cdef_object *obj = const_cast<handle_cdef_object *> (this);
542  obj->m_count++;
543  return obj;
544  }
545 
546  cdef_object_rep * copy (void) const
547  {
548  return new handle_cdef_object (*this);
549  }
550 
551  bool is_valid (void) const { return true; }
552 
553  bool is_handle_object (void) const { return true; }
554 
555  protected:
556 
557  // Restricted copying!
559  : cdef_object_scalar (obj)
560  { }
561  };
562 
563  class
565  {
566  public:
567 
569 
570  value_cdef_object& operator = (const value_cdef_object&) = delete;
571 
572  ~value_cdef_object (void);
573 
574  cdef_object_rep * clone (void) const
575  {
576  return new value_cdef_object (*this);
577  }
578 
579  cdef_object_rep * copy (void) const { return clone (); }
580 
581  bool is_valid (void) const { return true; }
582 
583  bool is_value_object (void) const { return true; }
584 
585  private:
586 
587  // Private copying!
589  : cdef_object_scalar (obj)
590  { }
591  };
592 
593  class
595  {
596  public:
597 
599 
600  cdef_meta_object_rep& operator = (const cdef_meta_object_rep&) = delete;
601 
602  ~cdef_meta_object_rep (void) = default;
603 
604  cdef_object_rep * copy (void) const
605  { return new cdef_meta_object_rep (*this); }
606 
607  bool is_meta_object (void) const { return true; }
608 
609  virtual bool is_class (void) const { return false; }
610 
611  virtual bool is_property (void) const { return false; }
612 
613  virtual bool is_method (void) const { return false; }
614 
615  virtual bool is_package (void) const { return false; }
616 
617  virtual octave_value_list
618  meta_subsref (const std::string& /* type */,
619  const std::list<octave_value_list>& /* idx */,
620  int /* nargout */)
621  {
622  error ("subsref: invalid meta object");
623  }
624 
625  virtual void meta_release (void) { }
626 
627  virtual bool meta_accepts_postfix_index (char /* type */) const
628  {
629  return false;
630  }
631 
632  protected:
633 
634  // Restricted copying!
636  : handle_cdef_object (obj)
637  { }
638  };
639 
640  class
642  {
643  public:
644 
646 
647  // Object consistency is checked in sub-classes.
649 
651 
652  cdef_meta_object (const cdef_object& obj) : cdef_object (obj) { }
653 
654  cdef_meta_object& operator = (const cdef_object&) = delete;
655 
656  ~cdef_meta_object (void) = default;
657 
658  bool is_class (void) const { return get_rep ()->is_class (); }
659 
660  bool is_property (void) const { return get_rep ()->is_property (); }
661 
662  bool is_method (void) const { return get_rep ()->is_method (); }
663 
664  bool is_package (void) const { return get_rep ()->is_package (); }
665 
667  meta_subsref (const std::string& type,
668  const std::list<octave_value_list>& idx, int nargout)
669  {
670  return get_rep ()->meta_subsref (type, idx, nargout);
671  }
672 
673  void meta_release (void) { get_rep ()->meta_release (); }
674 
676  {
677  return get_rep ()->meta_accepts_postfix_index (type);
678  }
679 
680  private:
681 
683  {
684  return dynamic_cast<cdef_meta_object_rep *> (cdef_object::get_rep ());
685  }
686 
687  const cdef_meta_object_rep * get_rep (void) const
688  {
689  return dynamic_cast<const cdef_meta_object_rep *> (cdef_object::get_rep ());
690  }
691  };
692 }
693 
694 #endif
N Dimensional Array with copy-on-write semantics.
Definition: Array.h:128
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:377
Definition: Cell.h:43
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:95
virtual bool is_package(void) const
Definition: cdef-object.h:615
virtual void meta_release(void)
Definition: cdef-object.h:625
cdef_meta_object_rep(const cdef_meta_object_rep &obj)
Definition: cdef-object.h:635
bool is_meta_object(void) const
Definition: cdef-object.h:607
virtual bool is_property(void) const
Definition: cdef-object.h:611
virtual octave_value_list meta_subsref(const std::string &, const std::list< octave_value_list > &, int)
Definition: cdef-object.h:618
virtual bool is_class(void) const
Definition: cdef-object.h:609
cdef_object_rep * copy(void) const
Definition: cdef-object.h:604
virtual bool meta_accepts_postfix_index(char) const
Definition: cdef-object.h:627
~cdef_meta_object_rep(void)=default
virtual bool is_method(void) const
Definition: cdef-object.h:613
bool is_class(void) const
Definition: cdef-object.h:658
bool is_method(void) const
Definition: cdef-object.h:662
const cdef_meta_object_rep * get_rep(void) const
Definition: cdef-object.h:687
bool is_package(void) const
Definition: cdef-object.h:664
~cdef_meta_object(void)=default
cdef_meta_object(const cdef_meta_object &obj)
Definition: cdef-object.h:648
bool meta_accepts_postfix_index(char type) const
Definition: cdef-object.h:675
bool is_property(void) const
Definition: cdef-object.h:660
cdef_meta_object_rep * get_rep(void)
Definition: cdef-object.h:682
cdef_meta_object(cdef_meta_object_rep *r)
Definition: cdef-object.h:650
cdef_meta_object(const cdef_object &obj)
Definition: cdef-object.h:652
octave_value_list meta_subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
Definition: cdef-object.h:667
~cdef_object_array(void)=default
bool is_valid(void) const
Definition: cdef-object.h:400
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
Definition: cdef-object.h:415
cdef_object_array(const Array< cdef_object > &a)
Definition: cdef-object.h:385
cdef_object_array(const cdef_object_array &obj)
Definition: cdef-object.h:440
octave_value get_property(octave_idx_type idx, const std::string &pname) const
Definition: cdef-object.h:424
Array< cdef_object > array_value(void) const
Definition: cdef-object.h:404
cdef_object_rep * clone(void) const
Definition: cdef-object.h:393
bool is_array(void) const
Definition: cdef-object.h:402
Array< cdef_object > array
Definition: cdef-object.h:433
dim_vector dims(void) const
Definition: cdef-object.h:398
cdef_object_base(const cdef_object_base &obj)
Definition: cdef-object.h:368
cdef_object_rep * empty_clone(void) const
Definition: cdef-object.h:358
virtual octave_idx_type static_count(void) const
Definition: cdef-object.h:172
virtual bool is_constructed_for(const cdef_class &) const
Definition: cdef-object.h:147
virtual void destroy(void)
Definition: cdef-object.h:174
virtual ~cdef_object_rep(void)=default
virtual cdef_object_rep * clone(void) const
Definition: cdef-object.h:70
virtual void set_class(const cdef_class &)
Definition: cdef-object.h:65
refcount< octave_idx_type > m_count
Definition: cdef-object.h:183
virtual octave_value get(const std::string &) const
Definition: cdef-object.h:106
virtual void put(const std::string &, const octave_value &)
Definition: cdef-object.h:103
virtual bool is_handle_object(void) const
Definition: cdef-object.h:94
virtual Array< cdef_object > array_value(void) const
Definition: cdef-object.h:98
OCTAVE_NORETURN void err_invalid_object(const char *who) const
Definition: cdef-object.h:191
virtual bool is_partially_constructed_for(const cdef_class &) const
Definition: cdef-object.h:152
virtual cdef_object_rep * copy(void) const
Definition: cdef-object.h:80
virtual bool is_array(void) const
Definition: cdef-object.h:90
virtual octave_value subsasgn(const std::string &, const std::list< octave_value_list > &, const octave_value &)
Definition: cdef-object.h:130
virtual void mark_as_constructed(const cdef_class &)
Definition: cdef-object.h:162
virtual void set_property(octave_idx_type, const std::string &, const octave_value &)
Definition: cdef-object.h:111
cdef_object_rep(const cdef_object_rep &)
Definition: cdef-object.h:187
virtual bool is_constructed(void) const
Definition: cdef-object.h:167
virtual cdef_object_rep * empty_clone(void) const
Definition: cdef-object.h:75
virtual bool is_valid(void) const
Definition: cdef-object.h:138
virtual octave_value get_property(octave_idx_type, const std::string &) const
Definition: cdef-object.h:117
virtual void mark_as_constructed(void)
Definition: cdef-object.h:157
virtual octave_value_list subsref(const std::string &, const std::list< octave_value_list > &, int, size_t &, const cdef_class &, bool)
Definition: cdef-object.h:123
virtual dim_vector dims(void) const
Definition: cdef-object.h:178
virtual bool is_value_object(void) const
Definition: cdef-object.h:92
virtual void mark_for_construction(const cdef_class &)
Definition: cdef-object.h:142
virtual cdef_object_rep * make_array(void) const
Definition: cdef-object.h:85
virtual bool is_meta_object(void) const
Definition: cdef-object.h:96
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
Definition: cdef-object.h:473
dim_vector dims(void) const
Definition: cdef-object.h:456
octave_value get(const std::string &pname) const
Definition: cdef-object.h:463
void put(const std::string &pname, const octave_value &val)
Definition: cdef-object.h:458
bool is_constructed(void) const
Definition: cdef-object.h:510
octave_scalar_map map
Definition: cdef-object.h:515
std::map< cdef_class, std::list< cdef_class > > ctor_list
Definition: cdef-object.h:518
~cdef_object_scalar(void)=default
octave_value get_property(octave_idx_type idx, const std::string &pname) const
Definition: cdef-object.h:483
cdef_object_scalar(const cdef_object_scalar &obj)
Definition: cdef-object.h:523
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout, size_t &skip, const cdef_class &context, bool auto_add=false)
Definition: cdef-object.h:279
bool is(const cdef_object &obj) const
Definition: cdef-object.h:324
void make_unique(int ignore_copies)
Definition: cdef-object.h:330
bool is_constructed_for(const cdef_class &cls) const
Definition: cdef-object.h:309
void mark_for_construction(const cdef_class &cls)
Definition: cdef-object.h:302
void set_property(octave_idx_type idx, const std::string &pname, const octave_value &pval)
Definition: cdef-object.h:266
bool is_value_object(void) const
Definition: cdef-object.h:248
bool is_constructed(void) const
Definition: cdef-object.h:307
cdef_object_rep * get_rep(void)
Definition: cdef-object.h:328
cdef_object make_array(void) const
Definition: cdef-object.h:239
void put(const std::string &pname, const octave_value &val)
Definition: cdef-object.h:256
void set_class(const cdef_class &cls)
Definition: cdef-object.h:226
bool ok(void) const
Definition: cdef-object.h:300
std::string class_name(void) const
Definition: cdef-object.h:228
bool is_handle_object(void) const
Definition: cdef-object.h:250
bool is_meta_object(void) const
Definition: cdef-object.h:252
cdef_object clone(void) const
Definition: cdef-object.h:230
bool is_partially_constructed_for(const cdef_class &cls) const
Definition: cdef-object.h:314
cdef_object(const cdef_object &obj)
Definition: cdef-object.h:205
void mark_as_constructed(const cdef_class &cls)
Definition: cdef-object.h:321
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs, int ignore_copies=0)
Definition: cdef-object.h:287
Array< cdef_object > array_value(void) const
Definition: cdef-object.h:254
octave_value get(const std::string &pname) const
Definition: cdef-object.h:261
cdef_object empty_clone(void) const
Definition: cdef-object.h:232
dim_vector dims(void) const
Definition: cdef-object.h:237
cdef_object(cdef_object_rep *r)
Definition: cdef-object.h:207
cdef_object copy(void) const
Definition: cdef-object.h:244
string_vector map_keys(void) const
Definition: cdef-object.h:294
virtual ~cdef_object(void)
Definition: cdef-object.h:209
octave_value get_property(octave_idx_type idx, const std::string &pname) const
Definition: cdef-object.h:273
void mark_as_constructed(void)
Definition: cdef-object.h:319
bool is_array(void) const
Definition: cdef-object.h:246
const cdef_object_rep * get_rep(void) const
Definition: cdef-object.h:298
cdef_object_rep * rep
Definition: cdef-object.h:338
handle_cdef_object(const handle_cdef_object &obj)
Definition: cdef-object.h:558
cdef_object_rep * copy(void) const
Definition: cdef-object.h:546
bool is_valid(void) const
Definition: cdef-object.h:551
bool is_handle_object(void) const
Definition: cdef-object.h:553
cdef_object_rep * clone(void) const
Definition: cdef-object.h:539
cdef_object_rep * clone(void) const
Definition: cdef-object.h:574
cdef_object_rep * copy(void) const
Definition: cdef-object.h:579
bool is_valid(void) const
Definition: cdef-object.h:581
value_cdef_object(const value_cdef_object &obj)
Definition: cdef-object.h:588
bool is_value_object(void) const
Definition: cdef-object.h:583
void error(const char *fmt,...)
Definition: error.cc:968
T * r
Definition: mx-inlines.cc:773
std::string release(void)
Definition: defaults.cc:143
static llvm::LLVMContext & context
Definition: jit-typeinfo.cc:80