GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pt-classdef.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_tree_classdef_h)
27 #define octave_tree_classdef_h 1
28 
29 #include "octave-config.h"
30 
31 class octave_value;
32 
33 #include "comment-list.h"
34 #include "pt-cmd.h"
35 #include "pt-exp.h"
36 #include "pt-walk.h"
37 #include "pt-id.h"
38 
39 #include "base-list.h"
40 
41 #include <list>
42 
43 namespace octave
44 {
45  class interpreter;
46 
48  {
49  public:
50 
51  tree_superclass_ref (void) = delete;
52 
53  tree_superclass_ref (const std::string& meth, const std::string& cls,
54  int l = -1, int c = -1)
55  : tree_expression (l, c), m_method_name (meth), m_class_name (cls)
56  { }
57 
58  // No copying!
59 
61 
63 
64  std::string method_name (void) const
65  {
66  return m_method_name;
67  }
68 
69  std::string class_name (void) const { return m_class_name; }
70 
71  tree_superclass_ref * dup (symbol_scope& scope) const;
72 
73  octave_value evaluate (tree_evaluator& tw, int nargout = 1)
74  {
75  octave_value_list retval = evaluate_n (tw, nargout);
76 
77  return retval.length () > 0 ? retval(0) : octave_value ();
78  }
79 
80  octave_value_list evaluate_n (tree_evaluator& tw, int nargout = 1);
81 
82  void accept (tree_walker& tw)
83  {
84  tw.visit_superclass_ref (*this);
85  }
86 
87  private:
88 
89  // The name of the method to call. This is the text before the
90  // "@" and may be of the form "object.method".
91  std::string m_method_name;
92 
93  // The name of the superclass. This is the text after the "@"
94  // and may be of the form "object.method".
95  std::string m_class_name;
96  };
97 
99  {
100  public:
101 
102  tree_metaclass_query (void) = delete;
103 
104  tree_metaclass_query (const std::string& cls, int l = -1, int c = -1)
105  : tree_expression (l, c), m_class_name (cls)
106  { }
107 
108  // No copying!
109 
111 
113 
114  std::string class_name (void) const { return m_class_name; }
115 
116  tree_metaclass_query * dup (symbol_scope& scope) const;
117 
118  octave_value evaluate (tree_evaluator&, int nargout = 1);
119 
121  {
122  return ovl (evaluate (tw, nargout));
123  }
124 
125  void accept (tree_walker& tw)
126  {
127  tw.visit_metaclass_query (*this);
128  }
129 
130  private:
131 
132  std::string m_class_name;
133  };
134 
136  {
137  public:
138 
140  tree_expression *e = nullptr)
141  : m_id (i), m_expr (e), m_neg (false)
142  { }
143 
145  : m_id (i), m_expr (nullptr), m_neg (b)
146  { }
147 
148  // No copying!
149 
151 
153 
155  {
156  delete m_id;
157  delete m_expr;
158  }
159 
160  tree_identifier * ident (void) { return m_id; }
161 
162  tree_expression * expression (void) { return m_expr; }
163 
164  bool negate (void) { return m_neg; }
165 
166  void accept (tree_walker& tw)
167  {
168  tw.visit_classdef_attribute (*this);
169  }
170 
171  private:
172 
175  bool m_neg;
176  };
177 
178  class tree_classdef_attribute_list : public base_list<tree_classdef_attribute *>
179  {
180  public:
181 
183 
185 
188  { }
189 
190  // No copying!
191 
193 
196 
198 
199  void accept (tree_walker& tw)
200  {
202  }
203  };
204 
206  {
207  public:
208 
209  tree_classdef_superclass (const std::string& cname)
210  : m_cls_name (cname)
211  { }
212 
213  // No copying!
214 
216 
219 
220  ~tree_classdef_superclass (void) = default;
221 
222  std::string class_name (void) { return m_cls_name; }
223 
224  void accept (tree_walker& tw)
225  {
226  tw.visit_classdef_superclass (*this);
227  }
228 
229  private:
230 
231  std::string m_cls_name;
232  };
233 
235  : public base_list<tree_classdef_superclass *>
236  {
237  public:
238 
240 
242  {
243  append (sc);
244  }
245 
248  { }
249 
250  // No copying!
251 
253 
256 
258 
259  void accept (tree_walker& tw)
260  {
262  }
263  };
264 
265  template <typename T>
267  {
268  public:
269 
271  base_list<T> *elist, comment_list *lc,
272  comment_list *tc, int l = -1, int c = -1)
273  : tree (l, c), m_attr_list (a), m_elt_list (elist),
274  m_lead_comm (lc), m_trail_comm (tc)
275  { }
276 
277  // No copying!
278 
280 
282 
284  {
285  delete m_attr_list;
286  delete m_elt_list;
287  delete m_lead_comm;
288  delete m_trail_comm;
289  }
290 
292 
293  base_list<T> * element_list (void) { return m_elt_list; }
294 
296 
298 
299  void accept (tree_walker&) { }
300 
301  private:
302 
303  // List of attributes that apply to this class.
305 
306  // The list of objects contained in this block.
308 
309  // Comments preceding the token marking the beginning of the block.
311 
312  // Comments preceding the END token marking the end of the block.
314  };
315 
317  {
318  public:
319 
321  comment_list *comments = nullptr);
322 
324  comment_list *comments = nullptr);
325 
326  // No copying!
327 
329 
331 
333  {
334  delete m_id;
335  delete m_expr;
336  }
337 
338  tree_identifier * ident (void) { return m_id; }
339 
340  tree_expression * expression (void) { return m_expr; }
341 
342  comment_list * comments (void) const { return m_comments; }
343 
344  void doc_string (const std::string& txt) { m_doc_string = txt; }
345 
346  std::string doc_string (void) const { return m_doc_string; }
347 
348  bool have_doc_string (void) const { return ! m_doc_string.empty (); }
349 
350  void accept (tree_walker& tw)
351  {
352  tw.visit_classdef_property (*this);
353  }
354 
355  private:
356 
360  std::string m_doc_string;
361  };
362 
363  class tree_classdef_property_list : public base_list<tree_classdef_property *>
364  {
365  public:
366 
368 
370 
372  : base_list<tree_classdef_property *> (a) { }
373 
374  // No copying!
375 
377 
380 
382 
383  void accept (tree_walker& tw)
384  {
385  tw.visit_classdef_property_list (*this);
386  }
387  };
388 
390  : public tree_classdef_element<tree_classdef_property *>
391  {
392  public:
393 
396  comment_list *lc, comment_list *tc,
397  int l = -1, int c = -1)
398  : tree_classdef_element<tree_classdef_property *> (a, plist, lc, tc, l, c)
399  { }
400 
401  // No copying!
402 
404 
407 
409 
410  void accept (tree_walker& tw)
411  {
413  }
414  };
415 
416  class tree_classdef_methods_list : public base_list<octave_value>
417  {
418  public:
419 
421 
423 
425  : base_list<octave_value> (a) { }
426 
427  // No copying!
428 
430 
433 
434  ~tree_classdef_methods_list (void) = default;
435 
436  void accept (tree_walker& tw)
437  {
438  tw.visit_classdef_methods_list (*this);
439  }
440  };
441 
443  {
444  public:
445 
448  comment_list *lc, comment_list *tc,
449  int l = -1, int c = -1)
450  : tree_classdef_element<octave_value> (a, mlist, lc, tc, l, c)
451  { }
452 
453  // No copying!
454 
456 
459 
461 
462  void accept (tree_walker& tw)
463  {
464  tw.visit_classdef_methods_block (*this);
465  }
466  };
467 
469  {
470  public:
471 
472  tree_classdef_event (tree_identifier *i = nullptr,
473  comment_list *comments = nullptr);
474 
475  // No copying!
476 
478 
480 
482  {
483  delete m_id;
484  }
485 
486  tree_identifier * ident (void) { return m_id; }
487 
488  comment_list * comments (void) const { return m_comments; }
489 
490  void doc_string (const std::string& txt) { m_doc_string = txt; }
491 
492  std::string doc_string (void) const { return m_doc_string; }
493 
494  bool have_doc_string (void) const { return ! m_doc_string.empty (); }
495 
496  void accept (tree_walker& tw)
497  {
498  tw.visit_classdef_event (*this);
499  }
500 
501  private:
502 
505  std::string m_doc_string;
506  };
507 
508  class tree_classdef_events_list : public base_list<tree_classdef_event *>
509  {
510  public:
511 
513 
515 
518  { }
519 
520  // No copying!
521 
523 
526 
528 
529  void accept (tree_walker& tw)
530  {
531  tw.visit_classdef_events_list (*this);
532  }
533  };
534 
536  : public tree_classdef_element<tree_classdef_event *>
537  {
538  public:
539 
542  comment_list *lc, comment_list *tc,
543  int l = -1, int c = -1)
544  : tree_classdef_element<tree_classdef_event *> (a, elist, lc, tc, l, c)
545  { }
546 
547  // No copying!
548 
550 
553 
554  ~tree_classdef_events_block (void) = default;
555 
556  void accept (tree_walker& tw)
557  {
558  tw.visit_classdef_events_block (*this);
559  }
560  };
561 
563  {
564  public:
565 
568 
569  // No copying!
570 
572 
574 
576  {
577  delete m_id;
578  delete m_expr;
579  }
580 
581  tree_identifier * ident (void) { return m_id; }
582 
583  tree_expression * expression (void) { return m_expr; }
584 
585  comment_list * comments (void) const { return m_comments; }
586 
587  void doc_string (const std::string& txt) { m_doc_string = txt; }
588 
589  std::string doc_string (void) const { return m_doc_string; }
590 
591  bool have_doc_string (void) const { return ! m_doc_string.empty (); }
592 
593  void accept (tree_walker& tw)
594  {
595  tw.visit_classdef_enum (*this);
596  }
597 
598  private:
599 
603  std::string m_doc_string;
604  };
605 
606  class tree_classdef_enum_list : public base_list<tree_classdef_enum *>
607  {
608  public:
609 
611 
613 
616  { }
617 
618  // No copying!
619 
621 
623 
625 
626  void accept (tree_walker& tw)
627  {
628  tw.visit_classdef_enum_list (*this);
629  }
630  };
631 
633  : public tree_classdef_element<tree_classdef_enum *>
634  {
635  public:
636 
639  comment_list *lc, comment_list *tc,
640  int l = -1, int c = -1)
641  : tree_classdef_element<tree_classdef_enum *> (a, elist, lc, tc, l, c)
642  { }
643 
644  // No copying!
645 
647 
650 
651  ~tree_classdef_enum_block (void) = default;
652 
653  void accept (tree_walker& tw)
654  {
655  tw.visit_classdef_enum_block (*this);
656  }
657  };
658 
660  {
661  public:
662 
663  typedef std::list<tree_classdef_properties_block *>::iterator
665  typedef std::list<tree_classdef_properties_block *>::const_iterator
667 
668  typedef std::list<tree_classdef_methods_block *>::iterator
670  typedef std::list<tree_classdef_methods_block *>::const_iterator
672 
673  typedef std::list<tree_classdef_events_block *>::iterator events_list_iterator;
674  typedef std::list<tree_classdef_events_block *>::const_iterator
676 
677  typedef std::list<tree_classdef_enum_block *>::iterator enum_list_iterator;
678  typedef std::list<tree_classdef_enum_block *>::const_iterator
680 
681  tree_classdef_body (void);
682 
684 
686 
688 
690 
691  // No copying!
692 
694 
696 
697  ~tree_classdef_body (void);
698 
700  {
701  m_properties_lst.push_back (pb);
702  }
703 
705  {
706  m_methods_lst.push_back (mb);
707  }
708 
710  {
711  m_events_lst.push_back (evb);
712  }
713 
715  {
716  m_enum_lst.push_back (enb);
717  }
718 
719  std::list<tree_classdef_properties_block *> properties_list (void)
720  {
721  return m_properties_lst;
722  }
723 
724  std::list<tree_classdef_methods_block *> methods_list (void)
725  {
726  return m_methods_lst;
727  }
728 
729  std::list<tree_classdef_events_block *> events_list (void)
730  {
731  return m_events_lst;
732  }
733 
734  std::list<tree_classdef_enum_block *> enum_list (void)
735  {
736  return m_enum_lst;
737  }
738 
739  void doc_string (const std::string& txt) { m_doc_string = txt; }
740 
741  std::string doc_string (void) const { return m_doc_string; }
742 
743  bool have_doc_string (void) const { return ! m_doc_string.empty (); }
744 
745  void accept (tree_walker& tw)
746  {
747  tw.visit_classdef_body (*this);
748  }
749 
750  private:
751 
752  std::string get_doc_string (comment_list *comment) const;
753 
754  std::list<tree_classdef_properties_block *> m_properties_lst;
755 
756  std::list<tree_classdef_methods_block *> m_methods_lst;
757 
758  std::list<tree_classdef_events_block *> m_events_lst;
759 
760  std::list<tree_classdef_enum_block *> m_enum_lst;
761 
762  std::string m_doc_string;
763  };
764 
765  // Classdef definition.
766 
768  {
769  public:
770 
775  comment_list *tc, const std::string& pn = "",
776  int l = -1, int c = -1)
777  : tree_command (l, c), m_scope (scope), m_attr_list (a), m_id (i),
779  m_trail_comm (tc), m_pack_name (pn)
780  { }
781 
782  // No copying!
783 
784  tree_classdef (const tree_classdef&) = delete;
785 
787 
789  {
790  delete m_attr_list;
791  delete m_id;
792  delete m_supclass_list;
793  delete m_element_list;
794  delete m_lead_comm;
795  delete m_trail_comm;
796  }
797 
798  octave::symbol_scope scope (void) { return m_scope; }
799 
801  attribute_list (void) { return m_attr_list; }
802 
803  tree_identifier * ident (void) { return m_id; }
804 
806  superclass_list (void) { return m_supclass_list; }
807 
809 
812 
813  std::string package_name (void) const { return m_pack_name; }
814 
816  bool is_at_folder = false);
817 
818  std::string doc_string (void) const
819  {
820  return m_element_list ? m_element_list->doc_string () : "";
821  }
822 
823  void accept (tree_walker& tw)
824  {
825  tw.visit_classdef (*this);
826  }
827 
828  private:
829 
830  // The scope that was used when parsing the classdef object and that
831  // corresponds to any identifiers that were found in attribute lists
832  // (for example). Used again when computing the meta class object.
833 
835 
837 
839 
841 
843 
846 
847  std::string m_pack_name;
848  };
849 }
850 
851 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
852 
853 // Hmm, a lot of these are templates, so not sure how to typedef them.
854 
855 #endif
856 
857 #endif
void append(const tree_classdef_attribute * &s)
Definition: base-list.h:92
tree_classdef_attribute_list(const base_list< tree_classdef_attribute * > &a)
Definition: pt-classdef.h:186
tree_classdef_attribute_list(tree_classdef_attribute *a)
Definition: pt-classdef.h:184
tree_classdef_attribute_list & operator=(const tree_classdef_attribute_list &)=delete
tree_classdef_attribute_list(const tree_classdef_attribute_list &)=delete
tree_classdef_attribute & operator=(const tree_classdef_attribute &)=delete
tree_identifier * ident(void)
Definition: pt-classdef.h:160
tree_classdef_attribute(tree_identifier *i, bool b)
Definition: pt-classdef.h:144
tree_classdef_attribute(tree_identifier *i=nullptr, tree_expression *e=nullptr)
Definition: pt-classdef.h:139
void accept(tree_walker &tw)
Definition: pt-classdef.h:166
tree_classdef_attribute(const tree_classdef_attribute &)=delete
tree_expression * expression(void)
Definition: pt-classdef.h:162
std::list< tree_classdef_properties_block * > m_properties_lst
Definition: pt-classdef.h:754
std::list< tree_classdef_enum_block * >::const_iterator enum_list_const_iterator
Definition: pt-classdef.h:679
std::list< tree_classdef_events_block * > events_list(void)
Definition: pt-classdef.h:729
std::list< tree_classdef_properties_block * >::iterator properties_list_iterator
Definition: pt-classdef.h:664
bool have_doc_string(void) const
Definition: pt-classdef.h:743
std::list< tree_classdef_methods_block * > methods_list(void)
Definition: pt-classdef.h:724
std::list< tree_classdef_enum_block * > m_enum_lst
Definition: pt-classdef.h:760
std::string doc_string(void) const
Definition: pt-classdef.h:741
std::list< tree_classdef_methods_block * >::iterator methods_list_iterator
Definition: pt-classdef.h:669
std::list< tree_classdef_events_block * >::iterator events_list_iterator
Definition: pt-classdef.h:673
tree_classdef_body & operator=(const tree_classdef_body &)=delete
void append(tree_classdef_events_block *evb)
Definition: pt-classdef.h:709
std::list< tree_classdef_events_block * >::const_iterator events_list_const_iterator
Definition: pt-classdef.h:675
std::list< tree_classdef_methods_block * > m_methods_lst
Definition: pt-classdef.h:756
void append(tree_classdef_properties_block *pb)
Definition: pt-classdef.h:699
std::list< tree_classdef_enum_block * >::iterator enum_list_iterator
Definition: pt-classdef.h:677
std::list< tree_classdef_events_block * > m_events_lst
Definition: pt-classdef.h:758
std::list< tree_classdef_enum_block * > enum_list(void)
Definition: pt-classdef.h:734
void append(tree_classdef_enum_block *enb)
Definition: pt-classdef.h:714
std::list< tree_classdef_methods_block * >::const_iterator methods_list_const_iterator
Definition: pt-classdef.h:671
std::string get_doc_string(comment_list *comment) const
Definition: pt-classdef.cc:282
void doc_string(const std::string &txt)
Definition: pt-classdef.h:739
std::list< tree_classdef_properties_block * >::const_iterator properties_list_const_iterator
Definition: pt-classdef.h:666
std::list< tree_classdef_properties_block * > properties_list(void)
Definition: pt-classdef.h:719
void accept(tree_walker &tw)
Definition: pt-classdef.h:745
tree_classdef_body(const tree_classdef_body &)=delete
void append(tree_classdef_methods_block *mb)
Definition: pt-classdef.h:704
comment_list * trailing_comment(void)
Definition: pt-classdef.h:297
tree_classdef_attribute_list * m_attr_list
Definition: pt-classdef.h:304
base_list< T > * m_elt_list
Definition: pt-classdef.h:307
comment_list * leading_comment(void)
Definition: pt-classdef.h:295
base_list< T > * element_list(void)
Definition: pt-classdef.h:293
tree_classdef_element(tree_classdef_attribute_list *a, base_list< T > *elist, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:270
tree_classdef_attribute_list * attribute_list(void)
Definition: pt-classdef.h:291
tree_classdef_element & operator=(const tree_classdef_element &)=delete
void accept(tree_walker &)
Definition: pt-classdef.h:299
tree_classdef_element(const tree_classdef_element &)=delete
void accept(tree_walker &tw)
Definition: pt-classdef.h:653
tree_classdef_enum_block(const tree_classdef_enum_block &)=delete
tree_classdef_enum_block(tree_classdef_attribute_list *a, tree_classdef_enum_list *elist, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:637
tree_classdef_enum_block & operator=(const tree_classdef_enum_block &)=delete
tree_classdef_enum_list(const tree_classdef_enum_list &)=delete
tree_classdef_enum_list(tree_classdef_enum *e)
Definition: pt-classdef.h:612
void accept(tree_walker &tw)
Definition: pt-classdef.h:626
tree_classdef_enum_list & operator=(const tree_classdef_enum_list &)=delete
tree_classdef_enum_list(const base_list< tree_classdef_enum * > &a)
Definition: pt-classdef.h:614
tree_classdef_enum & operator=(const tree_classdef_enum &)=delete
tree_classdef_enum(const tree_classdef_enum &)=delete
tree_expression * expression(void)
Definition: pt-classdef.h:583
comment_list * m_comments
Definition: pt-classdef.h:602
tree_expression * m_expr
Definition: pt-classdef.h:601
void doc_string(const std::string &txt)
Definition: pt-classdef.h:587
comment_list * comments(void) const
Definition: pt-classdef.h:585
tree_identifier * m_id
Definition: pt-classdef.h:600
bool have_doc_string(void) const
Definition: pt-classdef.h:591
tree_identifier * ident(void)
Definition: pt-classdef.h:581
void accept(tree_walker &tw)
Definition: pt-classdef.h:593
tree_classdef_enum(tree_identifier *i, tree_expression *e, comment_list *comments)
Definition: pt-classdef.cc:195
std::string doc_string(void) const
Definition: pt-classdef.h:589
std::string doc_string(void) const
Definition: pt-classdef.h:492
tree_identifier * m_id
Definition: pt-classdef.h:503
tree_classdef_event & operator=(const tree_classdef_event &)=delete
comment_list * comments(void) const
Definition: pt-classdef.h:488
void doc_string(const std::string &txt)
Definition: pt-classdef.h:490
tree_identifier * ident(void)
Definition: pt-classdef.h:486
tree_classdef_event(tree_identifier *i=nullptr, comment_list *comments=nullptr)
Definition: pt-classdef.cc:173
void accept(tree_walker &tw)
Definition: pt-classdef.h:496
tree_classdef_event(const tree_classdef_event &)=delete
bool have_doc_string(void) const
Definition: pt-classdef.h:494
void accept(tree_walker &tw)
Definition: pt-classdef.h:556
tree_classdef_events_block(tree_classdef_attribute_list *a, tree_classdef_events_list *elist, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:540
tree_classdef_events_block(const tree_classdef_events_block &)=delete
tree_classdef_events_block & operator=(const tree_classdef_events_block &)=delete
tree_classdef_events_list(tree_classdef_event *e)
Definition: pt-classdef.h:514
tree_classdef_events_list & operator=(const tree_classdef_events_list &)=delete
tree_classdef_events_list(const base_list< tree_classdef_event * > &a)
Definition: pt-classdef.h:516
void accept(tree_walker &tw)
Definition: pt-classdef.h:529
tree_classdef_events_list(const tree_classdef_events_list &)=delete
void accept(tree_walker &tw)
Definition: pt-classdef.h:462
tree_classdef_methods_block(const tree_classdef_methods_block &)=delete
tree_classdef_methods_block(tree_classdef_attribute_list *a, tree_classdef_methods_list *mlist, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:446
tree_classdef_methods_block & operator=(const tree_classdef_methods_block &)=delete
void accept(tree_walker &tw)
Definition: pt-classdef.h:436
tree_classdef_methods_list(const tree_classdef_methods_list &)=delete
tree_classdef_methods_list(const octave_value &f)
Definition: pt-classdef.h:422
tree_classdef_methods_list & operator=(const tree_classdef_methods_list &)=delete
tree_classdef_methods_list(const base_list< octave_value > &a)
Definition: pt-classdef.h:424
tree_classdef_properties_block & operator=(const tree_classdef_properties_block &)=delete
tree_classdef_properties_block(const tree_classdef_properties_block &)=delete
tree_classdef_properties_block(tree_classdef_attribute_list *a, tree_classdef_property_list *plist, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:394
tree_classdef_property_list(tree_classdef_property *p)
Definition: pt-classdef.h:369
tree_classdef_property_list(const tree_classdef_property_list &)=delete
tree_classdef_property_list & operator=(const tree_classdef_property_list &)=delete
tree_classdef_property_list(const base_list< tree_classdef_property * > &a)
Definition: pt-classdef.h:371
void accept(tree_walker &tw)
Definition: pt-classdef.h:383
std::string doc_string(void) const
Definition: pt-classdef.h:346
tree_classdef_property & operator=(const tree_classdef_property &)=delete
comment_list * comments(void) const
Definition: pt-classdef.h:342
tree_identifier * ident(void)
Definition: pt-classdef.h:338
tree_expression * expression(void)
Definition: pt-classdef.h:340
void accept(tree_walker &tw)
Definition: pt-classdef.h:350
bool have_doc_string(void) const
Definition: pt-classdef.h:348
void doc_string(const std::string &txt)
Definition: pt-classdef.h:344
tree_classdef_property(tree_identifier *i, comment_list *comments=nullptr)
Definition: pt-classdef.cc:140
tree_classdef_property(const tree_classdef_property &)=delete
tree_classdef_superclass_list(const tree_classdef_superclass_list &)=delete
tree_classdef_superclass_list & operator=(const tree_classdef_superclass_list &)=delete
tree_classdef_superclass_list(tree_classdef_superclass *sc)
Definition: pt-classdef.h:241
tree_classdef_superclass_list(const base_list< tree_classdef_superclass * > &a)
Definition: pt-classdef.h:246
tree_classdef_superclass & operator=(const tree_classdef_superclass &)=delete
tree_classdef_superclass(const std::string &cname)
Definition: pt-classdef.h:209
tree_classdef_superclass(const tree_classdef_superclass &)=delete
void accept(tree_walker &tw)
Definition: pt-classdef.h:224
tree_classdef & operator=(const tree_classdef &)=delete
tree_classdef_superclass_list * superclass_list(void)
Definition: pt-classdef.h:806
tree_identifier * ident(void)
Definition: pt-classdef.h:803
tree_classdef_body * body(void)
Definition: pt-classdef.h:808
tree_classdef_body * m_element_list
Definition: pt-classdef.h:842
comment_list * m_trail_comm
Definition: pt-classdef.h:845
comment_list * trailing_comment(void)
Definition: pt-classdef.h:811
tree_identifier * m_id
Definition: pt-classdef.h:838
comment_list * leading_comment(void)
Definition: pt-classdef.h:810
std::string m_pack_name
Definition: pt-classdef.h:847
void accept(tree_walker &tw)
Definition: pt-classdef.h:823
tree_classdef_attribute_list * attribute_list(void)
Definition: pt-classdef.h:801
octave::symbol_scope m_scope
Definition: pt-classdef.h:834
tree_classdef(const octave::symbol_scope &scope, tree_classdef_attribute_list *a, tree_identifier *i, tree_classdef_superclass_list *sc, tree_classdef_body *b, comment_list *lc, comment_list *tc, const std::string &pn="", int l=-1, int c=-1)
Definition: pt-classdef.h:771
std::string package_name(void) const
Definition: pt-classdef.h:813
octave_value make_meta_class(interpreter &interp, bool is_at_folder=false)
Definition: pt-classdef.cc:300
tree_classdef(const tree_classdef &)=delete
tree_classdef_superclass_list * m_supclass_list
Definition: pt-classdef.h:840
std::string doc_string(void) const
Definition: pt-classdef.h:818
tree_classdef_attribute_list * m_attr_list
Definition: pt-classdef.h:836
octave::symbol_scope scope(void)
Definition: pt-classdef.h:798
comment_list * m_lead_comm
Definition: pt-classdef.h:844
void accept(tree_walker &tw)
Definition: pt-classdef.h:125
tree_metaclass_query * dup(symbol_scope &scope) const
Definition: pt-classdef.cc:78
tree_metaclass_query(const std::string &cls, int l=-1, int c=-1)
Definition: pt-classdef.h:104
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition: pt-classdef.cc:89
std::string class_name(void) const
Definition: pt-classdef.h:114
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.h:120
tree_metaclass_query(const tree_metaclass_query &)=delete
tree_metaclass_query & operator=(const tree_metaclass_query &)=delete
std::string method_name(void) const
Definition: pt-classdef.h:64
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.cc:52
tree_superclass_ref(void)=delete
tree_superclass_ref * dup(symbol_scope &scope) const
Definition: pt-classdef.cc:40
std::string class_name(void) const
Definition: pt-classdef.h:69
tree_superclass_ref & operator=(const tree_superclass_ref &)=delete
tree_superclass_ref(const std::string &meth, const std::string &cls, int l=-1, int c=-1)
Definition: pt-classdef.h:53
octave_value evaluate(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.h:73
void accept(tree_walker &tw)
Definition: pt-classdef.h:82
tree_superclass_ref(const tree_superclass_ref &)=delete
virtual void visit_classdef_property_list(tree_classdef_property_list &)
Definition: pt-walk.cc:551
virtual void visit_classdef_attribute(tree_classdef_attribute &)
Definition: pt-walk.cc:526
virtual void visit_classdef_property(tree_classdef_property &)
Definition: pt-walk.cc:546
virtual void visit_classdef_events_block(tree_classdef_events_block &)
Definition: pt-walk.cc:581
virtual void visit_classdef_methods_list(tree_classdef_methods_list &)
Definition: pt-walk.cc:561
virtual void visit_classdef(tree_classdef &)
Definition: pt-walk.cc:606
virtual void visit_classdef_body(tree_classdef_body &)
Definition: pt-walk.cc:601
virtual void visit_classdef_event(tree_classdef_event &)
Definition: pt-walk.cc:571
virtual void visit_classdef_enum_list(tree_classdef_enum_list &)
Definition: pt-walk.cc:591
virtual void visit_classdef_superclass_list(tree_classdef_superclass_list &)
Definition: pt-walk.cc:541
virtual void visit_classdef_enum_block(tree_classdef_enum_block &)
Definition: pt-walk.cc:596
virtual void visit_classdef_superclass(tree_classdef_superclass &)
Definition: pt-walk.cc:536
virtual void visit_classdef_properties_block(tree_classdef_properties_block &)
Definition: pt-walk.cc:556
virtual void visit_classdef_methods_block(tree_classdef_methods_block &)
Definition: pt-walk.cc:566
virtual void visit_superclass_ref(tree_superclass_ref &)
Definition: pt-walk.cc:516
virtual void visit_classdef_events_list(tree_classdef_events_list &)
Definition: pt-walk.cc:576
virtual void visit_classdef_attribute_list(tree_classdef_attribute_list &)
Definition: pt-walk.cc:531
virtual void visit_classdef_enum(tree_classdef_enum &)
Definition: pt-walk.cc:586
virtual void visit_metaclass_query(tree_metaclass_query &)
Definition: pt-walk.cc:521
static double f(double k, double l_nu, double c_pm)
Definition: randpoisson.cc:118
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition: ov.cc:811
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
Definition: ovl.h:211