GNU Octave  9.1.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-2024 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 
44 
45 class interpreter;
46 
48 
50 {
51 public:
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  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_superclass_ref)
59 
60  ~tree_superclass_ref () = default;
61 
62  std::string method_name () const
63  {
64  return m_method_name;
65  }
66 
67  std::string class_name () const { return m_class_name; }
68 
69  tree_superclass_ref * dup (symbol_scope& scope) const;
70 
71  octave_value evaluate (tree_evaluator& tw, int nargout = 1)
72  {
73  octave_value_list retval = evaluate_n (tw, nargout);
74 
75  return retval.length () > 0 ? retval(0) : octave_value ();
76  }
77 
78  octave_value_list evaluate_n (tree_evaluator& tw, int nargout = 1);
79 
80  void accept (tree_walker& tw)
81  {
82  tw.visit_superclass_ref (*this);
83  }
84 
85 private:
86 
87  // The name of the method to call. This is the text before the
88  // "@" and may be of the form "object.method".
89  std::string m_method_name;
90 
91  // The name of the superclass. This is the text after the "@"
92  // and may be of the form "object.method".
93  std::string m_class_name;
94 };
95 
97 {
98 public:
99 
100  tree_metaclass_query (const std::string& cls, int l = -1, int c = -1)
101  : tree_expression (l, c), m_class_name (cls)
102  { }
103 
104  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_metaclass_query)
105 
106  ~tree_metaclass_query () = default;
107 
108  std::string class_name () const { return m_class_name; }
109 
110  tree_metaclass_query * dup (symbol_scope& scope) const;
111 
112  octave_value evaluate (tree_evaluator&, int nargout = 1);
113 
115  {
116  return ovl (evaluate (tw, nargout));
117  }
118 
119  void accept (tree_walker& tw)
120  {
121  tw.visit_metaclass_query (*this);
122  }
123 
124 private:
125 
126  std::string m_class_name;
127 };
128 
130 {
131 public:
132 
134  tree_expression *e = nullptr)
135  : m_id (i), m_expr (e), m_neg (false)
136  { }
137 
139  : m_id (i), m_expr (nullptr), m_neg (b)
140  { }
141 
142  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_attribute)
143 
145  {
146  delete m_id;
147  delete m_expr;
148  }
149 
150  tree_identifier * ident () { return m_id; }
151 
152  tree_expression * expression () { return m_expr; }
153 
154  bool negate () { return m_neg; }
155 
156  void accept (tree_walker& tw)
157  {
158  tw.visit_classdef_attribute (*this);
159  }
160 
161 private:
162 
163  tree_identifier *m_id;
164  tree_expression *m_expr;
165  bool m_neg;
166 };
167 
168 class tree_classdef_attribute_list : public base_list<tree_classdef_attribute *>
169 {
170 public:
171 
173 
175 
178  { }
179 
180  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_attribute_list)
181 
183 
184  void accept (tree_walker& tw)
185  {
187  }
188 };
189 
191 {
192 public:
193 
194  tree_classdef_superclass (const std::string& cname)
195  : m_cls_name (cname)
196  { }
197 
198  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_superclass)
199 
201 
202  std::string class_name () { return m_cls_name; }
203 
204  void accept (tree_walker& tw)
205  {
206  tw.visit_classdef_superclass (*this);
207  }
208 
209 private:
210 
211  std::string m_cls_name;
212 };
213 
215  : public base_list<tree_classdef_superclass *>
216 {
217 public:
218 
220 
222  {
223  append (sc);
224  }
225 
228  { }
229 
230  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_superclass_list)
231 
233 
234  void accept (tree_walker& tw)
235  {
237  }
238 };
239 
240 template <typename T>
242 {
243 public:
244 
246  comment_list *lc, comment_list *tc,
247  int l = -1, int c = -1)
248  : tree (l, c), m_attr_list (a), m_elt_list (elt_list),
249  m_lead_comm (lc), m_trail_comm (tc)
250  { }
251 
252  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_element)
253 
255  {
256  delete m_attr_list;
257  delete m_elt_list;
258  delete m_lead_comm;
259  delete m_trail_comm;
260  }
261 
262  tree_classdef_attribute_list * attribute_list () { return m_attr_list; }
263 
264  T * element_list () { return m_elt_list; }
265 
266  comment_list * leading_comment () { return m_lead_comm; }
267 
268  comment_list * trailing_comment () { return m_trail_comm; }
269 
270  void accept (tree_walker&) { }
271 
272 private:
273 
274  // List of attributes that apply to this class.
275  tree_classdef_attribute_list *m_attr_list;
276 
277  // The list of objects contained in this block.
278  T *m_elt_list;
279 
280  // Comments preceding the token marking the beginning of the block.
281  comment_list *m_lead_comm;
282 
283  // Comments preceding the END token marking the end of the block.
284  comment_list *m_trail_comm;
285 };
286 
288 {
289 public:
290 
292  comment_list *comments = nullptr);
293 
294  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_property)
295 
297 
298  tree_identifier * ident ();
299 
301 
302  comment_list * comments () const { return m_comments; }
303 
304  void doc_string (const std::string& txt) { m_doc_string = txt; }
305 
306  std::string doc_string () const { return m_doc_string; }
307 
308  bool have_doc_string () const { return ! m_doc_string.empty (); }
309 
310  void accept (tree_walker& tw)
311  {
312  tw.visit_classdef_property (*this);
313  }
314 
315 private:
316 
317  tree_arg_validation *m_av;
318  comment_list *m_comments;
319  std::string m_doc_string;
320 };
321 
322 class tree_classdef_property_list : public base_list<tree_classdef_property *>
323 {
324 public:
325 
327 
329 
331  : base_list<tree_classdef_property *> (a) { }
332 
333  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_property_list)
334 
336 
337  void accept (tree_walker& tw)
338  {
339  tw.visit_classdef_property_list (*this);
340  }
341 };
342 
344  : public tree_classdef_element<tree_classdef_property_list>
345 {
346 public:
347 
350  comment_list *lc, comment_list *tc,
351  int l = -1, int c = -1)
352  : tree_classdef_element<tree_classdef_property_list> (a, plist, lc, tc, l, c)
353  { }
354 
355  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_properties_block)
356 
358 
359  void accept (tree_walker& tw)
360  {
362  }
363 };
364 
365 class tree_classdef_methods_list : public base_list<octave_value>
366 {
367 public:
368 
370 
372 
374  : base_list<octave_value> (a) { }
375 
376  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_methods_list)
377 
379 
380  void accept (tree_walker& tw)
381  {
382  tw.visit_classdef_methods_list (*this);
383  }
384 };
385 
387  : public tree_classdef_element<tree_classdef_methods_list>
388 {
389 public:
390 
393  comment_list *lc, comment_list *tc,
394  int l = -1, int c = -1)
395  : tree_classdef_element<tree_classdef_methods_list> (a, mlist, lc, tc, l, c)
396  { }
397 
398  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_methods_block)
399 
401 
402  void accept (tree_walker& tw)
403  {
404  tw.visit_classdef_methods_block (*this);
405  }
406 };
407 
409 {
410 public:
411 
412  tree_classdef_event (tree_identifier *i = nullptr,
413  comment_list *comments = nullptr);
414 
415  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_event)
416 
418  {
419  delete m_id;
420  delete m_comments;
421  }
422 
423  tree_identifier * ident () { return m_id; }
424 
425  comment_list * comments () const { return m_comments; }
426 
427  void doc_string (const std::string& txt) { m_doc_string = txt; }
428 
429  std::string doc_string () const { return m_doc_string; }
430 
431  bool have_doc_string () const { return ! m_doc_string.empty (); }
432 
433  void accept (tree_walker& tw)
434  {
435  tw.visit_classdef_event (*this);
436  }
437 
438 private:
439 
440  tree_identifier *m_id;
441  comment_list *m_comments;
442  std::string m_doc_string;
443 };
444 
445 class tree_classdef_events_list : public base_list<tree_classdef_event *>
446 {
447 public:
448 
450 
452 
455  { }
456 
457  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_events_list)
458 
460 
461  void accept (tree_walker& tw)
462  {
463  tw.visit_classdef_events_list (*this);
464  }
465 };
466 
468  : public tree_classdef_element<tree_classdef_events_list>
469 {
470 public:
471 
474  comment_list *lc, comment_list *tc,
475  int l = -1, int c = -1)
476  : tree_classdef_element<tree_classdef_events_list> (a, elist, lc, tc, l, c)
477  { }
478 
479  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_events_block)
480 
482 
483  void accept (tree_walker& tw)
484  {
485  tw.visit_classdef_events_block (*this);
486  }
487 };
488 
490 {
491 public:
492 
495 
496  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_enum)
497 
499  {
500  delete m_id;
501  delete m_expr;
502  delete m_comments;
503  }
504 
505  tree_identifier * ident () { return m_id; }
506 
507  tree_expression * expression () { return m_expr; }
508 
509  comment_list * comments () const { return m_comments; }
510 
511  void doc_string (const std::string& txt) { m_doc_string = txt; }
512 
513  std::string doc_string () const { return m_doc_string; }
514 
515  bool have_doc_string () const { return ! m_doc_string.empty (); }
516 
517  void accept (tree_walker& tw)
518  {
519  tw.visit_classdef_enum (*this);
520  }
521 
522 private:
523 
524  tree_identifier *m_id;
525  tree_expression *m_expr;
526  comment_list *m_comments;
527  std::string m_doc_string;
528 };
529 
530 class tree_classdef_enum_list : public base_list<tree_classdef_enum *>
531 {
532 public:
533 
535 
537 
540  { }
541 
542  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_enum_list)
543 
545 
546  void accept (tree_walker& tw)
547  {
548  tw.visit_classdef_enum_list (*this);
549  }
550 };
551 
553  : public tree_classdef_element<tree_classdef_enum_list>
554 {
555 public:
556 
559  comment_list *lc, comment_list *tc,
560  int l = -1, int c = -1)
561  : tree_classdef_element<tree_classdef_enum_list> (a, elist, lc, tc, l, c)
562  { }
563 
564  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef_enum_block)
565 
567 
568  void accept (tree_walker& tw)
569  {
570  tw.visit_classdef_enum_block (*this);
571  }
572 };
573 
575 {
576 public:
577 
578  typedef std::list<tree_classdef_properties_block *>::iterator
580  typedef std::list<tree_classdef_properties_block *>::const_iterator
582 
583  typedef std::list<tree_classdef_methods_block *>::iterator
585  typedef std::list<tree_classdef_methods_block *>::const_iterator
587 
588  typedef std::list<tree_classdef_events_block *>::iterator events_list_iterator;
589  typedef std::list<tree_classdef_events_block *>::const_iterator
591 
592  typedef std::list<tree_classdef_enum_block *>::iterator enum_list_iterator;
593  typedef std::list<tree_classdef_enum_block *>::const_iterator
595 
597 
599 
601 
603 
605 
606  OCTAVE_DISABLE_COPY_MOVE (tree_classdef_body)
607 
609 
611  {
612  m_properties_lst.push_back (pb);
613  }
614 
616  {
617  m_methods_lst.push_back (mb);
618  }
619 
621  {
622  m_events_lst.push_back (evb);
623  }
624 
626  {
627  m_enum_lst.push_back (enb);
628  }
629 
630  std::list<tree_classdef_properties_block *> properties_list ()
631  {
632  return m_properties_lst;
633  }
634 
635  std::list<tree_classdef_methods_block *> methods_list ()
636  {
637  return m_methods_lst;
638  }
639 
640  std::list<tree_classdef_events_block *> events_list ()
641  {
642  return m_events_lst;
643  }
644 
645  std::list<tree_classdef_enum_block *> enum_list ()
646  {
647  return m_enum_lst;
648  }
649 
650  void doc_string (const std::string& txt) { m_doc_string = txt; }
651 
652  std::string doc_string () const { return m_doc_string; }
653 
654  bool have_doc_string () const { return ! m_doc_string.empty (); }
655 
656  void accept (tree_walker& tw)
657  {
658  tw.visit_classdef_body (*this);
659  }
660 
661 private:
662 
663  std::string get_doc_string (comment_list *comment) const;
664 
665  std::list<tree_classdef_properties_block *> m_properties_lst;
666 
667  std::list<tree_classdef_methods_block *> m_methods_lst;
668 
669  std::list<tree_classdef_events_block *> m_events_lst;
670 
671  std::list<tree_classdef_enum_block *> m_enum_lst;
672 
673  std::string m_doc_string;
674 };
675 
676 // Classdef definition.
677 
679 {
680 public:
681 
682  tree_classdef (const symbol_scope& scope, const std::string& help_text,
686  comment_list *tc, const std::string& pn = "",
687  const std::string& fn = "", int l = -1, int c = -1)
688  : tree_command (l, c), m_scope (scope), m_help_text (help_text),
689  m_attr_list (a), m_id (i),
690  m_supclass_list (sc), m_element_list (b), m_lead_comm (lc),
691  m_trail_comm (tc), m_pack_name (pn), m_file_name (fn)
692  { }
693 
694  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (tree_classdef)
695 
697  {
698  delete m_attr_list;
699  delete m_id;
700  delete m_supclass_list;
701  delete m_element_list;
702  delete m_lead_comm;
703  delete m_trail_comm;
704  }
705 
706  symbol_scope scope () { return m_scope; }
707 
709  attribute_list () { return m_attr_list; }
710 
711  tree_identifier * ident () { return m_id; }
712 
714  superclass_list () { return m_supclass_list; }
715 
716  tree_classdef_body * body () { return m_element_list; }
717 
718  comment_list * leading_comment () { return m_lead_comm; }
719  comment_list * trailing_comment () { return m_trail_comm; }
720 
721  std::string package_name () const { return m_pack_name; }
722 
723  std::string file_name () const { return m_file_name; }
724 
726  bool is_at_folder = false);
727 
728  std::string doc_string () const
729  {
730  return m_help_text;
731  }
732 
733  void accept (tree_walker& tw)
734  {
735  tw.visit_classdef (*this);
736  }
737 
738 private:
739 
740  // The scope that was used when parsing the classdef object and that
741  // corresponds to any identifiers that were found in attribute lists
742  // (for example). Used again when computing the meta class object.
743 
744  symbol_scope m_scope;
745 
746  std::string m_help_text;
747 
748  tree_classdef_attribute_list *m_attr_list;
749 
750  tree_identifier *m_id;
751 
752  tree_classdef_superclass_list *m_supclass_list;
753 
754  tree_classdef_body *m_element_list;
755 
756  comment_list *m_lead_comm;
757  comment_list *m_trail_comm;
758 
759  std::string m_pack_name;
760  std::string m_file_name;
761 };
762 
763 OCTAVE_END_NAMESPACE(octave)
764 
765 #endif
void append(const tree_classdef_attribute * &s)
Definition: base-list.h:92
octave_idx_type length() const
Definition: ovl.h:113
tree_classdef_attribute_list(tree_classdef_attribute *a)
Definition: pt-classdef.h:174
tree_classdef_attribute_list(const base_list< tree_classdef_attribute * > &a)
Definition: pt-classdef.h:176
void accept(tree_walker &tw)
Definition: pt-classdef.h:184
void accept(tree_walker &tw)
Definition: pt-classdef.h:156
tree_identifier * ident()
Definition: pt-classdef.h:150
tree_classdef_attribute(tree_identifier *i, bool b)
Definition: pt-classdef.h:138
tree_expression * expression()
Definition: pt-classdef.h:152
tree_classdef_attribute(tree_identifier *i=nullptr, tree_expression *e=nullptr)
Definition: pt-classdef.h:133
std::list< tree_classdef_properties_block * > properties_list()
Definition: pt-classdef.h:630
std::list< tree_classdef_properties_block * >::iterator properties_list_iterator
Definition: pt-classdef.h:579
std::list< tree_classdef_methods_block * > methods_list()
Definition: pt-classdef.h:635
std::string doc_string() const
Definition: pt-classdef.h:652
std::list< tree_classdef_events_block * >::const_iterator events_list_const_iterator
Definition: pt-classdef.h:590
void append(tree_classdef_enum_block *enb)
Definition: pt-classdef.h:625
std::list< tree_classdef_events_block * >::iterator events_list_iterator
Definition: pt-classdef.h:588
std::list< tree_classdef_properties_block * >::const_iterator properties_list_const_iterator
Definition: pt-classdef.h:581
void append(tree_classdef_methods_block *mb)
Definition: pt-classdef.h:615
std::list< tree_classdef_enum_block * >::iterator enum_list_iterator
Definition: pt-classdef.h:592
void accept(tree_walker &tw)
Definition: pt-classdef.h:656
std::list< tree_classdef_enum_block * >::const_iterator enum_list_const_iterator
Definition: pt-classdef.h:594
bool have_doc_string() const
Definition: pt-classdef.h:654
std::list< tree_classdef_events_block * > events_list()
Definition: pt-classdef.h:640
std::list< tree_classdef_methods_block * >::iterator methods_list_iterator
Definition: pt-classdef.h:584
std::list< tree_classdef_enum_block * > enum_list()
Definition: pt-classdef.h:645
void doc_string(const std::string &txt)
Definition: pt-classdef.h:650
void append(tree_classdef_events_block *evb)
Definition: pt-classdef.h:620
void append(tree_classdef_properties_block *pb)
Definition: pt-classdef.h:610
std::list< tree_classdef_methods_block * >::const_iterator methods_list_const_iterator
Definition: pt-classdef.h:586
comment_list * leading_comment()
Definition: pt-classdef.h:266
tree_classdef_element(tree_classdef_attribute_list *a, T *elt_list, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
Definition: pt-classdef.h:245
comment_list * trailing_comment()
Definition: pt-classdef.h:268
void accept(tree_walker &)
Definition: pt-classdef.h:270
tree_classdef_attribute_list * attribute_list()
Definition: pt-classdef.h:262
void accept(tree_walker &tw)
Definition: pt-classdef.h:568
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:557
~tree_classdef_enum_block()=default
void accept(tree_walker &tw)
Definition: pt-classdef.h:546
tree_classdef_enum_list(const base_list< tree_classdef_enum * > &a)
Definition: pt-classdef.h:538
tree_classdef_enum_list(tree_classdef_enum *e)
Definition: pt-classdef.h:536
comment_list * comments() const
Definition: pt-classdef.h:509
tree_expression * expression()
Definition: pt-classdef.h:507
std::string doc_string() const
Definition: pt-classdef.h:513
void doc_string(const std::string &txt)
Definition: pt-classdef.h:511
tree_classdef_enum(tree_identifier *i, tree_expression *e, comment_list *comments)
Definition: pt-classdef.cc:209
bool have_doc_string() const
Definition: pt-classdef.h:515
tree_identifier * ident()
Definition: pt-classdef.h:505
void accept(tree_walker &tw)
Definition: pt-classdef.h:517
bool have_doc_string() const
Definition: pt-classdef.h:431
void accept(tree_walker &tw)
Definition: pt-classdef.h:433
void doc_string(const std::string &txt)
Definition: pt-classdef.h:427
tree_identifier * ident()
Definition: pt-classdef.h:423
std::string doc_string() const
Definition: pt-classdef.h:429
tree_classdef_event(tree_identifier *i=nullptr, comment_list *comments=nullptr)
Definition: pt-classdef.cc:187
comment_list * comments() const
Definition: pt-classdef.h:425
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:472
void accept(tree_walker &tw)
Definition: pt-classdef.h:483
~tree_classdef_events_block()=default
tree_classdef_events_list(const base_list< tree_classdef_event * > &a)
Definition: pt-classdef.h:453
void accept(tree_walker &tw)
Definition: pt-classdef.h:461
tree_classdef_events_list(tree_classdef_event *e)
Definition: pt-classdef.h:451
void accept(tree_walker &tw)
Definition: pt-classdef.h:402
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:391
~tree_classdef_methods_block()=default
tree_classdef_methods_list(const octave_value &f)
Definition: pt-classdef.h:371
tree_classdef_methods_list(const base_list< octave_value > &a)
Definition: pt-classdef.h:373
~tree_classdef_methods_list()=default
void accept(tree_walker &tw)
Definition: pt-classdef.h:380
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:348
void accept(tree_walker &tw)
Definition: pt-classdef.h:359
tree_classdef_property_list(const base_list< tree_classdef_property * > &a)
Definition: pt-classdef.h:330
void accept(tree_walker &tw)
Definition: pt-classdef.h:337
tree_classdef_property_list(tree_classdef_property *p)
Definition: pt-classdef.h:328
comment_list * comments() const
Definition: pt-classdef.h:302
std::string doc_string() const
Definition: pt-classdef.h:306
void accept(tree_walker &tw)
Definition: pt-classdef.h:310
tree_classdef_property(tree_arg_validation *av, comment_list *comments=nullptr)
Definition: pt-classdef.cc:141
tree_expression * expression()
Definition: pt-classdef.cc:162
tree_identifier * ident()
Definition: pt-classdef.cc:154
void doc_string(const std::string &txt)
Definition: pt-classdef.h:304
bool have_doc_string() const
Definition: pt-classdef.h:308
void accept(tree_walker &tw)
Definition: pt-classdef.h:234
tree_classdef_superclass_list(tree_classdef_superclass *sc)
Definition: pt-classdef.h:221
tree_classdef_superclass_list(const base_list< tree_classdef_superclass * > &a)
Definition: pt-classdef.h:226
std::string class_name()
Definition: pt-classdef.h:202
void accept(tree_walker &tw)
Definition: pt-classdef.h:204
~tree_classdef_superclass()=default
tree_classdef_superclass(const std::string &cname)
Definition: pt-classdef.h:194
comment_list * trailing_comment()
Definition: pt-classdef.h:719
tree_identifier * ident()
Definition: pt-classdef.h:711
octave_value make_meta_class(interpreter &interp, bool is_at_folder=false)
Definition: pt-classdef.cc:314
tree_classdef(const symbol_scope &scope, const std::string &help_text, 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="", const std::string &fn="", int l=-1, int c=-1)
Definition: pt-classdef.h:682
std::string package_name() const
Definition: pt-classdef.h:721
tree_classdef_body * body()
Definition: pt-classdef.h:716
void accept(tree_walker &tw)
Definition: pt-classdef.h:733
comment_list * leading_comment()
Definition: pt-classdef.h:718
tree_classdef_superclass_list * superclass_list()
Definition: pt-classdef.h:714
tree_classdef_attribute_list * attribute_list()
Definition: pt-classdef.h:709
symbol_scope scope()
Definition: pt-classdef.h:706
std::string doc_string() const
Definition: pt-classdef.h:728
std::string file_name() const
Definition: pt-classdef.h:723
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:100
std::string class_name() const
Definition: pt-classdef.h:108
void accept(tree_walker &tw)
Definition: pt-classdef.h:119
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition: pt-classdef.cc:89
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.h:114
~tree_metaclass_query()=default
tree_superclass_ref(const std::string &meth, const std::string &cls, int l=-1, int c=-1)
Definition: pt-classdef.h:53
void accept(tree_walker &tw)
Definition: pt-classdef.h:80
std::string method_name() const
Definition: pt-classdef.h:62
octave_value evaluate(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.h:71
~tree_superclass_ref()=default
std::string class_name() const
Definition: pt-classdef.h:67
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
Definition: pt-classdef.cc:53
tree_superclass_ref * dup(symbol_scope &scope) const
Definition: pt-classdef.cc:41
virtual void visit_classdef_attribute(tree_classdef_attribute &)
Definition: pt-walk.cc:666
virtual void visit_classdef_methods_list(tree_classdef_methods_list &)
Definition: pt-walk.cc:732
virtual void visit_classdef_methods_block(tree_classdef_methods_block &)
Definition: pt-walk.cc:744
virtual void visit_classdef_enum_block(tree_classdef_enum_block &)
Definition: pt-walk.cc:794
virtual void visit_classdef(tree_classdef &)
Definition: pt-walk.cc:832
virtual void visit_classdef_superclass(tree_classdef_superclass &)
Definition: pt-walk.cc:690
virtual void visit_classdef_property(tree_classdef_property &)
Definition: pt-walk.cc:706
virtual void visit_classdef_events_block(tree_classdef_events_block &)
Definition: pt-walk.cc:769
virtual void visit_classdef_property_list(tree_classdef_property_list &)
Definition: pt-walk.cc:713
virtual void visit_classdef_body(tree_classdef_body &)
Definition: pt-walk.cc:803
virtual void visit_classdef_enum(tree_classdef_enum &)
Definition: pt-walk.cc:778
virtual void visit_classdef_enum_list(tree_classdef_enum_list &)
Definition: pt-walk.cc:784
virtual void visit_classdef_properties_block(tree_classdef_properties_block &)
Definition: pt-walk.cc:723
virtual void visit_classdef_superclass_list(tree_classdef_superclass_list &)
Definition: pt-walk.cc:696
virtual void visit_classdef_attribute_list(tree_classdef_attribute_list &)
Definition: pt-walk.cc:680
virtual void visit_classdef_event(tree_classdef_event &)
Definition: pt-walk.cc:753
virtual void visit_classdef_events_list(tree_classdef_events_list &)
Definition: pt-walk.cc:759
virtual void visit_superclass_ref(tree_superclass_ref &)
Definition: pt-walk.cc:654
virtual void visit_metaclass_query(tree_metaclass_query &)
Definition: pt-walk.cc:660
Definition: pt.h:45
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE const F77_DBLE * f
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
Definition: ovl.h:219