26 #if ! defined (octave_tree_classdef_h)
27 #define octave_tree_classdef_h 1
29 #include "octave-config.h"
54 int l = -1,
int c = -1)
89 std::string m_method_name;
93 std::string m_class_name;
126 std::string m_class_name;
135 : m_id (i), m_expr (e), m_neg (false)
139 : m_id (i), m_expr (nullptr), m_neg (b)
211 std::string m_cls_name;
215 :
public base_list<tree_classdef_superclass *>
240 template <
typename T>
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)
304 void doc_string (
const std::string& txt) { m_doc_string = txt; }
319 std::string m_doc_string;
351 int l = -1,
int c = -1)
394 int l = -1,
int c = -1)
427 void doc_string (
const std::string& txt) { m_doc_string = txt; }
442 std::string m_doc_string;
475 int l = -1,
int c = -1)
511 void doc_string (
const std::string& txt) { m_doc_string = txt; }
527 std::string m_doc_string;
560 int l = -1,
int c = -1)
578 typedef std::list<tree_classdef_properties_block *>::iterator
580 typedef std::list<tree_classdef_properties_block *>::const_iterator
583 typedef std::list<tree_classdef_methods_block *>::iterator
585 typedef std::list<tree_classdef_methods_block *>::const_iterator
589 typedef std::list<tree_classdef_events_block *>::const_iterator
593 typedef std::list<tree_classdef_enum_block *>::const_iterator
612 m_properties_lst.push_back (pb);
617 m_methods_lst.push_back (mb);
622 m_events_lst.push_back (evb);
627 m_enum_lst.push_back (enb);
632 return m_properties_lst;
637 return m_methods_lst;
650 void doc_string (
const std::string& txt) { m_doc_string = txt; }
663 std::string get_doc_string (
comment_list *comment)
const;
665 std::list<tree_classdef_properties_block *> m_properties_lst;
667 std::list<tree_classdef_methods_block *> m_methods_lst;
669 std::list<tree_classdef_events_block *> m_events_lst;
671 std::list<tree_classdef_enum_block *> m_enum_lst;
673 std::string m_doc_string;
687 const std::string& fn =
"",
int l = -1,
int c = -1)
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)
700 delete m_supclass_list;
701 delete m_element_list;
726 bool is_at_folder =
false);
746 std::string m_help_text;
759 std::string m_pack_name;
760 std::string m_file_name;
763 OCTAVE_END_NAMESPACE(
octave)
void append(const tree_classdef_attribute * &s)
octave_idx_type length() const
tree_classdef_attribute_list()
~tree_classdef_attribute_list()
tree_classdef_attribute_list(tree_classdef_attribute *a)
tree_classdef_attribute_list(const base_list< tree_classdef_attribute * > &a)
void accept(tree_walker &tw)
void accept(tree_walker &tw)
tree_identifier * ident()
tree_classdef_attribute(tree_identifier *i, bool b)
tree_expression * expression()
~tree_classdef_attribute()
tree_classdef_attribute(tree_identifier *i=nullptr, tree_expression *e=nullptr)
std::list< tree_classdef_properties_block * > properties_list()
std::list< tree_classdef_properties_block * >::iterator properties_list_iterator
std::list< tree_classdef_methods_block * > methods_list()
std::string doc_string() const
std::list< tree_classdef_events_block * >::const_iterator events_list_const_iterator
void append(tree_classdef_enum_block *enb)
std::list< tree_classdef_events_block * >::iterator events_list_iterator
std::list< tree_classdef_properties_block * >::const_iterator properties_list_const_iterator
void append(tree_classdef_methods_block *mb)
std::list< tree_classdef_enum_block * >::iterator enum_list_iterator
void accept(tree_walker &tw)
std::list< tree_classdef_enum_block * >::const_iterator enum_list_const_iterator
bool have_doc_string() const
std::list< tree_classdef_events_block * > events_list()
std::list< tree_classdef_methods_block * >::iterator methods_list_iterator
std::list< tree_classdef_enum_block * > enum_list()
void doc_string(const std::string &txt)
void append(tree_classdef_events_block *evb)
void append(tree_classdef_properties_block *pb)
std::list< tree_classdef_methods_block * >::const_iterator methods_list_const_iterator
comment_list * leading_comment()
tree_classdef_element(tree_classdef_attribute_list *a, T *elt_list, comment_list *lc, comment_list *tc, int l=-1, int c=-1)
comment_list * trailing_comment()
void accept(tree_walker &)
tree_classdef_attribute_list * attribute_list()
void accept(tree_walker &tw)
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)
~tree_classdef_enum_block()=default
void accept(tree_walker &tw)
~tree_classdef_enum_list()
tree_classdef_enum_list()
tree_classdef_enum_list(const base_list< tree_classdef_enum * > &a)
tree_classdef_enum_list(tree_classdef_enum *e)
comment_list * comments() const
tree_expression * expression()
std::string doc_string() const
void doc_string(const std::string &txt)
tree_classdef_enum(tree_identifier *i, tree_expression *e, comment_list *comments)
bool have_doc_string() const
tree_identifier * ident()
void accept(tree_walker &tw)
bool have_doc_string() const
void accept(tree_walker &tw)
void doc_string(const std::string &txt)
tree_identifier * ident()
std::string doc_string() const
tree_classdef_event(tree_identifier *i=nullptr, comment_list *comments=nullptr)
comment_list * comments() const
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)
void accept(tree_walker &tw)
~tree_classdef_events_block()=default
tree_classdef_events_list(const base_list< tree_classdef_event * > &a)
tree_classdef_events_list()
~tree_classdef_events_list()
void accept(tree_walker &tw)
tree_classdef_events_list(tree_classdef_event *e)
void accept(tree_walker &tw)
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)
~tree_classdef_methods_block()=default
tree_classdef_methods_list()
tree_classdef_methods_list(const octave_value &f)
tree_classdef_methods_list(const base_list< octave_value > &a)
~tree_classdef_methods_list()=default
void accept(tree_walker &tw)
~tree_classdef_properties_block()=default
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)
void accept(tree_walker &tw)
tree_classdef_property_list(const base_list< tree_classdef_property * > &a)
tree_classdef_property_list()
void accept(tree_walker &tw)
~tree_classdef_property_list()
tree_classdef_property_list(tree_classdef_property *p)
~tree_classdef_property()
comment_list * comments() const
std::string doc_string() const
void accept(tree_walker &tw)
tree_classdef_property(tree_arg_validation *av, comment_list *comments=nullptr)
tree_expression * expression()
tree_identifier * ident()
void doc_string(const std::string &txt)
bool have_doc_string() const
void accept(tree_walker &tw)
tree_classdef_superclass_list(tree_classdef_superclass *sc)
tree_classdef_superclass_list()
tree_classdef_superclass_list(const base_list< tree_classdef_superclass * > &a)
~tree_classdef_superclass_list()
void accept(tree_walker &tw)
~tree_classdef_superclass()=default
tree_classdef_superclass(const std::string &cname)
comment_list * trailing_comment()
tree_identifier * ident()
octave_value make_meta_class(interpreter &interp, bool is_at_folder=false)
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)
std::string package_name() const
tree_classdef_body * body()
void accept(tree_walker &tw)
comment_list * leading_comment()
tree_classdef_superclass_list * superclass_list()
tree_classdef_attribute_list * attribute_list()
std::string doc_string() const
std::string file_name() const
tree_superclass_ref(const std::string &meth, const std::string &cls, int l=-1, int c=-1)
void accept(tree_walker &tw)
std::string method_name() const
octave_value evaluate(tree_evaluator &tw, int nargout=1)
~tree_superclass_ref()=default
std::string class_name() const
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
tree_superclass_ref * dup(symbol_scope &scope) const
virtual void visit_classdef_attribute(tree_classdef_attribute &)
virtual void visit_classdef_methods_list(tree_classdef_methods_list &)
virtual void visit_classdef_methods_block(tree_classdef_methods_block &)
virtual void visit_classdef_enum_block(tree_classdef_enum_block &)
virtual void visit_classdef(tree_classdef &)
virtual void visit_classdef_superclass(tree_classdef_superclass &)
virtual void visit_classdef_property(tree_classdef_property &)
virtual void visit_classdef_events_block(tree_classdef_events_block &)
virtual void visit_classdef_property_list(tree_classdef_property_list &)
virtual void visit_classdef_body(tree_classdef_body &)
virtual void visit_classdef_enum(tree_classdef_enum &)
virtual void visit_classdef_enum_list(tree_classdef_enum_list &)
virtual void visit_classdef_properties_block(tree_classdef_properties_block &)
virtual void visit_classdef_superclass_list(tree_classdef_superclass_list &)
virtual void visit_classdef_attribute_list(tree_classdef_attribute_list &)
virtual void visit_classdef_event(tree_classdef_event &)
virtual void visit_classdef_events_list(tree_classdef_events_list &)
virtual void visit_superclass_ref(tree_superclass_ref &)
virtual void visit_metaclass_query(tree_metaclass_query &)
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.