User Guide
ast.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 Blue Brain Project, EPFL.
3  * See the top-level LICENSE file for details.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 ///
9 /// THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
10 ///
11 
12 #include "ast/all.hpp"
13 #include "symtab/symbol_table.hpp"
14 
15 /**
16  * \file
17  * \brief Auto generated AST classes implementations
18  */
19 
20 namespace nmodl::ast {
21 
22 ///
23 /// Ast member function definition
24 ///
25 
26 Ast *Ast::clone() const { throw std::logic_error("clone not implemented"); }
27 
28 std::string Ast::get_node_name() const {
29  throw std::logic_error("get_node_name() not implemented");
30 }
31 
32 std::shared_ptr<StatementBlock> Ast::get_statement_block() const {
33  throw std::runtime_error("get_statement_block not implemented");
34 }
35 
36 const ModToken *Ast::get_token() const { return nullptr; }
37 
39  throw std::runtime_error("get_symbol_table not implemented");
40 }
41 
43  throw std::runtime_error("set_symbol_table not implemented");
44 }
45 
46 void Ast::set_name(const std::string & /*name*/) {
47  throw std::runtime_error("set_name not implemented");
48 }
49 
50 void Ast::negate() { throw std::runtime_error("negate not implemented"); }
51 
52 std::shared_ptr<Ast> Ast::get_shared_ptr() {
53  return std::static_pointer_cast<Ast>(shared_from_this());
54 }
55 
56 std::shared_ptr<const Ast> Ast::get_shared_ptr() const {
57  return std::static_pointer_cast<const Ast>(shared_from_this());
58 }
59 
60 bool Ast::is_ast() const noexcept { return true; }
61 
62 bool Ast::is_node () const noexcept { return false; }
63 
64 bool Ast::is_statement () const noexcept { return false; }
65 
66 bool Ast::is_expression () const noexcept { return false; }
67 
68 bool Ast::is_block () const noexcept { return false; }
69 
70 bool Ast::is_identifier () const noexcept { return false; }
71 
72 bool Ast::is_number () const noexcept { return false; }
73 
74 bool Ast::is_string () const noexcept { return false; }
75 
76 bool Ast::is_integer () const noexcept { return false; }
77 
78 bool Ast::is_float () const noexcept { return false; }
79 
80 bool Ast::is_double () const noexcept { return false; }
81 
82 bool Ast::is_boolean () const noexcept { return false; }
83 
84 bool Ast::is_name () const noexcept { return false; }
85 
86 bool Ast::is_prime_name () const noexcept { return false; }
87 
88 bool Ast::is_indexed_name () const noexcept { return false; }
89 
90 bool Ast::is_var_name () const noexcept { return false; }
91 
92 bool Ast::is_argument () const noexcept { return false; }
93 
94 bool Ast::is_react_var_name () const noexcept { return false; }
95 
96 bool Ast::is_read_ion_var () const noexcept { return false; }
97 
98 bool Ast::is_write_ion_var () const noexcept { return false; }
99 
100 bool Ast::is_nonspecific_cur_var () const noexcept { return false; }
101 
102 bool Ast::is_electrode_cur_var () const noexcept { return false; }
103 
104 bool Ast::is_range_var () const noexcept { return false; }
105 
106 bool Ast::is_global_var () const noexcept { return false; }
107 
108 bool Ast::is_pointer_var () const noexcept { return false; }
109 
110 bool Ast::is_random_var () const noexcept { return false; }
111 
112 bool Ast::is_bbcore_pointer_var () const noexcept { return false; }
113 
114 bool Ast::is_extern_var () const noexcept { return false; }
115 
116 bool Ast::is_param_block () const noexcept { return false; }
117 
118 bool Ast::is_independent_block () const noexcept { return false; }
119 
120 bool Ast::is_assigned_block () const noexcept { return false; }
121 
122 bool Ast::is_state_block () const noexcept { return false; }
123 
124 bool Ast::is_initial_block () const noexcept { return false; }
125 
126 bool Ast::is_constructor_block () const noexcept { return false; }
127 
128 bool Ast::is_destructor_block () const noexcept { return false; }
129 
130 bool Ast::is_statement_block () const noexcept { return false; }
131 
132 bool Ast::is_derivative_block () const noexcept { return false; }
133 
134 bool Ast::is_linear_block () const noexcept { return false; }
135 
136 bool Ast::is_non_linear_block () const noexcept { return false; }
137 
138 bool Ast::is_discrete_block () const noexcept { return false; }
139 
140 bool Ast::is_function_table_block () const noexcept { return false; }
141 
142 bool Ast::is_function_block () const noexcept { return false; }
143 
144 bool Ast::is_procedure_block () const noexcept { return false; }
145 
146 bool Ast::is_net_receive_block () const noexcept { return false; }
147 
148 bool Ast::is_solve_block () const noexcept { return false; }
149 
150 bool Ast::is_breakpoint_block () const noexcept { return false; }
151 
152 bool Ast::is_before_block () const noexcept { return false; }
153 
154 bool Ast::is_after_block () const noexcept { return false; }
155 
156 bool Ast::is_ba_block () const noexcept { return false; }
157 
158 bool Ast::is_for_netcon () const noexcept { return false; }
159 
160 bool Ast::is_kinetic_block () const noexcept { return false; }
161 
162 bool Ast::is_unit_block () const noexcept { return false; }
163 
164 bool Ast::is_constant_block () const noexcept { return false; }
165 
166 bool Ast::is_neuron_block () const noexcept { return false; }
167 
168 bool Ast::is_unit () const noexcept { return false; }
169 
170 bool Ast::is_double_unit () const noexcept { return false; }
171 
172 bool Ast::is_local_var () const noexcept { return false; }
173 
174 bool Ast::is_limits () const noexcept { return false; }
175 
176 bool Ast::is_number_range () const noexcept { return false; }
177 
178 bool Ast::is_constant_var () const noexcept { return false; }
179 
180 bool Ast::is_binary_operator () const noexcept { return false; }
181 
182 bool Ast::is_unary_operator () const noexcept { return false; }
183 
184 bool Ast::is_reaction_operator () const noexcept { return false; }
185 
186 bool Ast::is_paren_expression () const noexcept { return false; }
187 
188 bool Ast::is_binary_expression () const noexcept { return false; }
189 
190 bool Ast::is_diff_eq_expression () const noexcept { return false; }
191 
192 bool Ast::is_unary_expression () const noexcept { return false; }
193 
194 bool Ast::is_non_lin_equation () const noexcept { return false; }
195 
196 bool Ast::is_lin_equation () const noexcept { return false; }
197 
198 bool Ast::is_function_call () const noexcept { return false; }
199 
200 bool Ast::is_watch () const noexcept { return false; }
201 
202 bool Ast::is_ba_block_type () const noexcept { return false; }
203 
204 bool Ast::is_unit_def () const noexcept { return false; }
205 
206 bool Ast::is_factor_def () const noexcept { return false; }
207 
208 bool Ast::is_valence () const noexcept { return false; }
209 
210 bool Ast::is_unit_state () const noexcept { return false; }
211 
212 bool Ast::is_local_list_statement () const noexcept { return false; }
213 
214 bool Ast::is_model () const noexcept { return false; }
215 
216 bool Ast::is_define () const noexcept { return false; }
217 
218 bool Ast::is_include () const noexcept { return false; }
219 
220 bool Ast::is_param_assign () const noexcept { return false; }
221 
222 bool Ast::is_assigned_definition () const noexcept { return false; }
223 
224 bool Ast::is_conductance_hint () const noexcept { return false; }
225 
226 bool Ast::is_expression_statement () const noexcept { return false; }
227 
228 bool Ast::is_protect_statement () const noexcept { return false; }
229 
230 bool Ast::is_from_statement () const noexcept { return false; }
231 
232 bool Ast::is_while_statement () const noexcept { return false; }
233 
234 bool Ast::is_if_statement () const noexcept { return false; }
235 
236 bool Ast::is_else_if_statement () const noexcept { return false; }
237 
238 bool Ast::is_else_statement () const noexcept { return false; }
239 
240 bool Ast::is_watch_statement () const noexcept { return false; }
241 
242 bool Ast::is_mutex_lock () const noexcept { return false; }
243 
244 bool Ast::is_mutex_unlock () const noexcept { return false; }
245 
246 bool Ast::is_conserve () const noexcept { return false; }
247 
248 bool Ast::is_compartment () const noexcept { return false; }
249 
250 bool Ast::is_lon_diffuse () const noexcept { return false; }
251 
252 bool Ast::is_reaction_statement () const noexcept { return false; }
253 
254 bool Ast::is_lag_statement () const noexcept { return false; }
255 
256 bool Ast::is_constant_statement () const noexcept { return false; }
257 
258 bool Ast::is_table_statement () const noexcept { return false; }
259 
260 bool Ast::is_suffix () const noexcept { return false; }
261 
262 bool Ast::is_useion () const noexcept { return false; }
263 
264 bool Ast::is_nonspecific () const noexcept { return false; }
265 
266 bool Ast::is_electrode_current () const noexcept { return false; }
267 
268 bool Ast::is_range () const noexcept { return false; }
269 
270 bool Ast::is_global () const noexcept { return false; }
271 
272 bool Ast::is_random_var_list () const noexcept { return false; }
273 
274 bool Ast::is_pointer () const noexcept { return false; }
275 
276 bool Ast::is_bbcore_pointer () const noexcept { return false; }
277 
278 bool Ast::is_external () const noexcept { return false; }
279 
280 bool Ast::is_thread_safe () const noexcept { return false; }
281 
282 bool Ast::is_verbatim () const noexcept { return false; }
283 
284 bool Ast::is_line_comment () const noexcept { return false; }
285 
286 bool Ast::is_block_comment () const noexcept { return false; }
287 
288 bool Ast::is_ontology_statement () const noexcept { return false; }
289 
290 bool Ast::is_program () const noexcept { return false; }
291 
292 bool Ast::is_nrn_state_block () const noexcept { return false; }
293 
294 bool Ast::is_eigen_newton_solver_block () const noexcept { return false; }
295 
296 bool Ast::is_eigen_linear_solver_block () const noexcept { return false; }
297 
298 bool Ast::is_cvode_block () const noexcept { return false; }
299 
300 bool Ast::is_longitudinal_diffusion_block () const noexcept { return false; }
301 
302 bool Ast::is_wrapped_expression () const noexcept { return false; }
303 
304 bool Ast::is_derivimplicit_callback () const noexcept { return false; }
305 
306 bool Ast::is_solution_expression () const noexcept { return false; }
307 
308 bool Ast::is_update_dt () const noexcept { return false; }
309 
310 
312  return parent;
313 }
314 
316  parent = p;
317 }
318 
319 
320 
321  ///
322  /// Node member functions definition
323  ///
324 
325 
327  }
328 
330  }
331 
333  v.visit_node(*this);
334  }
335 
337  v.visit_node(*this);
338  }
339 
340 
341 
342 
343  ///
344  /// Statement member functions definition
345  ///
346 
347 
349  }
350 
352  }
353 
355  v.visit_statement(*this);
356  }
357 
359  v.visit_statement(*this);
360  }
361 
362 
363 
364 
365  ///
366  /// Expression member functions definition
367  ///
368 
369 
371  }
372 
374  }
375 
377  v.visit_expression(*this);
378  }
379 
381  v.visit_expression(*this);
382  }
383 
384 
385 
386 
387  ///
388  /// Block member functions definition
389  ///
390 
391 
393  }
394 
396  }
397 
399  v.visit_block(*this);
400  }
401 
403  v.visit_block(*this);
404  }
405 
406 
407 
408 
409  ///
410  /// Identifier member functions definition
411  ///
412 
413 
415  }
416 
418  }
419 
421  v.visit_identifier(*this);
422  }
423 
425  v.visit_identifier(*this);
426  }
427 
428 
429 
430 
431  ///
432  /// Number member functions definition
433  ///
434 
435 
437  }
438 
440  }
441 
443  v.visit_number(*this);
444  }
445 
447  v.visit_number(*this);
448  }
449 
450 
451 
452 
453  ///
454  /// String member functions definition
455  ///
456 
457 
458 
459 
460 
462  }
463 
465  }
466 
468  v.visit_string(*this);
469  }
470 
472  v.visit_string(*this);
473  }
474 
475 
476  String::String(const std::string& value)
477  : value(value) { set_parent_in_children(); }
478 
479 
480 
481  /// copy constructor implementation
482  String::String(const String& obj) {
483  /// object member can be just copied by value
484  this->value = obj.value;
485 
486  /// if there is a token, make copy
487  if (obj.token) {
488  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
489  }
490 
491  /// set parents
493  }
494 
495 
496  /// set this parent in the children
498 
499 
500  }
501 
502 
503 
504  void String::set_value(std::string value) {
505  // why don't we use a coding convention instead of this workaround for
506  // variable shadowing?
507  this->value = value;
508  }
509 
510 
511 
512  ///
513  /// Integer member functions definition
514  ///
515 
516 
517 
518 
519 
520 
521 
522 
524  /// optional member could be nullptr
525  if (this->macro) {
526  this->macro->accept(v);
527  }
528  (void)v;
529  }
530 
532  /// optional member could be nullptr
533  if (this->macro) {
534  this->macro->accept(v);
535  }
536  (void)v;
537  }
538 
540  v.visit_integer(*this);
541  }
542 
544  v.visit_integer(*this);
545  }
546 
547 
548  Integer::Integer(int value, Name* macro)
549  : value(value), macro(macro) { set_parent_in_children(); }
550 
551 
552  Integer::Integer(int value, std::shared_ptr<Name> macro)
553  : value(value), macro(macro) { set_parent_in_children(); }
554 
555 
556  /// copy constructor implementation
557  Integer::Integer(const Integer& obj) {
558  /// object member can be just copied by value
559  this->value = obj.value;
560  /// pointer member must be reseted with the new copy
561  if (obj.macro) {
562  this->macro.reset(obj.macro->clone());
563  }
564 
565  /// if there is a token, make copy
566  if (obj.token) {
567  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
568  }
569 
570  /// set parents
572  }
573 
574 
575  /// set this parent in the children
577 
578  /// optional member could be nullptr
579  if (macro) {
580  macro->set_parent(this);
581  }
582 
583  }
584 
585 
586 
587  void Integer::set_value(int value) {
588  // why don't we use a coding convention instead of this workaround for
589  // variable shadowing?
590  this->value = value;
591  }
592 
593 
594  void Integer::set_macro(std::shared_ptr<Name>&& macro) {
595  this->macro = macro;
596  // set parents
597  if (macro) {
598  macro->set_parent(this);
599  }
600  }
601 
602  void Integer::set_macro(const std::shared_ptr<Name>& macro) {
603  this->macro = macro;
604  // set parents
605  if (macro) {
606  macro->set_parent(this);
607  }
608  }
609 
610 
611 
612  ///
613  /// Float member functions definition
614  ///
615 
616 
617 
618 
619 
621  }
622 
624  }
625 
627  v.visit_float(*this);
628  }
629 
631  v.visit_float(*this);
632  }
633 
634 
635  Float::Float(const std::string& value)
636  : value(value) { set_parent_in_children(); }
637 
638 
639 
640  /// copy constructor implementation
641  Float::Float(const Float& obj) {
642  /// object member can be just copied by value
643  this->value = obj.value;
644 
645  /// if there is a token, make copy
646  if (obj.token) {
647  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
648  }
649 
650  /// set parents
652  }
653 
654 
655  /// set this parent in the children
657 
658 
659  }
660 
661 
662 
663  void Float::set_value(std::string value) {
664  // why don't we use a coding convention instead of this workaround for
665  // variable shadowing?
666  this->value = value;
667  }
668 
669 
670 
671  ///
672  /// Double member functions definition
673  ///
674 
675 
676 
677 
678 
680  }
681 
683  }
684 
686  v.visit_double(*this);
687  }
688 
690  v.visit_double(*this);
691  }
692 
693 
694  Double::Double(const std::string& value)
695  : value(value) { set_parent_in_children(); }
696 
697 
698 
699  /// copy constructor implementation
700  Double::Double(const Double& obj) {
701  /// object member can be just copied by value
702  this->value = obj.value;
703 
704  /// if there is a token, make copy
705  if (obj.token) {
706  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
707  }
708 
709  /// set parents
711  }
712 
713 
714  /// set this parent in the children
716 
717 
718  }
719 
720 
721 
722  void Double::set_value(std::string value) {
723  // why don't we use a coding convention instead of this workaround for
724  // variable shadowing?
725  this->value = value;
726  }
727 
728 
729 
730  ///
731  /// Boolean member functions definition
732  ///
733 
734 
735 
736 
737 
739  }
740 
742  }
743 
745  v.visit_boolean(*this);
746  }
747 
749  v.visit_boolean(*this);
750  }
751 
752 
753  Boolean::Boolean(int value)
754  : value(value) { set_parent_in_children(); }
755 
756 
757 
758  /// copy constructor implementation
759  Boolean::Boolean(const Boolean& obj) {
760  /// object member can be just copied by value
761  this->value = obj.value;
762 
763  /// if there is a token, make copy
764  if (obj.token) {
765  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
766  }
767 
768  /// set parents
770  }
771 
772 
773  /// set this parent in the children
775 
776 
777  }
778 
779 
780 
781  void Boolean::set_value(int value) {
782  // why don't we use a coding convention instead of this workaround for
783  // variable shadowing?
784  this->value = value;
785  }
786 
787 
788 
789  ///
790  /// Name member functions definition
791  ///
792 
793 
794 
795  std::string Name::get_node_name() const {
796  return value->eval();
797  }
798 
800  /// use -> for pointer member
801  value->accept(v);
802  (void)v;
803  }
804 
806  /// use -> for pointer member
807  value->accept(v);
808  (void)v;
809  }
810 
812  v.visit_name(*this);
813  }
814 
816  v.visit_name(*this);
817  }
818 
819 
821  : value(value) { set_parent_in_children(); }
822 
823 
824  Name::Name(std::shared_ptr<String> value)
825  : value(value) { set_parent_in_children(); }
826 
827 
828  /// copy constructor implementation
829  Name::Name(const Name& obj) {
830  /// pointer member must be reseted with the new copy
831  if (obj.value) {
832  this->value.reset(obj.value->clone());
833  }
834 
835  /// if there is a token, make copy
836  if (obj.token) {
837  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
838  }
839 
840  /// set parents
842  }
843 
844  void Name::set_name(const std::string& name) {
845  value->set(name);
846  }
847 
848  /// set this parent in the children
850 
851  /// optional member could be nullptr
852  if (value) {
853  value->set_parent(this);
854  }
855 
856  }
857 
858 
859 
860  void Name::set_value(std::shared_ptr<String>&& value) {
861  this->value = value;
862  // set parents
863  if (value) {
864  value->set_parent(this);
865  }
866  }
867 
868  void Name::set_value(const std::shared_ptr<String>& value) {
869  this->value = value;
870  // set parents
871  if (value) {
872  value->set_parent(this);
873  }
874  }
875 
876 
877 
878  ///
879  /// PrimeName member functions definition
880  ///
881 
882 
883 
884  std::string PrimeName::get_node_name() const {
885  return value->eval();
886  }
887 
888 
889 
890 
892  /// use -> for pointer member
893  value->accept(v);
894  (void)v;
895  /// use -> for pointer member
896  order->accept(v);
897  (void)v;
898  }
899 
901  /// use -> for pointer member
902  value->accept(v);
903  (void)v;
904  /// use -> for pointer member
905  order->accept(v);
906  (void)v;
907  }
908 
910  v.visit_prime_name(*this);
911  }
912 
914  v.visit_prime_name(*this);
915  }
916 
917 
919  : value(value), order(order) { set_parent_in_children(); }
920 
921 
922  PrimeName::PrimeName(std::shared_ptr<String> value, std::shared_ptr<Integer> order)
923  : value(value), order(order) { set_parent_in_children(); }
924 
925 
926  /// copy constructor implementation
928  /// pointer member must be reseted with the new copy
929  if (obj.value) {
930  this->value.reset(obj.value->clone());
931  }
932  /// pointer member must be reseted with the new copy
933  if (obj.order) {
934  this->order.reset(obj.order->clone());
935  }
936 
937  /// if there is a token, make copy
938  if (obj.token) {
939  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
940  }
941 
942  /// set parents
944  }
945 
946 
947  /// set this parent in the children
949 
950  /// optional member could be nullptr
951  if (value) {
952  value->set_parent(this);
953  }
954  /// optional member could be nullptr
955  if (order) {
956  order->set_parent(this);
957  }
958 
959  }
960 
961 
962 
963  void PrimeName::set_value(std::shared_ptr<String>&& value) {
964  this->value = value;
965  // set parents
966  if (value) {
967  value->set_parent(this);
968  }
969  }
970 
971  void PrimeName::set_value(const std::shared_ptr<String>& value) {
972  this->value = value;
973  // set parents
974  if (value) {
975  value->set_parent(this);
976  }
977  }
978 
979 
980  void PrimeName::set_order(std::shared_ptr<Integer>&& order) {
981  this->order = order;
982  // set parents
983  if (order) {
984  order->set_parent(this);
985  }
986  }
987 
988  void PrimeName::set_order(const std::shared_ptr<Integer>& order) {
989  this->order = order;
990  // set parents
991  if (order) {
992  order->set_parent(this);
993  }
994  }
995 
996 
997 
998  ///
999  /// IndexedName member functions definition
1000  ///
1001 
1002 
1003 
1004  std::string IndexedName::get_node_name() const {
1005  return name->get_node_name();
1006  }
1007 
1008 
1009 
1010 
1012  /// use -> for pointer member
1013  name->accept(v);
1014  (void)v;
1015  /// use -> for pointer member
1016  length->accept(v);
1017  (void)v;
1018  }
1019 
1021  /// use -> for pointer member
1022  name->accept(v);
1023  (void)v;
1024  /// use -> for pointer member
1025  length->accept(v);
1026  (void)v;
1027  }
1028 
1030  v.visit_indexed_name(*this);
1031  }
1032 
1034  v.visit_indexed_name(*this);
1035  }
1036 
1037 
1039  : name(name), length(length) { set_parent_in_children(); }
1040 
1041 
1042  IndexedName::IndexedName(std::shared_ptr<Identifier> name, std::shared_ptr<Expression> length)
1043  : name(name), length(length) { set_parent_in_children(); }
1044 
1045 
1046  /// copy constructor implementation
1048  /// pointer member must be reseted with the new copy
1049  if (obj.name) {
1050  this->name.reset(obj.name->clone());
1051  }
1052  /// pointer member must be reseted with the new copy
1053  if (obj.length) {
1054  this->length.reset(obj.length->clone());
1055  }
1056 
1057  /// if there is a token, make copy
1058  if (obj.token) {
1059  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1060  }
1061 
1062  /// set parents
1064  }
1065 
1066 
1067  /// set this parent in the children
1069 
1070  /// optional member could be nullptr
1071  if (name) {
1072  name->set_parent(this);
1073  }
1074  /// optional member could be nullptr
1075  if (length) {
1076  length->set_parent(this);
1077  }
1078 
1079  }
1080 
1081 
1082 
1083  void IndexedName::set_name(std::shared_ptr<Identifier>&& name) {
1084  this->name = name;
1085  // set parents
1086  if (name) {
1087  name->set_parent(this);
1088  }
1089  }
1090 
1091  void IndexedName::set_name(const std::shared_ptr<Identifier>& name) {
1092  this->name = name;
1093  // set parents
1094  if (name) {
1095  name->set_parent(this);
1096  }
1097  }
1098 
1099 
1100  void IndexedName::set_length(std::shared_ptr<Expression>&& length) {
1101  this->length = length;
1102  // set parents
1103  if (length) {
1104  length->set_parent(this);
1105  }
1106  }
1107 
1108  void IndexedName::set_length(const std::shared_ptr<Expression>& length) {
1109  this->length = length;
1110  // set parents
1111  if (length) {
1112  length->set_parent(this);
1113  }
1114  }
1115 
1116 
1117 
1118  ///
1119  /// VarName member functions definition
1120  ///
1121 
1122 
1123 
1124  std::string VarName::get_node_name() const {
1125  return name->get_node_name();
1126  }
1127 
1128 
1129 
1130 
1131 
1132 
1133 
1135  /// use -> for pointer member
1136  name->accept(v);
1137  (void)v;
1138  /// optional member could be nullptr
1139  if (this->at) {
1140  this->at->accept(v);
1141  }
1142  (void)v;
1143  /// optional member could be nullptr
1144  if (this->index) {
1145  this->index->accept(v);
1146  }
1147  (void)v;
1148  }
1149 
1151  /// use -> for pointer member
1152  name->accept(v);
1153  (void)v;
1154  /// optional member could be nullptr
1155  if (this->at) {
1156  this->at->accept(v);
1157  }
1158  (void)v;
1159  /// optional member could be nullptr
1160  if (this->index) {
1161  this->index->accept(v);
1162  }
1163  (void)v;
1164  }
1165 
1167  v.visit_var_name(*this);
1168  }
1169 
1171  v.visit_var_name(*this);
1172  }
1173 
1174 
1176  : name(name), at(at), index(index) { set_parent_in_children(); }
1177 
1178 
1179  VarName::VarName(std::shared_ptr<Identifier> name, std::shared_ptr<Integer> at, std::shared_ptr<Expression> index)
1180  : name(name), at(at), index(index) { set_parent_in_children(); }
1181 
1182 
1183  /// copy constructor implementation
1185  /// pointer member must be reseted with the new copy
1186  if (obj.name) {
1187  this->name.reset(obj.name->clone());
1188  }
1189  /// pointer member must be reseted with the new copy
1190  if (obj.at) {
1191  this->at.reset(obj.at->clone());
1192  }
1193  /// pointer member must be reseted with the new copy
1194  if (obj.index) {
1195  this->index.reset(obj.index->clone());
1196  }
1197 
1198  /// if there is a token, make copy
1199  if (obj.token) {
1200  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1201  }
1202 
1203  /// set parents
1205  }
1206 
1207 
1208  /// set this parent in the children
1210 
1211  /// optional member could be nullptr
1212  if (name) {
1213  name->set_parent(this);
1214  }
1215  /// optional member could be nullptr
1216  if (at) {
1217  at->set_parent(this);
1218  }
1219  /// optional member could be nullptr
1220  if (index) {
1221  index->set_parent(this);
1222  }
1223 
1224  }
1225 
1226 
1227 
1228  void VarName::set_name(std::shared_ptr<Identifier>&& name) {
1229  this->name = name;
1230  // set parents
1231  if (name) {
1232  name->set_parent(this);
1233  }
1234  }
1235 
1236  void VarName::set_name(const std::shared_ptr<Identifier>& name) {
1237  this->name = name;
1238  // set parents
1239  if (name) {
1240  name->set_parent(this);
1241  }
1242  }
1243 
1244 
1245  void VarName::set_at(std::shared_ptr<Integer>&& at) {
1246  this->at = at;
1247  // set parents
1248  if (at) {
1249  at->set_parent(this);
1250  }
1251  }
1252 
1253  void VarName::set_at(const std::shared_ptr<Integer>& at) {
1254  this->at = at;
1255  // set parents
1256  if (at) {
1257  at->set_parent(this);
1258  }
1259  }
1260 
1261 
1262  void VarName::set_index(std::shared_ptr<Expression>&& index) {
1263  this->index = index;
1264  // set parents
1265  if (index) {
1266  index->set_parent(this);
1267  }
1268  }
1269 
1270  void VarName::set_index(const std::shared_ptr<Expression>& index) {
1271  this->index = index;
1272  // set parents
1273  if (index) {
1274  index->set_parent(this);
1275  }
1276  }
1277 
1278 
1279 
1280  ///
1281  /// Argument member functions definition
1282  ///
1283 
1284 
1285 
1286  std::string Argument::get_node_name() const {
1287  return name->get_node_name();
1288  }
1289 
1290 
1291 
1292 
1294  /// use -> for pointer member
1295  name->accept(v);
1296  (void)v;
1297  /// optional member could be nullptr
1298  if (this->unit) {
1299  this->unit->accept(v);
1300  }
1301  (void)v;
1302  }
1303 
1305  /// use -> for pointer member
1306  name->accept(v);
1307  (void)v;
1308  /// optional member could be nullptr
1309  if (this->unit) {
1310  this->unit->accept(v);
1311  }
1312  (void)v;
1313  }
1314 
1316  v.visit_argument(*this);
1317  }
1318 
1320  v.visit_argument(*this);
1321  }
1322 
1323 
1325  : name(name), unit(unit) { set_parent_in_children(); }
1326 
1327 
1328  Argument::Argument(std::shared_ptr<Identifier> name, std::shared_ptr<Unit> unit)
1329  : name(name), unit(unit) { set_parent_in_children(); }
1330 
1331 
1332  /// copy constructor implementation
1334  /// pointer member must be reseted with the new copy
1335  if (obj.name) {
1336  this->name.reset(obj.name->clone());
1337  }
1338  /// pointer member must be reseted with the new copy
1339  if (obj.unit) {
1340  this->unit.reset(obj.unit->clone());
1341  }
1342 
1343  /// if there is a token, make copy
1344  if (obj.token) {
1345  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1346  }
1347 
1348  /// set parents
1350  }
1351 
1352 
1353  /// set this parent in the children
1355 
1356  /// optional member could be nullptr
1357  if (name) {
1358  name->set_parent(this);
1359  }
1360  /// optional member could be nullptr
1361  if (unit) {
1362  unit->set_parent(this);
1363  }
1364 
1365  }
1366 
1367 
1368 
1369  void Argument::set_name(std::shared_ptr<Identifier>&& name) {
1370  this->name = name;
1371  // set parents
1372  if (name) {
1373  name->set_parent(this);
1374  }
1375  }
1376 
1377  void Argument::set_name(const std::shared_ptr<Identifier>& name) {
1378  this->name = name;
1379  // set parents
1380  if (name) {
1381  name->set_parent(this);
1382  }
1383  }
1384 
1385 
1386  void Argument::set_unit(std::shared_ptr<Unit>&& unit) {
1387  this->unit = unit;
1388  // set parents
1389  if (unit) {
1390  unit->set_parent(this);
1391  }
1392  }
1393 
1394  void Argument::set_unit(const std::shared_ptr<Unit>& unit) {
1395  this->unit = unit;
1396  // set parents
1397  if (unit) {
1398  unit->set_parent(this);
1399  }
1400  }
1401 
1402 
1403 
1404  ///
1405  /// ReactVarName member functions definition
1406  ///
1407 
1408 
1409 
1410 
1411 
1412 
1413  std::string ReactVarName::get_node_name() const {
1414  return name->get_node_name();
1415  }
1416 
1418  /// optional member could be nullptr
1419  if (this->value) {
1420  this->value->accept(v);
1421  }
1422  (void)v;
1423  /// use -> for pointer member
1424  name->accept(v);
1425  (void)v;
1426  }
1427 
1429  /// optional member could be nullptr
1430  if (this->value) {
1431  this->value->accept(v);
1432  }
1433  (void)v;
1434  /// use -> for pointer member
1435  name->accept(v);
1436  (void)v;
1437  }
1438 
1440  v.visit_react_var_name(*this);
1441  }
1442 
1444  v.visit_react_var_name(*this);
1445  }
1446 
1447 
1449  : value(value), name(name) { set_parent_in_children(); }
1450 
1451 
1452  ReactVarName::ReactVarName(std::shared_ptr<Integer> value, std::shared_ptr<VarName> name)
1453  : value(value), name(name) { set_parent_in_children(); }
1454 
1455 
1456  /// copy constructor implementation
1458  /// pointer member must be reseted with the new copy
1459  if (obj.value) {
1460  this->value.reset(obj.value->clone());
1461  }
1462  /// pointer member must be reseted with the new copy
1463  if (obj.name) {
1464  this->name.reset(obj.name->clone());
1465  }
1466 
1467  /// if there is a token, make copy
1468  if (obj.token) {
1469  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1470  }
1471 
1472  /// set parents
1474  }
1475 
1476 
1477  /// set this parent in the children
1479 
1480  /// optional member could be nullptr
1481  if (value) {
1482  value->set_parent(this);
1483  }
1484  /// optional member could be nullptr
1485  if (name) {
1486  name->set_parent(this);
1487  }
1488 
1489  }
1490 
1491 
1492 
1493  void ReactVarName::set_value(std::shared_ptr<Integer>&& value) {
1494  this->value = value;
1495  // set parents
1496  if (value) {
1497  value->set_parent(this);
1498  }
1499  }
1500 
1501  void ReactVarName::set_value(const std::shared_ptr<Integer>& value) {
1502  this->value = value;
1503  // set parents
1504  if (value) {
1505  value->set_parent(this);
1506  }
1507  }
1508 
1509 
1510  void ReactVarName::set_name(std::shared_ptr<VarName>&& name) {
1511  this->name = name;
1512  // set parents
1513  if (name) {
1514  name->set_parent(this);
1515  }
1516  }
1517 
1518  void ReactVarName::set_name(const std::shared_ptr<VarName>& name) {
1519  this->name = name;
1520  // set parents
1521  if (name) {
1522  name->set_parent(this);
1523  }
1524  }
1525 
1526 
1527 
1528  ///
1529  /// ReadIonVar member functions definition
1530  ///
1531 
1532 
1533 
1534  std::string ReadIonVar::get_node_name() const {
1535  return name->get_node_name();
1536  }
1537 
1539  /// use -> for pointer member
1540  name->accept(v);
1541  (void)v;
1542  }
1543 
1545  /// use -> for pointer member
1546  name->accept(v);
1547  (void)v;
1548  }
1549 
1551  v.visit_read_ion_var(*this);
1552  }
1553 
1555  v.visit_read_ion_var(*this);
1556  }
1557 
1558 
1560  : name(name) { set_parent_in_children(); }
1561 
1562 
1563  ReadIonVar::ReadIonVar(std::shared_ptr<Name> name)
1564  : name(name) { set_parent_in_children(); }
1565 
1566 
1567  /// copy constructor implementation
1569  /// pointer member must be reseted with the new copy
1570  if (obj.name) {
1571  this->name.reset(obj.name->clone());
1572  }
1573 
1574  /// if there is a token, make copy
1575  if (obj.token) {
1576  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1577  }
1578 
1579  /// set parents
1581  }
1582 
1583 
1584  /// set this parent in the children
1586 
1587  /// optional member could be nullptr
1588  if (name) {
1589  name->set_parent(this);
1590  }
1591 
1592  }
1593 
1594 
1595 
1596  void ReadIonVar::set_name(std::shared_ptr<Name>&& name) {
1597  this->name = name;
1598  // set parents
1599  if (name) {
1600  name->set_parent(this);
1601  }
1602  }
1603 
1604  void ReadIonVar::set_name(const std::shared_ptr<Name>& name) {
1605  this->name = name;
1606  // set parents
1607  if (name) {
1608  name->set_parent(this);
1609  }
1610  }
1611 
1612 
1613 
1614  ///
1615  /// WriteIonVar member functions definition
1616  ///
1617 
1618 
1619 
1620  std::string WriteIonVar::get_node_name() const {
1621  return name->get_node_name();
1622  }
1623 
1625  /// use -> for pointer member
1626  name->accept(v);
1627  (void)v;
1628  }
1629 
1631  /// use -> for pointer member
1632  name->accept(v);
1633  (void)v;
1634  }
1635 
1637  v.visit_write_ion_var(*this);
1638  }
1639 
1641  v.visit_write_ion_var(*this);
1642  }
1643 
1644 
1646  : name(name) { set_parent_in_children(); }
1647 
1648 
1649  WriteIonVar::WriteIonVar(std::shared_ptr<Name> name)
1650  : name(name) { set_parent_in_children(); }
1651 
1652 
1653  /// copy constructor implementation
1655  /// pointer member must be reseted with the new copy
1656  if (obj.name) {
1657  this->name.reset(obj.name->clone());
1658  }
1659 
1660  /// if there is a token, make copy
1661  if (obj.token) {
1662  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1663  }
1664 
1665  /// set parents
1667  }
1668 
1669 
1670  /// set this parent in the children
1672 
1673  /// optional member could be nullptr
1674  if (name) {
1675  name->set_parent(this);
1676  }
1677 
1678  }
1679 
1680 
1681 
1682  void WriteIonVar::set_name(std::shared_ptr<Name>&& name) {
1683  this->name = name;
1684  // set parents
1685  if (name) {
1686  name->set_parent(this);
1687  }
1688  }
1689 
1690  void WriteIonVar::set_name(const std::shared_ptr<Name>& name) {
1691  this->name = name;
1692  // set parents
1693  if (name) {
1694  name->set_parent(this);
1695  }
1696  }
1697 
1698 
1699 
1700  ///
1701  /// NonspecificCurVar member functions definition
1702  ///
1703 
1704 
1705 
1706  std::string NonspecificCurVar::get_node_name() const {
1707  return name->get_node_name();
1708  }
1709 
1711  /// use -> for pointer member
1712  name->accept(v);
1713  (void)v;
1714  }
1715 
1717  /// use -> for pointer member
1718  name->accept(v);
1719  (void)v;
1720  }
1721 
1723  v.visit_nonspecific_cur_var(*this);
1724  }
1725 
1727  v.visit_nonspecific_cur_var(*this);
1728  }
1729 
1730 
1732  : name(name) { set_parent_in_children(); }
1733 
1734 
1735  NonspecificCurVar::NonspecificCurVar(std::shared_ptr<Name> name)
1736  : name(name) { set_parent_in_children(); }
1737 
1738 
1739  /// copy constructor implementation
1741  /// pointer member must be reseted with the new copy
1742  if (obj.name) {
1743  this->name.reset(obj.name->clone());
1744  }
1745 
1746  /// if there is a token, make copy
1747  if (obj.token) {
1748  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1749  }
1750 
1751  /// set parents
1753  }
1754 
1755 
1756  /// set this parent in the children
1758 
1759  /// optional member could be nullptr
1760  if (name) {
1761  name->set_parent(this);
1762  }
1763 
1764  }
1765 
1766 
1767 
1768  void NonspecificCurVar::set_name(std::shared_ptr<Name>&& name) {
1769  this->name = name;
1770  // set parents
1771  if (name) {
1772  name->set_parent(this);
1773  }
1774  }
1775 
1776  void NonspecificCurVar::set_name(const std::shared_ptr<Name>& name) {
1777  this->name = name;
1778  // set parents
1779  if (name) {
1780  name->set_parent(this);
1781  }
1782  }
1783 
1784 
1785 
1786  ///
1787  /// ElectrodeCurVar member functions definition
1788  ///
1789 
1790 
1791 
1792  std::string ElectrodeCurVar::get_node_name() const {
1793  return name->get_node_name();
1794  }
1795 
1797  /// use -> for pointer member
1798  name->accept(v);
1799  (void)v;
1800  }
1801 
1803  /// use -> for pointer member
1804  name->accept(v);
1805  (void)v;
1806  }
1807 
1809  v.visit_electrode_cur_var(*this);
1810  }
1811 
1813  v.visit_electrode_cur_var(*this);
1814  }
1815 
1816 
1818  : name(name) { set_parent_in_children(); }
1819 
1820 
1821  ElectrodeCurVar::ElectrodeCurVar(std::shared_ptr<Name> name)
1822  : name(name) { set_parent_in_children(); }
1823 
1824 
1825  /// copy constructor implementation
1827  /// pointer member must be reseted with the new copy
1828  if (obj.name) {
1829  this->name.reset(obj.name->clone());
1830  }
1831 
1832  /// if there is a token, make copy
1833  if (obj.token) {
1834  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1835  }
1836 
1837  /// set parents
1839  }
1840 
1841 
1842  /// set this parent in the children
1844 
1845  /// optional member could be nullptr
1846  if (name) {
1847  name->set_parent(this);
1848  }
1849 
1850  }
1851 
1852 
1853 
1854  void ElectrodeCurVar::set_name(std::shared_ptr<Name>&& name) {
1855  this->name = name;
1856  // set parents
1857  if (name) {
1858  name->set_parent(this);
1859  }
1860  }
1861 
1862  void ElectrodeCurVar::set_name(const std::shared_ptr<Name>& name) {
1863  this->name = name;
1864  // set parents
1865  if (name) {
1866  name->set_parent(this);
1867  }
1868  }
1869 
1870 
1871 
1872  ///
1873  /// RangeVar member functions definition
1874  ///
1875 
1876 
1877 
1878  std::string RangeVar::get_node_name() const {
1879  return name->get_node_name();
1880  }
1881 
1883  /// use -> for pointer member
1884  name->accept(v);
1885  (void)v;
1886  }
1887 
1889  /// use -> for pointer member
1890  name->accept(v);
1891  (void)v;
1892  }
1893 
1895  v.visit_range_var(*this);
1896  }
1897 
1899  v.visit_range_var(*this);
1900  }
1901 
1902 
1904  : name(name) { set_parent_in_children(); }
1905 
1906 
1907  RangeVar::RangeVar(std::shared_ptr<Name> name)
1908  : name(name) { set_parent_in_children(); }
1909 
1910 
1911  /// copy constructor implementation
1913  /// pointer member must be reseted with the new copy
1914  if (obj.name) {
1915  this->name.reset(obj.name->clone());
1916  }
1917 
1918  /// if there is a token, make copy
1919  if (obj.token) {
1920  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1921  }
1922 
1923  /// set parents
1925  }
1926 
1927 
1928  /// set this parent in the children
1930 
1931  /// optional member could be nullptr
1932  if (name) {
1933  name->set_parent(this);
1934  }
1935 
1936  }
1937 
1938 
1939 
1940  void RangeVar::set_name(std::shared_ptr<Name>&& name) {
1941  this->name = name;
1942  // set parents
1943  if (name) {
1944  name->set_parent(this);
1945  }
1946  }
1947 
1948  void RangeVar::set_name(const std::shared_ptr<Name>& name) {
1949  this->name = name;
1950  // set parents
1951  if (name) {
1952  name->set_parent(this);
1953  }
1954  }
1955 
1956 
1957 
1958  ///
1959  /// GlobalVar member functions definition
1960  ///
1961 
1962 
1963 
1964  std::string GlobalVar::get_node_name() const {
1965  return name->get_node_name();
1966  }
1967 
1969  /// use -> for pointer member
1970  name->accept(v);
1971  (void)v;
1972  }
1973 
1975  /// use -> for pointer member
1976  name->accept(v);
1977  (void)v;
1978  }
1979 
1981  v.visit_global_var(*this);
1982  }
1983 
1985  v.visit_global_var(*this);
1986  }
1987 
1988 
1990  : name(name) { set_parent_in_children(); }
1991 
1992 
1993  GlobalVar::GlobalVar(std::shared_ptr<Name> name)
1994  : name(name) { set_parent_in_children(); }
1995 
1996 
1997  /// copy constructor implementation
1999  /// pointer member must be reseted with the new copy
2000  if (obj.name) {
2001  this->name.reset(obj.name->clone());
2002  }
2003 
2004  /// if there is a token, make copy
2005  if (obj.token) {
2006  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2007  }
2008 
2009  /// set parents
2011  }
2012 
2013 
2014  /// set this parent in the children
2016 
2017  /// optional member could be nullptr
2018  if (name) {
2019  name->set_parent(this);
2020  }
2021 
2022  }
2023 
2024 
2025 
2026  void GlobalVar::set_name(std::shared_ptr<Name>&& name) {
2027  this->name = name;
2028  // set parents
2029  if (name) {
2030  name->set_parent(this);
2031  }
2032  }
2033 
2034  void GlobalVar::set_name(const std::shared_ptr<Name>& name) {
2035  this->name = name;
2036  // set parents
2037  if (name) {
2038  name->set_parent(this);
2039  }
2040  }
2041 
2042 
2043 
2044  ///
2045  /// PointerVar member functions definition
2046  ///
2047 
2048 
2049 
2050  std::string PointerVar::get_node_name() const {
2051  return name->get_node_name();
2052  }
2053 
2055  /// use -> for pointer member
2056  name->accept(v);
2057  (void)v;
2058  }
2059 
2061  /// use -> for pointer member
2062  name->accept(v);
2063  (void)v;
2064  }
2065 
2067  v.visit_pointer_var(*this);
2068  }
2069 
2071  v.visit_pointer_var(*this);
2072  }
2073 
2074 
2076  : name(name) { set_parent_in_children(); }
2077 
2078 
2079  PointerVar::PointerVar(std::shared_ptr<Name> name)
2080  : name(name) { set_parent_in_children(); }
2081 
2082 
2083  /// copy constructor implementation
2085  /// pointer member must be reseted with the new copy
2086  if (obj.name) {
2087  this->name.reset(obj.name->clone());
2088  }
2089 
2090  /// if there is a token, make copy
2091  if (obj.token) {
2092  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2093  }
2094 
2095  /// set parents
2097  }
2098 
2099 
2100  /// set this parent in the children
2102 
2103  /// optional member could be nullptr
2104  if (name) {
2105  name->set_parent(this);
2106  }
2107 
2108  }
2109 
2110 
2111 
2112  void PointerVar::set_name(std::shared_ptr<Name>&& name) {
2113  this->name = name;
2114  // set parents
2115  if (name) {
2116  name->set_parent(this);
2117  }
2118  }
2119 
2120  void PointerVar::set_name(const std::shared_ptr<Name>& name) {
2121  this->name = name;
2122  // set parents
2123  if (name) {
2124  name->set_parent(this);
2125  }
2126  }
2127 
2128 
2129 
2130  ///
2131  /// RandomVar member functions definition
2132  ///
2133 
2134 
2135 
2136  std::string RandomVar::get_node_name() const {
2137  return name->get_node_name();
2138  }
2139 
2141  /// use -> for pointer member
2142  name->accept(v);
2143  (void)v;
2144  }
2145 
2147  /// use -> for pointer member
2148  name->accept(v);
2149  (void)v;
2150  }
2151 
2153  v.visit_random_var(*this);
2154  }
2155 
2157  v.visit_random_var(*this);
2158  }
2159 
2160 
2162  : name(name) { set_parent_in_children(); }
2163 
2164 
2165  RandomVar::RandomVar(std::shared_ptr<Name> name)
2166  : name(name) { set_parent_in_children(); }
2167 
2168 
2169  /// copy constructor implementation
2171  /// pointer member must be reseted with the new copy
2172  if (obj.name) {
2173  this->name.reset(obj.name->clone());
2174  }
2175 
2176  /// if there is a token, make copy
2177  if (obj.token) {
2178  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2179  }
2180 
2181  /// set parents
2183  }
2184 
2185 
2186  /// set this parent in the children
2188 
2189  /// optional member could be nullptr
2190  if (name) {
2191  name->set_parent(this);
2192  }
2193 
2194  }
2195 
2196 
2197 
2198  void RandomVar::set_name(std::shared_ptr<Name>&& name) {
2199  this->name = name;
2200  // set parents
2201  if (name) {
2202  name->set_parent(this);
2203  }
2204  }
2205 
2206  void RandomVar::set_name(const std::shared_ptr<Name>& name) {
2207  this->name = name;
2208  // set parents
2209  if (name) {
2210  name->set_parent(this);
2211  }
2212  }
2213 
2214 
2215 
2216  ///
2217  /// BbcorePointerVar member functions definition
2218  ///
2219 
2220 
2221 
2222  std::string BbcorePointerVar::get_node_name() const {
2223  return name->get_node_name();
2224  }
2225 
2227  /// use -> for pointer member
2228  name->accept(v);
2229  (void)v;
2230  }
2231 
2233  /// use -> for pointer member
2234  name->accept(v);
2235  (void)v;
2236  }
2237 
2239  v.visit_bbcore_pointer_var(*this);
2240  }
2241 
2243  v.visit_bbcore_pointer_var(*this);
2244  }
2245 
2246 
2248  : name(name) { set_parent_in_children(); }
2249 
2250 
2251  BbcorePointerVar::BbcorePointerVar(std::shared_ptr<Name> name)
2252  : name(name) { set_parent_in_children(); }
2253 
2254 
2255  /// copy constructor implementation
2257  /// pointer member must be reseted with the new copy
2258  if (obj.name) {
2259  this->name.reset(obj.name->clone());
2260  }
2261 
2262  /// if there is a token, make copy
2263  if (obj.token) {
2264  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2265  }
2266 
2267  /// set parents
2269  }
2270 
2271 
2272  /// set this parent in the children
2274 
2275  /// optional member could be nullptr
2276  if (name) {
2277  name->set_parent(this);
2278  }
2279 
2280  }
2281 
2282 
2283 
2284  void BbcorePointerVar::set_name(std::shared_ptr<Name>&& name) {
2285  this->name = name;
2286  // set parents
2287  if (name) {
2288  name->set_parent(this);
2289  }
2290  }
2291 
2292  void BbcorePointerVar::set_name(const std::shared_ptr<Name>& name) {
2293  this->name = name;
2294  // set parents
2295  if (name) {
2296  name->set_parent(this);
2297  }
2298  }
2299 
2300 
2301 
2302  ///
2303  /// ExternVar member functions definition
2304  ///
2305 
2306 
2307 
2308  std::string ExternVar::get_node_name() const {
2309  return name->get_node_name();
2310  }
2311 
2313  /// use -> for pointer member
2314  name->accept(v);
2315  (void)v;
2316  }
2317 
2319  /// use -> for pointer member
2320  name->accept(v);
2321  (void)v;
2322  }
2323 
2325  v.visit_extern_var(*this);
2326  }
2327 
2329  v.visit_extern_var(*this);
2330  }
2331 
2332 
2334  : name(name) { set_parent_in_children(); }
2335 
2336 
2337  ExternVar::ExternVar(std::shared_ptr<Name> name)
2338  : name(name) { set_parent_in_children(); }
2339 
2340 
2341  /// copy constructor implementation
2343  /// pointer member must be reseted with the new copy
2344  if (obj.name) {
2345  this->name.reset(obj.name->clone());
2346  }
2347 
2348  /// if there is a token, make copy
2349  if (obj.token) {
2350  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2351  }
2352 
2353  /// set parents
2355  }
2356 
2357 
2358  /// set this parent in the children
2360 
2361  /// optional member could be nullptr
2362  if (name) {
2363  name->set_parent(this);
2364  }
2365 
2366  }
2367 
2368 
2369 
2370  void ExternVar::set_name(std::shared_ptr<Name>&& name) {
2371  this->name = name;
2372  // set parents
2373  if (name) {
2374  name->set_parent(this);
2375  }
2376  }
2377 
2378  void ExternVar::set_name(const std::shared_ptr<Name>& name) {
2379  this->name = name;
2380  // set parents
2381  if (name) {
2382  name->set_parent(this);
2383  }
2384  }
2385 
2386 
2387 
2388  ///
2389  /// ParamBlock member functions definition
2390  ///
2391 
2392 
2393 
2394 
2395 
2397  /// visit each element of vector
2398  for (auto& item : this->statements) {
2399  item->accept(v);
2400  }
2401  (void)v;
2402  }
2403 
2405  /// visit each element of vector
2406  for (auto& item : this->statements) {
2407  item->accept(v);
2408  }
2409  (void)v;
2410  }
2411 
2413  v.visit_param_block(*this);
2414  }
2415 
2417  v.visit_param_block(*this);
2418  }
2419 
2420 
2422  : statements(statements) { set_parent_in_children(); }
2423 
2424 
2425 
2426  /// copy constructor implementation
2428  /// copy each element of vector
2429  for (auto& item : obj.statements) {
2430  this->statements.emplace_back(item->clone());
2431  }
2432 
2433  /// if there is a token, make copy
2434  if (obj.token) {
2435  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2436  }
2437 
2438  /// set parents
2440  }
2441 
2442 
2443  /// set this parent in the children
2445 
2446  /// set parent for each element of the vector
2447  for (auto& item : statements) {
2448  item->set_parent(this);
2449 
2450  }
2451 
2452  }
2453 
2454 
2455 
2457  this->statements = statements;
2458  // set parents
2459  for (auto& ii : statements) {
2460  ii->set_parent(this);
2461  }
2462  }
2463 
2465  this->statements = statements;
2466  // set parents
2467  for (auto& ii : statements) {
2468  ii->set_parent(this);
2469  }
2470  }
2471 
2472 
2473 
2474  ///
2475  /// IndependentBlock member functions definition
2476  ///
2477 
2478 
2479 
2480 
2481 
2483  /// visit each element of vector
2484  for (auto& item : this->variables) {
2485  item->accept(v);
2486  }
2487  (void)v;
2488  }
2489 
2491  /// visit each element of vector
2492  for (auto& item : this->variables) {
2493  item->accept(v);
2494  }
2495  (void)v;
2496  }
2497 
2499  v.visit_independent_block(*this);
2500  }
2501 
2503  v.visit_independent_block(*this);
2504  }
2505 
2506 
2508  : variables(variables) { set_parent_in_children(); }
2509 
2510 
2511 
2512  /// copy constructor implementation
2514  /// copy each element of vector
2515  for (auto& item : obj.variables) {
2516  this->variables.emplace_back(item->clone());
2517  }
2518 
2519  /// if there is a token, make copy
2520  if (obj.token) {
2521  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2522  }
2523 
2524  /// set parents
2526  }
2527 
2528 
2529  /// set this parent in the children
2531 
2532  /// set parent for each element of the vector
2533  for (auto& item : variables) {
2534  item->set_parent(this);
2535 
2536  }
2537 
2538  }
2539 
2540 
2541 
2543  this->variables = variables;
2544  // set parents
2545  for (auto& ii : variables) {
2546  ii->set_parent(this);
2547  }
2548  }
2549 
2551  this->variables = variables;
2552  // set parents
2553  for (auto& ii : variables) {
2554  ii->set_parent(this);
2555  }
2556  }
2557 
2558 
2559 
2560  ///
2561  /// AssignedBlock member functions definition
2562  ///
2563 
2564 
2565 /**
2566  * \brief Add member to definitions by raw pointer
2567  */
2569  definitions.emplace_back(n);
2570 
2571  // set parents
2572  n->set_parent(this);
2573 }
2574 
2575 /**
2576  * \brief Add member to definitions by shared_ptr
2577  */
2578 void AssignedBlock::emplace_back_assigned_definition(std::shared_ptr<AssignedDefinition> n) {
2579  definitions.emplace_back(n);
2580  // set parents
2581  n->set_parent(this);
2582 }
2583 
2584 /**
2585  * \brief Erase member to definitions
2586  */
2587 AssignedDefinitionVector::const_iterator AssignedBlock::erase_assigned_definition(AssignedDefinitionVector::const_iterator first) {
2588  return definitions.erase(first);
2589 }
2590 /**
2591  * \brief Erase members to definitions
2592  */
2593 AssignedDefinitionVector::const_iterator AssignedBlock::erase_assigned_definition(AssignedDefinitionVector::const_iterator first, AssignedDefinitionVector::const_iterator last) {
2594  return definitions.erase(first, last);
2595 }
2596 /**
2597  * \brief Erase non-consecutive members to definitions
2598  *
2599  * loosely following the cpp reference of remove_if
2600  */
2601 size_t AssignedBlock::erase_assigned_definition(std::unordered_set<AssignedDefinition*>& to_be_erased) {
2602  auto first = definitions.begin();
2603  auto last = definitions.end();
2604  auto result = first;
2605 
2606  while (first != last) {
2607  // automatically erase dangling pointers from the uset while
2608  // looking for them to erase them in the vector
2609  if (to_be_erased.erase(first->get()) == 0) {
2610  reset_assigned_definition(result, *first);
2611  ++result;
2612  }
2613  ++first;
2614  }
2615 
2616  size_t out = last - result;
2617  erase_assigned_definition(result, last);
2618 
2619  return out;
2620 }
2621 
2622 /**
2623  * \brief Insert member to definitions
2624  */
2625 AssignedDefinitionVector::const_iterator AssignedBlock::insert_assigned_definition(AssignedDefinitionVector::const_iterator position, const std::shared_ptr<AssignedDefinition>& n) {
2626  n->set_parent(this);
2627  return definitions.insert(position, n);
2628 }
2629 
2630 /**
2631  * \brief Reset member to definitions
2632  */
2633 void AssignedBlock::reset_assigned_definition(AssignedDefinitionVector::const_iterator position, AssignedDefinition* n) {
2634  //set parents
2635  n->set_parent(this);
2636 
2637  definitions[position - definitions.begin()].reset(n);
2638 }
2639 
2640 /**
2641  * \brief Reset member to definitions
2642  */
2643 void AssignedBlock::reset_assigned_definition(AssignedDefinitionVector::const_iterator position, std::shared_ptr<AssignedDefinition> n) {
2644  //set parents
2645  n->set_parent(this);
2646 
2647  definitions[position - definitions.begin()] = n;
2648 }
2649 
2650 
2651 
2652 
2654  /// visit each element of vector
2655  for (auto& item : this->definitions) {
2656  item->accept(v);
2657  }
2658  (void)v;
2659  }
2660 
2662  /// visit each element of vector
2663  for (auto& item : this->definitions) {
2664  item->accept(v);
2665  }
2666  (void)v;
2667  }
2668 
2670  v.visit_assigned_block(*this);
2671  }
2672 
2674  v.visit_assigned_block(*this);
2675  }
2676 
2677 
2679  : definitions(definitions) { set_parent_in_children(); }
2680 
2681 
2682 
2683  /// copy constructor implementation
2685  /// copy each element of vector
2686  for (auto& item : obj.definitions) {
2687  this->definitions.emplace_back(item->clone());
2688  }
2689 
2690  /// if there is a token, make copy
2691  if (obj.token) {
2692  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2693  }
2694 
2695  /// set parents
2697  }
2698 
2699 
2700  /// set this parent in the children
2702 
2703  /// set parent for each element of the vector
2704  for (auto& item : definitions) {
2705  item->set_parent(this);
2706 
2707  }
2708 
2709  }
2710 
2711 
2712 
2714  this->definitions = definitions;
2715  // set parents
2716  for (auto& ii : definitions) {
2717  ii->set_parent(this);
2718  }
2719  }
2720 
2722  this->definitions = definitions;
2723  // set parents
2724  for (auto& ii : definitions) {
2725  ii->set_parent(this);
2726  }
2727  }
2728 
2729 
2730 
2731  ///
2732  /// StateBlock member functions definition
2733  ///
2734 
2735 
2736 
2737 
2738 
2740  /// visit each element of vector
2741  for (auto& item : this->definitions) {
2742  item->accept(v);
2743  }
2744  (void)v;
2745  }
2746 
2748  /// visit each element of vector
2749  for (auto& item : this->definitions) {
2750  item->accept(v);
2751  }
2752  (void)v;
2753  }
2754 
2756  v.visit_state_block(*this);
2757  }
2758 
2760  v.visit_state_block(*this);
2761  }
2762 
2763 
2765  : definitions(definitions) { set_parent_in_children(); }
2766 
2767 
2768 
2769  /// copy constructor implementation
2771  /// copy each element of vector
2772  for (auto& item : obj.definitions) {
2773  this->definitions.emplace_back(item->clone());
2774  }
2775 
2776  /// if there is a token, make copy
2777  if (obj.token) {
2778  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2779  }
2780 
2781  /// set parents
2783  }
2784 
2785 
2786  /// set this parent in the children
2788 
2789  /// set parent for each element of the vector
2790  for (auto& item : definitions) {
2791  item->set_parent(this);
2792 
2793  }
2794 
2795  }
2796 
2797 
2798 
2800  this->definitions = definitions;
2801  // set parents
2802  for (auto& ii : definitions) {
2803  ii->set_parent(this);
2804  }
2805  }
2806 
2808  this->definitions = definitions;
2809  // set parents
2810  for (auto& ii : definitions) {
2811  ii->set_parent(this);
2812  }
2813  }
2814 
2815 
2816 
2817  ///
2818  /// InitialBlock member functions definition
2819  ///
2820 
2821 
2822 
2823 
2824 
2826  /// use -> for pointer member
2827  statement_block->accept(v);
2828  (void)v;
2829  }
2830 
2832  /// use -> for pointer member
2833  statement_block->accept(v);
2834  (void)v;
2835  }
2836 
2838  v.visit_initial_block(*this);
2839  }
2840 
2842  v.visit_initial_block(*this);
2843  }
2844 
2845 
2847  : statement_block(statement_block) { set_parent_in_children(); }
2848 
2849 
2850  InitialBlock::InitialBlock(std::shared_ptr<StatementBlock> statement_block)
2851  : statement_block(statement_block) { set_parent_in_children(); }
2852 
2853 
2854  /// copy constructor implementation
2856  /// pointer member must be reseted with the new copy
2857  if (obj.statement_block) {
2858  this->statement_block.reset(obj.statement_block->clone());
2859  }
2860 
2861  /// if there is a token, make copy
2862  if (obj.token) {
2863  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2864  }
2865 
2866  /// set parents
2868  }
2869 
2870 
2871  /// set this parent in the children
2873 
2874  /// optional member could be nullptr
2875  if (statement_block) {
2876  statement_block->set_parent(this);
2877  }
2878 
2879  }
2880 
2881 
2882 
2883  void InitialBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
2885  // set parents
2886  if (statement_block) {
2887  statement_block->set_parent(this);
2888  }
2889  }
2890 
2891  void InitialBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
2892  this->statement_block = statement_block;
2893  // set parents
2894  if (statement_block) {
2895  statement_block->set_parent(this);
2896  }
2897  }
2898 
2899 
2900 
2901  ///
2902  /// ConstructorBlock member functions definition
2903  ///
2904 
2905 
2906 
2907 
2908 
2910  /// use -> for pointer member
2911  statement_block->accept(v);
2912  (void)v;
2913  }
2914 
2916  /// use -> for pointer member
2917  statement_block->accept(v);
2918  (void)v;
2919  }
2920 
2922  v.visit_constructor_block(*this);
2923  }
2924 
2926  v.visit_constructor_block(*this);
2927  }
2928 
2929 
2931  : statement_block(statement_block) { set_parent_in_children(); }
2932 
2933 
2934  ConstructorBlock::ConstructorBlock(std::shared_ptr<StatementBlock> statement_block)
2935  : statement_block(statement_block) { set_parent_in_children(); }
2936 
2937 
2938  /// copy constructor implementation
2940  /// pointer member must be reseted with the new copy
2941  if (obj.statement_block) {
2942  this->statement_block.reset(obj.statement_block->clone());
2943  }
2944 
2945  /// if there is a token, make copy
2946  if (obj.token) {
2947  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2948  }
2949 
2950  /// set parents
2952  }
2953 
2954 
2955  /// set this parent in the children
2957 
2958  /// optional member could be nullptr
2959  if (statement_block) {
2960  statement_block->set_parent(this);
2961  }
2962 
2963  }
2964 
2965 
2966 
2967  void ConstructorBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
2969  // set parents
2970  if (statement_block) {
2971  statement_block->set_parent(this);
2972  }
2973  }
2974 
2975  void ConstructorBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
2976  this->statement_block = statement_block;
2977  // set parents
2978  if (statement_block) {
2979  statement_block->set_parent(this);
2980  }
2981  }
2982 
2983 
2984 
2985  ///
2986  /// DestructorBlock member functions definition
2987  ///
2988 
2989 
2990 
2991 
2992 
2994  /// use -> for pointer member
2995  statement_block->accept(v);
2996  (void)v;
2997  }
2998 
3000  /// use -> for pointer member
3001  statement_block->accept(v);
3002  (void)v;
3003  }
3004 
3006  v.visit_destructor_block(*this);
3007  }
3008 
3010  v.visit_destructor_block(*this);
3011  }
3012 
3013 
3015  : statement_block(statement_block) { set_parent_in_children(); }
3016 
3017 
3018  DestructorBlock::DestructorBlock(std::shared_ptr<StatementBlock> statement_block)
3019  : statement_block(statement_block) { set_parent_in_children(); }
3020 
3021 
3022  /// copy constructor implementation
3024  /// pointer member must be reseted with the new copy
3025  if (obj.statement_block) {
3026  this->statement_block.reset(obj.statement_block->clone());
3027  }
3028 
3029  /// if there is a token, make copy
3030  if (obj.token) {
3031  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3032  }
3033 
3034  /// set parents
3036  }
3037 
3038 
3039  /// set this parent in the children
3041 
3042  /// optional member could be nullptr
3043  if (statement_block) {
3044  statement_block->set_parent(this);
3045  }
3046 
3047  }
3048 
3049 
3050 
3051  void DestructorBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3053  // set parents
3054  if (statement_block) {
3055  statement_block->set_parent(this);
3056  }
3057  }
3058 
3059  void DestructorBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3060  this->statement_block = statement_block;
3061  // set parents
3062  if (statement_block) {
3063  statement_block->set_parent(this);
3064  }
3065  }
3066 
3067 
3068 
3069  ///
3070  /// StatementBlock member functions definition
3071  ///
3072 
3073 
3074 /**
3075  * \brief Add member to statements by raw pointer
3076  */
3078  statements.emplace_back(n);
3079 
3080  // set parents
3081  n->set_parent(this);
3082 }
3083 
3084 /**
3085  * \brief Add member to statements by shared_ptr
3086  */
3087 void StatementBlock::emplace_back_statement(std::shared_ptr<Statement> n) {
3088  statements.emplace_back(n);
3089  // set parents
3090  n->set_parent(this);
3091 }
3092 
3093 /**
3094  * \brief Erase member to statements
3095  */
3096 StatementVector::const_iterator StatementBlock::erase_statement(StatementVector::const_iterator first) {
3097  return statements.erase(first);
3098 }
3099 /**
3100  * \brief Erase members to statements
3101  */
3102 StatementVector::const_iterator StatementBlock::erase_statement(StatementVector::const_iterator first, StatementVector::const_iterator last) {
3103  return statements.erase(first, last);
3104 }
3105 /**
3106  * \brief Erase non-consecutive members to statements
3107  *
3108  * loosely following the cpp reference of remove_if
3109  */
3110 size_t StatementBlock::erase_statement(std::unordered_set<Statement*>& to_be_erased) {
3111  auto first = statements.begin();
3112  auto last = statements.end();
3113  auto result = first;
3114 
3115  while (first != last) {
3116  // automatically erase dangling pointers from the uset while
3117  // looking for them to erase them in the vector
3118  if (to_be_erased.erase(first->get()) == 0) {
3119  reset_statement(result, *first);
3120  ++result;
3121  }
3122  ++first;
3123  }
3124 
3125  size_t out = last - result;
3126  erase_statement(result, last);
3127 
3128  return out;
3129 }
3130 
3131 /**
3132  * \brief Insert member to statements
3133  */
3134 StatementVector::const_iterator StatementBlock::insert_statement(StatementVector::const_iterator position, const std::shared_ptr<Statement>& n) {
3135  n->set_parent(this);
3136  return statements.insert(position, n);
3137 }
3138 
3139 /**
3140  * \brief Reset member to statements
3141  */
3142 void StatementBlock::reset_statement(StatementVector::const_iterator position, Statement* n) {
3143  //set parents
3144  n->set_parent(this);
3145 
3146  statements[position - statements.begin()].reset(n);
3147 }
3148 
3149 /**
3150  * \brief Reset member to statements
3151  */
3152 void StatementBlock::reset_statement(StatementVector::const_iterator position, std::shared_ptr<Statement> n) {
3153  //set parents
3154  n->set_parent(this);
3155 
3156  statements[position - statements.begin()] = n;
3157 }
3158 
3159 
3160 
3161 
3163  /// visit each element of vector
3164  for (auto& item : this->statements) {
3165  item->accept(v);
3166  }
3167  (void)v;
3168  }
3169 
3171  /// visit each element of vector
3172  for (auto& item : this->statements) {
3173  item->accept(v);
3174  }
3175  (void)v;
3176  }
3177 
3179  v.visit_statement_block(*this);
3180  }
3181 
3183  v.visit_statement_block(*this);
3184  }
3185 
3186 
3188  : statements(statements) { set_parent_in_children(); }
3189 
3190 
3191 
3192  /// copy constructor implementation
3194  /// copy each element of vector
3195  for (auto& item : obj.statements) {
3196  this->statements.emplace_back(item->clone());
3197  }
3198 
3199  /// if there is a token, make copy
3200  if (obj.token) {
3201  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3202  }
3203 
3204  /// set parents
3206  }
3207 
3208 
3209  /// set this parent in the children
3211 
3212  /// set parent for each element of the vector
3213  for (auto& item : statements) {
3214  item->set_parent(this);
3215 
3216  }
3217 
3218  }
3219 
3220 
3221 
3223  this->statements = statements;
3224  // set parents
3225  for (auto& ii : statements) {
3226  ii->set_parent(this);
3227  }
3228  }
3229 
3231  this->statements = statements;
3232  // set parents
3233  for (auto& ii : statements) {
3234  ii->set_parent(this);
3235  }
3236  }
3237 
3238 
3239 
3240  ///
3241  /// DerivativeBlock member functions definition
3242  ///
3243 
3244 
3245 
3246  std::string DerivativeBlock::get_node_name() const {
3247  return name->get_node_name();
3248  }
3249 
3250 
3251 
3252 
3254  /// use -> for pointer member
3255  name->accept(v);
3256  (void)v;
3257  /// use -> for pointer member
3258  statement_block->accept(v);
3259  (void)v;
3260  }
3261 
3263  /// use -> for pointer member
3264  name->accept(v);
3265  (void)v;
3266  /// use -> for pointer member
3267  statement_block->accept(v);
3268  (void)v;
3269  }
3270 
3272  v.visit_derivative_block(*this);
3273  }
3274 
3276  v.visit_derivative_block(*this);
3277  }
3278 
3279 
3281  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3282 
3283 
3284  DerivativeBlock::DerivativeBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> statement_block)
3285  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3286 
3287 
3288  /// copy constructor implementation
3290  /// pointer member must be reseted with the new copy
3291  if (obj.name) {
3292  this->name.reset(obj.name->clone());
3293  }
3294  /// pointer member must be reseted with the new copy
3295  if (obj.statement_block) {
3296  this->statement_block.reset(obj.statement_block->clone());
3297  }
3298 
3299  /// if there is a token, make copy
3300  if (obj.token) {
3301  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3302  }
3303 
3304  /// set parents
3306  }
3307 
3308 
3309  /// set this parent in the children
3311 
3312  /// optional member could be nullptr
3313  if (name) {
3314  name->set_parent(this);
3315  }
3316  /// optional member could be nullptr
3317  if (statement_block) {
3318  statement_block->set_parent(this);
3319  }
3320 
3321  }
3322 
3323 
3324 
3325  void DerivativeBlock::set_name(std::shared_ptr<Name>&& name) {
3326  this->name = name;
3327  // set parents
3328  if (name) {
3329  name->set_parent(this);
3330  }
3331  }
3332 
3333  void DerivativeBlock::set_name(const std::shared_ptr<Name>& name) {
3334  this->name = name;
3335  // set parents
3336  if (name) {
3337  name->set_parent(this);
3338  }
3339  }
3340 
3341 
3342  void DerivativeBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3344  // set parents
3345  if (statement_block) {
3346  statement_block->set_parent(this);
3347  }
3348  }
3349 
3350  void DerivativeBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3351  this->statement_block = statement_block;
3352  // set parents
3353  if (statement_block) {
3354  statement_block->set_parent(this);
3355  }
3356  }
3357 
3358 
3359 
3360  ///
3361  /// LinearBlock member functions definition
3362  ///
3363 
3364 
3365 
3366  std::string LinearBlock::get_node_name() const {
3367  return name->get_node_name();
3368  }
3369 
3370 
3371 
3372 
3373 
3374 
3375 
3377  /// use -> for pointer member
3378  name->accept(v);
3379  (void)v;
3380  /// visit each element of vector
3381  for (auto& item : this->solvefor) {
3382  item->accept(v);
3383  }
3384  (void)v;
3385  /// use -> for pointer member
3386  statement_block->accept(v);
3387  (void)v;
3388  }
3389 
3391  /// use -> for pointer member
3392  name->accept(v);
3393  (void)v;
3394  /// visit each element of vector
3395  for (auto& item : this->solvefor) {
3396  item->accept(v);
3397  }
3398  (void)v;
3399  /// use -> for pointer member
3400  statement_block->accept(v);
3401  (void)v;
3402  }
3403 
3405  v.visit_linear_block(*this);
3406  }
3407 
3409  v.visit_linear_block(*this);
3410  }
3411 
3412 
3413  LinearBlock::LinearBlock(Name* name, const NameVector& solvefor, StatementBlock* statement_block)
3414  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3415 
3416 
3417  LinearBlock::LinearBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
3418  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3419 
3420 
3421  /// copy constructor implementation
3423  /// pointer member must be reseted with the new copy
3424  if (obj.name) {
3425  this->name.reset(obj.name->clone());
3426  }
3427  /// copy each element of vector
3428  for (auto& item : obj.solvefor) {
3429  this->solvefor.emplace_back(item->clone());
3430  }
3431  /// pointer member must be reseted with the new copy
3432  if (obj.statement_block) {
3433  this->statement_block.reset(obj.statement_block->clone());
3434  }
3435 
3436  /// if there is a token, make copy
3437  if (obj.token) {
3438  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3439  }
3440 
3441  /// set parents
3443  }
3444 
3445 
3446  /// set this parent in the children
3448 
3449  /// optional member could be nullptr
3450  if (name) {
3451  name->set_parent(this);
3452  }
3453  /// set parent for each element of the vector
3454  for (auto& item : solvefor) {
3455  item->set_parent(this);
3456 
3457  }
3458  /// optional member could be nullptr
3459  if (statement_block) {
3460  statement_block->set_parent(this);
3461  }
3462 
3463  }
3464 
3465 
3466 
3467  void LinearBlock::set_name(std::shared_ptr<Name>&& name) {
3468  this->name = name;
3469  // set parents
3470  if (name) {
3471  name->set_parent(this);
3472  }
3473  }
3474 
3475  void LinearBlock::set_name(const std::shared_ptr<Name>& name) {
3476  this->name = name;
3477  // set parents
3478  if (name) {
3479  name->set_parent(this);
3480  }
3481  }
3482 
3483 
3485  this->solvefor = solvefor;
3486  // set parents
3487  for (auto& ii : solvefor) {
3488  ii->set_parent(this);
3489  }
3490  }
3491 
3492  void LinearBlock::set_solvefor(const NameVector& solvefor) {
3493  this->solvefor = solvefor;
3494  // set parents
3495  for (auto& ii : solvefor) {
3496  ii->set_parent(this);
3497  }
3498  }
3499 
3500 
3501  void LinearBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3503  // set parents
3504  if (statement_block) {
3505  statement_block->set_parent(this);
3506  }
3507  }
3508 
3509  void LinearBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3510  this->statement_block = statement_block;
3511  // set parents
3512  if (statement_block) {
3513  statement_block->set_parent(this);
3514  }
3515  }
3516 
3517 
3518 
3519  ///
3520  /// NonLinearBlock member functions definition
3521  ///
3522 
3523 
3524 
3525  std::string NonLinearBlock::get_node_name() const {
3526  return name->get_node_name();
3527  }
3528 
3529 
3530 
3531 
3532 
3533 
3534 
3536  /// use -> for pointer member
3537  name->accept(v);
3538  (void)v;
3539  /// visit each element of vector
3540  for (auto& item : this->solvefor) {
3541  item->accept(v);
3542  }
3543  (void)v;
3544  /// use -> for pointer member
3545  statement_block->accept(v);
3546  (void)v;
3547  }
3548 
3550  /// use -> for pointer member
3551  name->accept(v);
3552  (void)v;
3553  /// visit each element of vector
3554  for (auto& item : this->solvefor) {
3555  item->accept(v);
3556  }
3557  (void)v;
3558  /// use -> for pointer member
3559  statement_block->accept(v);
3560  (void)v;
3561  }
3562 
3564  v.visit_non_linear_block(*this);
3565  }
3566 
3568  v.visit_non_linear_block(*this);
3569  }
3570 
3571 
3572  NonLinearBlock::NonLinearBlock(Name* name, const NameVector& solvefor, StatementBlock* statement_block)
3573  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3574 
3575 
3576  NonLinearBlock::NonLinearBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
3577  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3578 
3579 
3580  /// copy constructor implementation
3582  /// pointer member must be reseted with the new copy
3583  if (obj.name) {
3584  this->name.reset(obj.name->clone());
3585  }
3586  /// copy each element of vector
3587  for (auto& item : obj.solvefor) {
3588  this->solvefor.emplace_back(item->clone());
3589  }
3590  /// pointer member must be reseted with the new copy
3591  if (obj.statement_block) {
3592  this->statement_block.reset(obj.statement_block->clone());
3593  }
3594 
3595  /// if there is a token, make copy
3596  if (obj.token) {
3597  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3598  }
3599 
3600  /// set parents
3602  }
3603 
3604 
3605  /// set this parent in the children
3607 
3608  /// optional member could be nullptr
3609  if (name) {
3610  name->set_parent(this);
3611  }
3612  /// set parent for each element of the vector
3613  for (auto& item : solvefor) {
3614  item->set_parent(this);
3615 
3616  }
3617  /// optional member could be nullptr
3618  if (statement_block) {
3619  statement_block->set_parent(this);
3620  }
3621 
3622  }
3623 
3624 
3625 
3626  void NonLinearBlock::set_name(std::shared_ptr<Name>&& name) {
3627  this->name = name;
3628  // set parents
3629  if (name) {
3630  name->set_parent(this);
3631  }
3632  }
3633 
3634  void NonLinearBlock::set_name(const std::shared_ptr<Name>& name) {
3635  this->name = name;
3636  // set parents
3637  if (name) {
3638  name->set_parent(this);
3639  }
3640  }
3641 
3642 
3644  this->solvefor = solvefor;
3645  // set parents
3646  for (auto& ii : solvefor) {
3647  ii->set_parent(this);
3648  }
3649  }
3650 
3652  this->solvefor = solvefor;
3653  // set parents
3654  for (auto& ii : solvefor) {
3655  ii->set_parent(this);
3656  }
3657  }
3658 
3659 
3660  void NonLinearBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3662  // set parents
3663  if (statement_block) {
3664  statement_block->set_parent(this);
3665  }
3666  }
3667 
3668  void NonLinearBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3669  this->statement_block = statement_block;
3670  // set parents
3671  if (statement_block) {
3672  statement_block->set_parent(this);
3673  }
3674  }
3675 
3676 
3677 
3678  ///
3679  /// DiscreteBlock member functions definition
3680  ///
3681 
3682 
3683 
3684  std::string DiscreteBlock::get_node_name() const {
3685  return name->get_node_name();
3686  }
3687 
3688 
3689 
3690 
3692  /// use -> for pointer member
3693  name->accept(v);
3694  (void)v;
3695  /// use -> for pointer member
3696  statement_block->accept(v);
3697  (void)v;
3698  }
3699 
3701  /// use -> for pointer member
3702  name->accept(v);
3703  (void)v;
3704  /// use -> for pointer member
3705  statement_block->accept(v);
3706  (void)v;
3707  }
3708 
3710  v.visit_discrete_block(*this);
3711  }
3712 
3714  v.visit_discrete_block(*this);
3715  }
3716 
3717 
3719  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3720 
3721 
3722  DiscreteBlock::DiscreteBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> statement_block)
3723  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3724 
3725 
3726  /// copy constructor implementation
3728  /// pointer member must be reseted with the new copy
3729  if (obj.name) {
3730  this->name.reset(obj.name->clone());
3731  }
3732  /// pointer member must be reseted with the new copy
3733  if (obj.statement_block) {
3734  this->statement_block.reset(obj.statement_block->clone());
3735  }
3736 
3737  /// if there is a token, make copy
3738  if (obj.token) {
3739  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3740  }
3741 
3742  /// set parents
3744  }
3745 
3746 
3747  /// set this parent in the children
3749 
3750  /// optional member could be nullptr
3751  if (name) {
3752  name->set_parent(this);
3753  }
3754  /// optional member could be nullptr
3755  if (statement_block) {
3756  statement_block->set_parent(this);
3757  }
3758 
3759  }
3760 
3761 
3762 
3763  void DiscreteBlock::set_name(std::shared_ptr<Name>&& name) {
3764  this->name = name;
3765  // set parents
3766  if (name) {
3767  name->set_parent(this);
3768  }
3769  }
3770 
3771  void DiscreteBlock::set_name(const std::shared_ptr<Name>& name) {
3772  this->name = name;
3773  // set parents
3774  if (name) {
3775  name->set_parent(this);
3776  }
3777  }
3778 
3779 
3780  void DiscreteBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3782  // set parents
3783  if (statement_block) {
3784  statement_block->set_parent(this);
3785  }
3786  }
3787 
3788  void DiscreteBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3789  this->statement_block = statement_block;
3790  // set parents
3791  if (statement_block) {
3792  statement_block->set_parent(this);
3793  }
3794  }
3795 
3796 
3797 
3798  ///
3799  /// FunctionTableBlock member functions definition
3800  ///
3801 
3802 
3803 
3805  return name->get_node_name();
3806  }
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3815  /// use -> for pointer member
3816  name->accept(v);
3817  (void)v;
3818  /// visit each element of vector
3819  for (auto& item : this->parameters) {
3820  item->accept(v);
3821  }
3822  (void)v;
3823  /// optional member could be nullptr
3824  if (this->unit) {
3825  this->unit->accept(v);
3826  }
3827  (void)v;
3828  }
3829 
3831  /// use -> for pointer member
3832  name->accept(v);
3833  (void)v;
3834  /// visit each element of vector
3835  for (auto& item : this->parameters) {
3836  item->accept(v);
3837  }
3838  (void)v;
3839  /// optional member could be nullptr
3840  if (this->unit) {
3841  this->unit->accept(v);
3842  }
3843  (void)v;
3844  }
3845 
3847  v.visit_function_table_block(*this);
3848  }
3849 
3851  v.visit_function_table_block(*this);
3852  }
3853 
3854 
3856  : name(name), parameters(parameters), unit(unit) { set_parent_in_children(); }
3857 
3858 
3859  FunctionTableBlock::FunctionTableBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit)
3860  : name(name), parameters(parameters), unit(unit) { set_parent_in_children(); }
3861 
3862 
3863  /// copy constructor implementation
3865  /// pointer member must be reseted with the new copy
3866  if (obj.name) {
3867  this->name.reset(obj.name->clone());
3868  }
3869  /// copy each element of vector
3870  for (auto& item : obj.parameters) {
3871  this->parameters.emplace_back(item->clone());
3872  }
3873  /// pointer member must be reseted with the new copy
3874  if (obj.unit) {
3875  this->unit.reset(obj.unit->clone());
3876  }
3877 
3878  /// if there is a token, make copy
3879  if (obj.token) {
3880  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3881  }
3882 
3883  /// set parents
3885  }
3886 
3887 
3888  /// set this parent in the children
3890 
3891  /// optional member could be nullptr
3892  if (name) {
3893  name->set_parent(this);
3894  }
3895  /// set parent for each element of the vector
3896  for (auto& item : parameters) {
3897  item->set_parent(this);
3898 
3899  }
3900  /// optional member could be nullptr
3901  if (unit) {
3902  unit->set_parent(this);
3903  }
3904 
3905  }
3906 
3907 
3908 
3909  void FunctionTableBlock::set_name(std::shared_ptr<Name>&& name) {
3910  this->name = name;
3911  // set parents
3912  if (name) {
3913  name->set_parent(this);
3914  }
3915  }
3916 
3917  void FunctionTableBlock::set_name(const std::shared_ptr<Name>& name) {
3918  this->name = name;
3919  // set parents
3920  if (name) {
3921  name->set_parent(this);
3922  }
3923  }
3924 
3925 
3927  this->parameters = parameters;
3928  // set parents
3929  for (auto& ii : parameters) {
3930  ii->set_parent(this);
3931  }
3932  }
3933 
3935  this->parameters = parameters;
3936  // set parents
3937  for (auto& ii : parameters) {
3938  ii->set_parent(this);
3939  }
3940  }
3941 
3942 
3943  void FunctionTableBlock::set_unit(std::shared_ptr<Unit>&& unit) {
3944  this->unit = unit;
3945  // set parents
3946  if (unit) {
3947  unit->set_parent(this);
3948  }
3949  }
3950 
3951  void FunctionTableBlock::set_unit(const std::shared_ptr<Unit>& unit) {
3952  this->unit = unit;
3953  // set parents
3954  if (unit) {
3955  unit->set_parent(this);
3956  }
3957  }
3958 
3959 
3960 
3961  ///
3962  /// FunctionBlock member functions definition
3963  ///
3964 
3965 
3966 
3967  std::string FunctionBlock::get_node_name() const {
3968  return name->get_node_name();
3969  }
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3981  /// use -> for pointer member
3982  name->accept(v);
3983  (void)v;
3984  /// visit each element of vector
3985  for (auto& item : this->parameters) {
3986  item->accept(v);
3987  }
3988  (void)v;
3989  /// optional member could be nullptr
3990  if (this->unit) {
3991  this->unit->accept(v);
3992  }
3993  (void)v;
3994  /// use -> for pointer member
3995  statement_block->accept(v);
3996  (void)v;
3997  }
3998 
4000  /// use -> for pointer member
4001  name->accept(v);
4002  (void)v;
4003  /// visit each element of vector
4004  for (auto& item : this->parameters) {
4005  item->accept(v);
4006  }
4007  (void)v;
4008  /// optional member could be nullptr
4009  if (this->unit) {
4010  this->unit->accept(v);
4011  }
4012  (void)v;
4013  /// use -> for pointer member
4014  statement_block->accept(v);
4015  (void)v;
4016  }
4017 
4019  v.visit_function_block(*this);
4020  }
4021 
4023  v.visit_function_block(*this);
4024  }
4025 
4026 
4027  FunctionBlock::FunctionBlock(Name* name, const ArgumentVector& parameters, Unit* unit, StatementBlock* statement_block)
4028  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4029 
4030 
4031  FunctionBlock::FunctionBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit, std::shared_ptr<StatementBlock> statement_block)
4032  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4033 
4034 
4035  /// copy constructor implementation
4037  /// pointer member must be reseted with the new copy
4038  if (obj.name) {
4039  this->name.reset(obj.name->clone());
4040  }
4041  /// copy each element of vector
4042  for (auto& item : obj.parameters) {
4043  this->parameters.emplace_back(item->clone());
4044  }
4045  /// pointer member must be reseted with the new copy
4046  if (obj.unit) {
4047  this->unit.reset(obj.unit->clone());
4048  }
4049  /// pointer member must be reseted with the new copy
4050  if (obj.statement_block) {
4051  this->statement_block.reset(obj.statement_block->clone());
4052  }
4053 
4054  /// if there is a token, make copy
4055  if (obj.token) {
4056  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4057  }
4058 
4059  /// set parents
4061  }
4062 
4063 
4064  /// set this parent in the children
4066 
4067  /// optional member could be nullptr
4068  if (name) {
4069  name->set_parent(this);
4070  }
4071  /// set parent for each element of the vector
4072  for (auto& item : parameters) {
4073  item->set_parent(this);
4074 
4075  }
4076  /// optional member could be nullptr
4077  if (unit) {
4078  unit->set_parent(this);
4079  }
4080  /// optional member could be nullptr
4081  if (statement_block) {
4082  statement_block->set_parent(this);
4083  }
4084 
4085  }
4086 
4087 
4088 
4089  void FunctionBlock::set_name(std::shared_ptr<Name>&& name) {
4090  this->name = name;
4091  // set parents
4092  if (name) {
4093  name->set_parent(this);
4094  }
4095  }
4096 
4097  void FunctionBlock::set_name(const std::shared_ptr<Name>& name) {
4098  this->name = name;
4099  // set parents
4100  if (name) {
4101  name->set_parent(this);
4102  }
4103  }
4104 
4105 
4107  this->parameters = parameters;
4108  // set parents
4109  for (auto& ii : parameters) {
4110  ii->set_parent(this);
4111  }
4112  }
4113 
4115  this->parameters = parameters;
4116  // set parents
4117  for (auto& ii : parameters) {
4118  ii->set_parent(this);
4119  }
4120  }
4121 
4122 
4123  void FunctionBlock::set_unit(std::shared_ptr<Unit>&& unit) {
4124  this->unit = unit;
4125  // set parents
4126  if (unit) {
4127  unit->set_parent(this);
4128  }
4129  }
4130 
4131  void FunctionBlock::set_unit(const std::shared_ptr<Unit>& unit) {
4132  this->unit = unit;
4133  // set parents
4134  if (unit) {
4135  unit->set_parent(this);
4136  }
4137  }
4138 
4139 
4140  void FunctionBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4142  // set parents
4143  if (statement_block) {
4144  statement_block->set_parent(this);
4145  }
4146  }
4147 
4148  void FunctionBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4149  this->statement_block = statement_block;
4150  // set parents
4151  if (statement_block) {
4152  statement_block->set_parent(this);
4153  }
4154  }
4155 
4156 
4157 
4158  ///
4159  /// ProcedureBlock member functions definition
4160  ///
4161 
4162 
4163 
4164  std::string ProcedureBlock::get_node_name() const {
4165  return name->get_node_name();
4166  }
4167 
4168 
4169 
4170 
4171 
4172 
4173 
4174 
4175 
4176 
4178  /// use -> for pointer member
4179  name->accept(v);
4180  (void)v;
4181  /// visit each element of vector
4182  for (auto& item : this->parameters) {
4183  item->accept(v);
4184  }
4185  (void)v;
4186  /// optional member could be nullptr
4187  if (this->unit) {
4188  this->unit->accept(v);
4189  }
4190  (void)v;
4191  /// use -> for pointer member
4192  statement_block->accept(v);
4193  (void)v;
4194  }
4195 
4197  /// use -> for pointer member
4198  name->accept(v);
4199  (void)v;
4200  /// visit each element of vector
4201  for (auto& item : this->parameters) {
4202  item->accept(v);
4203  }
4204  (void)v;
4205  /// optional member could be nullptr
4206  if (this->unit) {
4207  this->unit->accept(v);
4208  }
4209  (void)v;
4210  /// use -> for pointer member
4211  statement_block->accept(v);
4212  (void)v;
4213  }
4214 
4216  v.visit_procedure_block(*this);
4217  }
4218 
4220  v.visit_procedure_block(*this);
4221  }
4222 
4223 
4224  ProcedureBlock::ProcedureBlock(Name* name, const ArgumentVector& parameters, Unit* unit, StatementBlock* statement_block)
4225  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4226 
4227 
4228  ProcedureBlock::ProcedureBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit, std::shared_ptr<StatementBlock> statement_block)
4229  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4230 
4231 
4232  /// copy constructor implementation
4234  /// pointer member must be reseted with the new copy
4235  if (obj.name) {
4236  this->name.reset(obj.name->clone());
4237  }
4238  /// copy each element of vector
4239  for (auto& item : obj.parameters) {
4240  this->parameters.emplace_back(item->clone());
4241  }
4242  /// pointer member must be reseted with the new copy
4243  if (obj.unit) {
4244  this->unit.reset(obj.unit->clone());
4245  }
4246  /// pointer member must be reseted with the new copy
4247  if (obj.statement_block) {
4248  this->statement_block.reset(obj.statement_block->clone());
4249  }
4250 
4251  /// if there is a token, make copy
4252  if (obj.token) {
4253  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4254  }
4255 
4256  /// set parents
4258  }
4259 
4260 
4261  /// set this parent in the children
4263 
4264  /// optional member could be nullptr
4265  if (name) {
4266  name->set_parent(this);
4267  }
4268  /// set parent for each element of the vector
4269  for (auto& item : parameters) {
4270  item->set_parent(this);
4271 
4272  }
4273  /// optional member could be nullptr
4274  if (unit) {
4275  unit->set_parent(this);
4276  }
4277  /// optional member could be nullptr
4278  if (statement_block) {
4279  statement_block->set_parent(this);
4280  }
4281 
4282  }
4283 
4284 
4285 
4286  void ProcedureBlock::set_name(std::shared_ptr<Name>&& name) {
4287  this->name = name;
4288  // set parents
4289  if (name) {
4290  name->set_parent(this);
4291  }
4292  }
4293 
4294  void ProcedureBlock::set_name(const std::shared_ptr<Name>& name) {
4295  this->name = name;
4296  // set parents
4297  if (name) {
4298  name->set_parent(this);
4299  }
4300  }
4301 
4302 
4304  this->parameters = parameters;
4305  // set parents
4306  for (auto& ii : parameters) {
4307  ii->set_parent(this);
4308  }
4309  }
4310 
4312  this->parameters = parameters;
4313  // set parents
4314  for (auto& ii : parameters) {
4315  ii->set_parent(this);
4316  }
4317  }
4318 
4319 
4320  void ProcedureBlock::set_unit(std::shared_ptr<Unit>&& unit) {
4321  this->unit = unit;
4322  // set parents
4323  if (unit) {
4324  unit->set_parent(this);
4325  }
4326  }
4327 
4328  void ProcedureBlock::set_unit(const std::shared_ptr<Unit>& unit) {
4329  this->unit = unit;
4330  // set parents
4331  if (unit) {
4332  unit->set_parent(this);
4333  }
4334  }
4335 
4336 
4337  void ProcedureBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4339  // set parents
4340  if (statement_block) {
4341  statement_block->set_parent(this);
4342  }
4343  }
4344 
4345  void ProcedureBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4346  this->statement_block = statement_block;
4347  // set parents
4348  if (statement_block) {
4349  statement_block->set_parent(this);
4350  }
4351  }
4352 
4353 
4354 
4355  ///
4356  /// NetReceiveBlock member functions definition
4357  ///
4358 
4359 
4360 
4361 
4362 
4363 
4364 
4365 
4367  /// visit each element of vector
4368  for (auto& item : this->parameters) {
4369  item->accept(v);
4370  }
4371  (void)v;
4372  /// use -> for pointer member
4373  statement_block->accept(v);
4374  (void)v;
4375  }
4376 
4378  /// visit each element of vector
4379  for (auto& item : this->parameters) {
4380  item->accept(v);
4381  }
4382  (void)v;
4383  /// use -> for pointer member
4384  statement_block->accept(v);
4385  (void)v;
4386  }
4387 
4389  v.visit_net_receive_block(*this);
4390  }
4391 
4393  v.visit_net_receive_block(*this);
4394  }
4395 
4396 
4398  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
4399 
4400 
4401  NetReceiveBlock::NetReceiveBlock(const ArgumentVector& parameters, std::shared_ptr<StatementBlock> statement_block)
4402  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
4403 
4404 
4405  /// copy constructor implementation
4407  /// copy each element of vector
4408  for (auto& item : obj.parameters) {
4409  this->parameters.emplace_back(item->clone());
4410  }
4411  /// pointer member must be reseted with the new copy
4412  if (obj.statement_block) {
4413  this->statement_block.reset(obj.statement_block->clone());
4414  }
4415 
4416  /// if there is a token, make copy
4417  if (obj.token) {
4418  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4419  }
4420 
4421  /// set parents
4423  }
4424 
4425 
4426  /// set this parent in the children
4428 
4429  /// set parent for each element of the vector
4430  for (auto& item : parameters) {
4431  item->set_parent(this);
4432 
4433  }
4434  /// optional member could be nullptr
4435  if (statement_block) {
4436  statement_block->set_parent(this);
4437  }
4438 
4439  }
4440 
4441 
4442 
4444  this->parameters = parameters;
4445  // set parents
4446  for (auto& ii : parameters) {
4447  ii->set_parent(this);
4448  }
4449  }
4450 
4452  this->parameters = parameters;
4453  // set parents
4454  for (auto& ii : parameters) {
4455  ii->set_parent(this);
4456  }
4457  }
4458 
4459 
4460  void NetReceiveBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4462  // set parents
4463  if (statement_block) {
4464  statement_block->set_parent(this);
4465  }
4466  }
4467 
4468  void NetReceiveBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4469  this->statement_block = statement_block;
4470  // set parents
4471  if (statement_block) {
4472  statement_block->set_parent(this);
4473  }
4474  }
4475 
4476 
4477 
4478  ///
4479  /// SolveBlock member functions definition
4480  ///
4481 
4482 
4483 
4484 
4485 
4486 
4487 
4488 
4489 
4490 
4491 
4493  /// use -> for pointer member
4494  block_name->accept(v);
4495  (void)v;
4496  /// optional member could be nullptr
4497  if (this->method) {
4498  this->method->accept(v);
4499  }
4500  (void)v;
4501  /// optional member could be nullptr
4502  if (this->steadystate) {
4503  this->steadystate->accept(v);
4504  }
4505  (void)v;
4506  }
4507 
4509  /// use -> for pointer member
4510  block_name->accept(v);
4511  (void)v;
4512  /// optional member could be nullptr
4513  if (this->method) {
4514  this->method->accept(v);
4515  }
4516  (void)v;
4517  /// optional member could be nullptr
4518  if (this->steadystate) {
4519  this->steadystate->accept(v);
4520  }
4521  (void)v;
4522  }
4523 
4525  v.visit_solve_block(*this);
4526  }
4527 
4529  v.visit_solve_block(*this);
4530  }
4531 
4532 
4533  SolveBlock::SolveBlock(Name* block_name, Name* method, Name* steadystate)
4534  : block_name(block_name), method(method), steadystate(steadystate) { set_parent_in_children(); }
4535 
4536 
4537  SolveBlock::SolveBlock(std::shared_ptr<Name> block_name, std::shared_ptr<Name> method, std::shared_ptr<Name> steadystate)
4538  : block_name(block_name), method(method), steadystate(steadystate) { set_parent_in_children(); }
4539 
4540 
4541  /// copy constructor implementation
4543  /// pointer member must be reseted with the new copy
4544  if (obj.block_name) {
4545  this->block_name.reset(obj.block_name->clone());
4546  }
4547  /// pointer member must be reseted with the new copy
4548  if (obj.method) {
4549  this->method.reset(obj.method->clone());
4550  }
4551  /// pointer member must be reseted with the new copy
4552  if (obj.steadystate) {
4553  this->steadystate.reset(obj.steadystate->clone());
4554  }
4555 
4556  /// if there is a token, make copy
4557  if (obj.token) {
4558  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4559  }
4560 
4561  /// set parents
4563  }
4564 
4565 
4566  /// set this parent in the children
4568 
4569  /// optional member could be nullptr
4570  if (block_name) {
4571  block_name->set_parent(this);
4572  }
4573  /// optional member could be nullptr
4574  if (method) {
4575  method->set_parent(this);
4576  }
4577  /// optional member could be nullptr
4578  if (steadystate) {
4579  steadystate->set_parent(this);
4580  }
4581 
4582  }
4583 
4584 
4585 
4586  void SolveBlock::set_block_name(std::shared_ptr<Name>&& block_name) {
4587  this->block_name = block_name;
4588  // set parents
4589  if (block_name) {
4590  block_name->set_parent(this);
4591  }
4592  }
4593 
4594  void SolveBlock::set_block_name(const std::shared_ptr<Name>& block_name) {
4595  this->block_name = block_name;
4596  // set parents
4597  if (block_name) {
4598  block_name->set_parent(this);
4599  }
4600  }
4601 
4602 
4603  void SolveBlock::set_method(std::shared_ptr<Name>&& method) {
4604  this->method = method;
4605  // set parents
4606  if (method) {
4607  method->set_parent(this);
4608  }
4609  }
4610 
4611  void SolveBlock::set_method(const std::shared_ptr<Name>& method) {
4612  this->method = method;
4613  // set parents
4614  if (method) {
4615  method->set_parent(this);
4616  }
4617  }
4618 
4619 
4620  void SolveBlock::set_steadystate(std::shared_ptr<Name>&& steadystate) {
4621  this->steadystate = steadystate;
4622  // set parents
4623  if (steadystate) {
4624  steadystate->set_parent(this);
4625  }
4626  }
4627 
4628  void SolveBlock::set_steadystate(const std::shared_ptr<Name>& steadystate) {
4629  this->steadystate = steadystate;
4630  // set parents
4631  if (steadystate) {
4632  steadystate->set_parent(this);
4633  }
4634  }
4635 
4636 
4637 
4638  ///
4639  /// BreakpointBlock member functions definition
4640  ///
4641 
4642 
4643 
4644 
4645 
4647  /// use -> for pointer member
4648  statement_block->accept(v);
4649  (void)v;
4650  }
4651 
4653  /// use -> for pointer member
4654  statement_block->accept(v);
4655  (void)v;
4656  }
4657 
4659  v.visit_breakpoint_block(*this);
4660  }
4661 
4663  v.visit_breakpoint_block(*this);
4664  }
4665 
4666 
4668  : statement_block(statement_block) { set_parent_in_children(); }
4669 
4670 
4671  BreakpointBlock::BreakpointBlock(std::shared_ptr<StatementBlock> statement_block)
4672  : statement_block(statement_block) { set_parent_in_children(); }
4673 
4674 
4675  /// copy constructor implementation
4677  /// pointer member must be reseted with the new copy
4678  if (obj.statement_block) {
4679  this->statement_block.reset(obj.statement_block->clone());
4680  }
4681 
4682  /// if there is a token, make copy
4683  if (obj.token) {
4684  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4685  }
4686 
4687  /// set parents
4689  }
4690 
4691 
4692  /// set this parent in the children
4694 
4695  /// optional member could be nullptr
4696  if (statement_block) {
4697  statement_block->set_parent(this);
4698  }
4699 
4700  }
4701 
4702 
4703 
4704  void BreakpointBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4706  // set parents
4707  if (statement_block) {
4708  statement_block->set_parent(this);
4709  }
4710  }
4711 
4712  void BreakpointBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4713  this->statement_block = statement_block;
4714  // set parents
4715  if (statement_block) {
4716  statement_block->set_parent(this);
4717  }
4718  }
4719 
4720 
4721 
4722  ///
4723  /// BeforeBlock member functions definition
4724  ///
4725 
4726 
4727 
4728 
4729 
4731  /// use -> for pointer member
4732  bablock->accept(v);
4733  (void)v;
4734  }
4735 
4737  /// use -> for pointer member
4738  bablock->accept(v);
4739  (void)v;
4740  }
4741 
4743  v.visit_before_block(*this);
4744  }
4745 
4747  v.visit_before_block(*this);
4748  }
4749 
4750 
4752  : bablock(bablock) { set_parent_in_children(); }
4753 
4754 
4755  BeforeBlock::BeforeBlock(std::shared_ptr<BABlock> bablock)
4756  : bablock(bablock) { set_parent_in_children(); }
4757 
4758 
4759  /// copy constructor implementation
4761  /// pointer member must be reseted with the new copy
4762  if (obj.bablock) {
4763  this->bablock.reset(obj.bablock->clone());
4764  }
4765 
4766  /// if there is a token, make copy
4767  if (obj.token) {
4768  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4769  }
4770 
4771  /// set parents
4773  }
4774 
4775 
4776  /// set this parent in the children
4778 
4779  /// optional member could be nullptr
4780  if (bablock) {
4781  bablock->set_parent(this);
4782  }
4783 
4784  }
4785 
4786 
4787 
4788  void BeforeBlock::set_bablock(std::shared_ptr<BABlock>&& bablock) {
4789  this->bablock = bablock;
4790  // set parents
4791  if (bablock) {
4792  bablock->set_parent(this);
4793  }
4794  }
4795 
4796  void BeforeBlock::set_bablock(const std::shared_ptr<BABlock>& bablock) {
4797  this->bablock = bablock;
4798  // set parents
4799  if (bablock) {
4800  bablock->set_parent(this);
4801  }
4802  }
4803 
4804 
4805 
4806  ///
4807  /// AfterBlock member functions definition
4808  ///
4809 
4810 
4811 
4812 
4813 
4815  /// use -> for pointer member
4816  bablock->accept(v);
4817  (void)v;
4818  }
4819 
4821  /// use -> for pointer member
4822  bablock->accept(v);
4823  (void)v;
4824  }
4825 
4827  v.visit_after_block(*this);
4828  }
4829 
4831  v.visit_after_block(*this);
4832  }
4833 
4834 
4836  : bablock(bablock) { set_parent_in_children(); }
4837 
4838 
4839  AfterBlock::AfterBlock(std::shared_ptr<BABlock> bablock)
4840  : bablock(bablock) { set_parent_in_children(); }
4841 
4842 
4843  /// copy constructor implementation
4845  /// pointer member must be reseted with the new copy
4846  if (obj.bablock) {
4847  this->bablock.reset(obj.bablock->clone());
4848  }
4849 
4850  /// if there is a token, make copy
4851  if (obj.token) {
4852  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4853  }
4854 
4855  /// set parents
4857  }
4858 
4859 
4860  /// set this parent in the children
4862 
4863  /// optional member could be nullptr
4864  if (bablock) {
4865  bablock->set_parent(this);
4866  }
4867 
4868  }
4869 
4870 
4871 
4872  void AfterBlock::set_bablock(std::shared_ptr<BABlock>&& bablock) {
4873  this->bablock = bablock;
4874  // set parents
4875  if (bablock) {
4876  bablock->set_parent(this);
4877  }
4878  }
4879 
4880  void AfterBlock::set_bablock(const std::shared_ptr<BABlock>& bablock) {
4881  this->bablock = bablock;
4882  // set parents
4883  if (bablock) {
4884  bablock->set_parent(this);
4885  }
4886  }
4887 
4888 
4889 
4890  ///
4891  /// BABlock member functions definition
4892  ///
4893 
4894 
4895 
4896 
4897 
4898 
4899 
4900 
4902  /// use -> for pointer member
4903  type->accept(v);
4904  (void)v;
4905  /// use -> for pointer member
4906  statement_block->accept(v);
4907  (void)v;
4908  }
4909 
4911  /// use -> for pointer member
4912  type->accept(v);
4913  (void)v;
4914  /// use -> for pointer member
4915  statement_block->accept(v);
4916  (void)v;
4917  }
4918 
4920  v.visit_ba_block(*this);
4921  }
4922 
4924  v.visit_ba_block(*this);
4925  }
4926 
4927 
4929  : type(type), statement_block(statement_block) { set_parent_in_children(); }
4930 
4931 
4932  BABlock::BABlock(std::shared_ptr<BABlockType> type, std::shared_ptr<StatementBlock> statement_block)
4933  : type(type), statement_block(statement_block) { set_parent_in_children(); }
4934 
4935 
4936  /// copy constructor implementation
4938  /// pointer member must be reseted with the new copy
4939  if (obj.type) {
4940  this->type.reset(obj.type->clone());
4941  }
4942  /// pointer member must be reseted with the new copy
4943  if (obj.statement_block) {
4944  this->statement_block.reset(obj.statement_block->clone());
4945  }
4946 
4947  /// if there is a token, make copy
4948  if (obj.token) {
4949  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4950  }
4951 
4952  /// set parents
4954  }
4955 
4956 
4957  /// set this parent in the children
4959 
4960  /// optional member could be nullptr
4961  if (type) {
4962  type->set_parent(this);
4963  }
4964  /// optional member could be nullptr
4965  if (statement_block) {
4966  statement_block->set_parent(this);
4967  }
4968 
4969  }
4970 
4971 
4972 
4973  void BABlock::set_type(std::shared_ptr<BABlockType>&& type) {
4974  this->type = type;
4975  // set parents
4976  if (type) {
4977  type->set_parent(this);
4978  }
4979  }
4980 
4981  void BABlock::set_type(const std::shared_ptr<BABlockType>& type) {
4982  this->type = type;
4983  // set parents
4984  if (type) {
4985  type->set_parent(this);
4986  }
4987  }
4988 
4989 
4990  void BABlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4992  // set parents
4993  if (statement_block) {
4994  statement_block->set_parent(this);
4995  }
4996  }
4997 
4998  void BABlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4999  this->statement_block = statement_block;
5000  // set parents
5001  if (statement_block) {
5002  statement_block->set_parent(this);
5003  }
5004  }
5005 
5006 
5007 
5008  ///
5009  /// ForNetcon member functions definition
5010  ///
5011 
5012 
5013 
5014 
5015 
5016 
5017 
5018 
5020  /// visit each element of vector
5021  for (auto& item : this->parameters) {
5022  item->accept(v);
5023  }
5024  (void)v;
5025  /// use -> for pointer member
5026  statement_block->accept(v);
5027  (void)v;
5028  }
5029 
5031  /// visit each element of vector
5032  for (auto& item : this->parameters) {
5033  item->accept(v);
5034  }
5035  (void)v;
5036  /// use -> for pointer member
5037  statement_block->accept(v);
5038  (void)v;
5039  }
5040 
5042  v.visit_for_netcon(*this);
5043  }
5044 
5046  v.visit_for_netcon(*this);
5047  }
5048 
5049 
5050  ForNetcon::ForNetcon(const ArgumentVector& parameters, StatementBlock* statement_block)
5051  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
5052 
5053 
5054  ForNetcon::ForNetcon(const ArgumentVector& parameters, std::shared_ptr<StatementBlock> statement_block)
5055  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
5056 
5057 
5058  /// copy constructor implementation
5060  /// copy each element of vector
5061  for (auto& item : obj.parameters) {
5062  this->parameters.emplace_back(item->clone());
5063  }
5064  /// pointer member must be reseted with the new copy
5065  if (obj.statement_block) {
5066  this->statement_block.reset(obj.statement_block->clone());
5067  }
5068 
5069  /// if there is a token, make copy
5070  if (obj.token) {
5071  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5072  }
5073 
5074  /// set parents
5076  }
5077 
5078 
5079  /// set this parent in the children
5081 
5082  /// set parent for each element of the vector
5083  for (auto& item : parameters) {
5084  item->set_parent(this);
5085 
5086  }
5087  /// optional member could be nullptr
5088  if (statement_block) {
5089  statement_block->set_parent(this);
5090  }
5091 
5092  }
5093 
5094 
5095 
5097  this->parameters = parameters;
5098  // set parents
5099  for (auto& ii : parameters) {
5100  ii->set_parent(this);
5101  }
5102  }
5103 
5104  void ForNetcon::set_parameters(const ArgumentVector& parameters) {
5105  this->parameters = parameters;
5106  // set parents
5107  for (auto& ii : parameters) {
5108  ii->set_parent(this);
5109  }
5110  }
5111 
5112 
5113  void ForNetcon::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5115  // set parents
5116  if (statement_block) {
5117  statement_block->set_parent(this);
5118  }
5119  }
5120 
5121  void ForNetcon::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5122  this->statement_block = statement_block;
5123  // set parents
5124  if (statement_block) {
5125  statement_block->set_parent(this);
5126  }
5127  }
5128 
5129 
5130 
5131  ///
5132  /// KineticBlock member functions definition
5133  ///
5134 
5135 
5136 
5137  std::string KineticBlock::get_node_name() const {
5138  return name->get_node_name();
5139  }
5140 
5141 
5142 
5143 
5144 
5145 
5146 
5148  /// use -> for pointer member
5149  name->accept(v);
5150  (void)v;
5151  /// visit each element of vector
5152  for (auto& item : this->solvefor) {
5153  item->accept(v);
5154  }
5155  (void)v;
5156  /// use -> for pointer member
5157  statement_block->accept(v);
5158  (void)v;
5159  }
5160 
5162  /// use -> for pointer member
5163  name->accept(v);
5164  (void)v;
5165  /// visit each element of vector
5166  for (auto& item : this->solvefor) {
5167  item->accept(v);
5168  }
5169  (void)v;
5170  /// use -> for pointer member
5171  statement_block->accept(v);
5172  (void)v;
5173  }
5174 
5176  v.visit_kinetic_block(*this);
5177  }
5178 
5180  v.visit_kinetic_block(*this);
5181  }
5182 
5183 
5184  KineticBlock::KineticBlock(Name* name, const NameVector& solvefor, StatementBlock* statement_block)
5185  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
5186 
5187 
5188  KineticBlock::KineticBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
5189  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
5190 
5191 
5192  /// copy constructor implementation
5194  /// pointer member must be reseted with the new copy
5195  if (obj.name) {
5196  this->name.reset(obj.name->clone());
5197  }
5198  /// copy each element of vector
5199  for (auto& item : obj.solvefor) {
5200  this->solvefor.emplace_back(item->clone());
5201  }
5202  /// pointer member must be reseted with the new copy
5203  if (obj.statement_block) {
5204  this->statement_block.reset(obj.statement_block->clone());
5205  }
5206 
5207  /// if there is a token, make copy
5208  if (obj.token) {
5209  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5210  }
5211 
5212  /// set parents
5214  }
5215 
5216 
5217  /// set this parent in the children
5219 
5220  /// optional member could be nullptr
5221  if (name) {
5222  name->set_parent(this);
5223  }
5224  /// set parent for each element of the vector
5225  for (auto& item : solvefor) {
5226  item->set_parent(this);
5227 
5228  }
5229  /// optional member could be nullptr
5230  if (statement_block) {
5231  statement_block->set_parent(this);
5232  }
5233 
5234  }
5235 
5236 
5237 
5238  void KineticBlock::set_name(std::shared_ptr<Name>&& name) {
5239  this->name = name;
5240  // set parents
5241  if (name) {
5242  name->set_parent(this);
5243  }
5244  }
5245 
5246  void KineticBlock::set_name(const std::shared_ptr<Name>& name) {
5247  this->name = name;
5248  // set parents
5249  if (name) {
5250  name->set_parent(this);
5251  }
5252  }
5253 
5254 
5256  this->solvefor = solvefor;
5257  // set parents
5258  for (auto& ii : solvefor) {
5259  ii->set_parent(this);
5260  }
5261  }
5262 
5263  void KineticBlock::set_solvefor(const NameVector& solvefor) {
5264  this->solvefor = solvefor;
5265  // set parents
5266  for (auto& ii : solvefor) {
5267  ii->set_parent(this);
5268  }
5269  }
5270 
5271 
5272  void KineticBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5274  // set parents
5275  if (statement_block) {
5276  statement_block->set_parent(this);
5277  }
5278  }
5279 
5280  void KineticBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5281  this->statement_block = statement_block;
5282  // set parents
5283  if (statement_block) {
5284  statement_block->set_parent(this);
5285  }
5286  }
5287 
5288 
5289 
5290  ///
5291  /// UnitBlock member functions definition
5292  ///
5293 
5294 
5295 
5296 
5297 
5299  /// visit each element of vector
5300  for (auto& item : this->definitions) {
5301  item->accept(v);
5302  }
5303  (void)v;
5304  }
5305 
5307  /// visit each element of vector
5308  for (auto& item : this->definitions) {
5309  item->accept(v);
5310  }
5311  (void)v;
5312  }
5313 
5315  v.visit_unit_block(*this);
5316  }
5317 
5319  v.visit_unit_block(*this);
5320  }
5321 
5322 
5324  : definitions(definitions) { set_parent_in_children(); }
5325 
5326 
5327 
5328  /// copy constructor implementation
5330  /// copy each element of vector
5331  for (auto& item : obj.definitions) {
5332  this->definitions.emplace_back(item->clone());
5333  }
5334 
5335  /// if there is a token, make copy
5336  if (obj.token) {
5337  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5338  }
5339 
5340  /// set parents
5342  }
5343 
5344 
5345  /// set this parent in the children
5347 
5348  /// set parent for each element of the vector
5349  for (auto& item : definitions) {
5350  item->set_parent(this);
5351 
5352  }
5353 
5354  }
5355 
5356 
5357 
5359  this->definitions = definitions;
5360  // set parents
5361  for (auto& ii : definitions) {
5362  ii->set_parent(this);
5363  }
5364  }
5365 
5367  this->definitions = definitions;
5368  // set parents
5369  for (auto& ii : definitions) {
5370  ii->set_parent(this);
5371  }
5372  }
5373 
5374 
5375 
5376  ///
5377  /// ConstantBlock member functions definition
5378  ///
5379 
5380 
5381 
5382 
5383 
5385  /// visit each element of vector
5386  for (auto& item : this->statements) {
5387  item->accept(v);
5388  }
5389  (void)v;
5390  }
5391 
5393  /// visit each element of vector
5394  for (auto& item : this->statements) {
5395  item->accept(v);
5396  }
5397  (void)v;
5398  }
5399 
5401  v.visit_constant_block(*this);
5402  }
5403 
5405  v.visit_constant_block(*this);
5406  }
5407 
5408 
5410  : statements(statements) { set_parent_in_children(); }
5411 
5412 
5413 
5414  /// copy constructor implementation
5416  /// copy each element of vector
5417  for (auto& item : obj.statements) {
5418  this->statements.emplace_back(item->clone());
5419  }
5420 
5421  /// if there is a token, make copy
5422  if (obj.token) {
5423  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5424  }
5425 
5426  /// set parents
5428  }
5429 
5430 
5431  /// set this parent in the children
5433 
5434  /// set parent for each element of the vector
5435  for (auto& item : statements) {
5436  item->set_parent(this);
5437 
5438  }
5439 
5440  }
5441 
5442 
5443 
5445  this->statements = statements;
5446  // set parents
5447  for (auto& ii : statements) {
5448  ii->set_parent(this);
5449  }
5450  }
5451 
5453  this->statements = statements;
5454  // set parents
5455  for (auto& ii : statements) {
5456  ii->set_parent(this);
5457  }
5458  }
5459 
5460 
5461 
5462  ///
5463  /// NeuronBlock member functions definition
5464  ///
5465 
5466 
5467 
5468 
5469 
5471  /// use -> for pointer member
5472  statement_block->accept(v);
5473  (void)v;
5474  }
5475 
5477  /// use -> for pointer member
5478  statement_block->accept(v);
5479  (void)v;
5480  }
5481 
5483  v.visit_neuron_block(*this);
5484  }
5485 
5487  v.visit_neuron_block(*this);
5488  }
5489 
5490 
5492  : statement_block(statement_block) { set_parent_in_children(); }
5493 
5494 
5495  NeuronBlock::NeuronBlock(std::shared_ptr<StatementBlock> statement_block)
5496  : statement_block(statement_block) { set_parent_in_children(); }
5497 
5498 
5499  /// copy constructor implementation
5501  /// pointer member must be reseted with the new copy
5502  if (obj.statement_block) {
5503  this->statement_block.reset(obj.statement_block->clone());
5504  }
5505 
5506  /// if there is a token, make copy
5507  if (obj.token) {
5508  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5509  }
5510 
5511  /// set parents
5513  }
5514 
5515 
5516  /// set this parent in the children
5518 
5519  /// optional member could be nullptr
5520  if (statement_block) {
5521  statement_block->set_parent(this);
5522  }
5523 
5524  }
5525 
5526 
5527 
5528  void NeuronBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5530  // set parents
5531  if (statement_block) {
5532  statement_block->set_parent(this);
5533  }
5534  }
5535 
5536  void NeuronBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5537  this->statement_block = statement_block;
5538  // set parents
5539  if (statement_block) {
5540  statement_block->set_parent(this);
5541  }
5542  }
5543 
5544 
5545 
5546  ///
5547  /// Unit member functions definition
5548  ///
5549 
5550 
5551 
5552  std::string Unit::get_node_name() const {
5553  return name->eval();
5554  }
5555 
5557  /// use -> for pointer member
5558  name->accept(v);
5559  (void)v;
5560  }
5561 
5563  /// use -> for pointer member
5564  name->accept(v);
5565  (void)v;
5566  }
5567 
5569  v.visit_unit(*this);
5570  }
5571 
5573  v.visit_unit(*this);
5574  }
5575 
5576 
5578  : name(name) { set_parent_in_children(); }
5579 
5580 
5581  Unit::Unit(std::shared_ptr<String> name)
5582  : name(name) { set_parent_in_children(); }
5583 
5584 
5585  /// copy constructor implementation
5586  Unit::Unit(const Unit& obj) {
5587  /// pointer member must be reseted with the new copy
5588  if (obj.name) {
5589  this->name.reset(obj.name->clone());
5590  }
5591 
5592  /// if there is a token, make copy
5593  if (obj.token) {
5594  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5595  }
5596 
5597  /// set parents
5599  }
5600 
5601 
5602  /// set this parent in the children
5604 
5605  /// optional member could be nullptr
5606  if (name) {
5607  name->set_parent(this);
5608  }
5609 
5610  }
5611 
5612 
5613 
5614  void Unit::set_name(std::shared_ptr<String>&& name) {
5615  this->name = name;
5616  // set parents
5617  if (name) {
5618  name->set_parent(this);
5619  }
5620  }
5621 
5622  void Unit::set_name(const std::shared_ptr<String>& name) {
5623  this->name = name;
5624  // set parents
5625  if (name) {
5626  name->set_parent(this);
5627  }
5628  }
5629 
5630 
5631 
5632  ///
5633  /// DoubleUnit member functions definition
5634  ///
5635 
5636 
5637 
5638 
5639 
5640 
5641 
5642 
5644  /// use -> for pointer member
5645  value->accept(v);
5646  (void)v;
5647  /// optional member could be nullptr
5648  if (this->unit) {
5649  this->unit->accept(v);
5650  }
5651  (void)v;
5652  }
5653 
5655  /// use -> for pointer member
5656  value->accept(v);
5657  (void)v;
5658  /// optional member could be nullptr
5659  if (this->unit) {
5660  this->unit->accept(v);
5661  }
5662  (void)v;
5663  }
5664 
5666  v.visit_double_unit(*this);
5667  }
5668 
5670  v.visit_double_unit(*this);
5671  }
5672 
5673 
5675  : value(value), unit(unit) { set_parent_in_children(); }
5676 
5677 
5678  DoubleUnit::DoubleUnit(std::shared_ptr<Double> value, std::shared_ptr<Unit> unit)
5679  : value(value), unit(unit) { set_parent_in_children(); }
5680 
5681 
5682  /// copy constructor implementation
5684  /// pointer member must be reseted with the new copy
5685  if (obj.value) {
5686  this->value.reset(obj.value->clone());
5687  }
5688  /// pointer member must be reseted with the new copy
5689  if (obj.unit) {
5690  this->unit.reset(obj.unit->clone());
5691  }
5692 
5693  /// if there is a token, make copy
5694  if (obj.token) {
5695  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5696  }
5697 
5698  /// set parents
5700  }
5701 
5702 
5703  /// set this parent in the children
5705 
5706  /// optional member could be nullptr
5707  if (value) {
5708  value->set_parent(this);
5709  }
5710  /// optional member could be nullptr
5711  if (unit) {
5712  unit->set_parent(this);
5713  }
5714 
5715  }
5716 
5717 
5718 
5719  void DoubleUnit::set_value(std::shared_ptr<Double>&& value) {
5720  this->value = value;
5721  // set parents
5722  if (value) {
5723  value->set_parent(this);
5724  }
5725  }
5726 
5727  void DoubleUnit::set_value(const std::shared_ptr<Double>& value) {
5728  this->value = value;
5729  // set parents
5730  if (value) {
5731  value->set_parent(this);
5732  }
5733  }
5734 
5735 
5736  void DoubleUnit::set_unit(std::shared_ptr<Unit>&& unit) {
5737  this->unit = unit;
5738  // set parents
5739  if (unit) {
5740  unit->set_parent(this);
5741  }
5742  }
5743 
5744  void DoubleUnit::set_unit(const std::shared_ptr<Unit>& unit) {
5745  this->unit = unit;
5746  // set parents
5747  if (unit) {
5748  unit->set_parent(this);
5749  }
5750  }
5751 
5752 
5753 
5754  ///
5755  /// LocalVar member functions definition
5756  ///
5757 
5758 
5759 
5760  std::string LocalVar::get_node_name() const {
5761  return name->get_node_name();
5762  }
5763 
5765  /// use -> for pointer member
5766  name->accept(v);
5767  (void)v;
5768  }
5769 
5771  /// use -> for pointer member
5772  name->accept(v);
5773  (void)v;
5774  }
5775 
5777  v.visit_local_var(*this);
5778  }
5779 
5781  v.visit_local_var(*this);
5782  }
5783 
5784 
5786  : name(name) { set_parent_in_children(); }
5787 
5788 
5789  LocalVar::LocalVar(std::shared_ptr<Identifier> name)
5790  : name(name) { set_parent_in_children(); }
5791 
5792 
5793  /// copy constructor implementation
5795  /// pointer member must be reseted with the new copy
5796  if (obj.name) {
5797  this->name.reset(obj.name->clone());
5798  }
5799 
5800  /// if there is a token, make copy
5801  if (obj.token) {
5802  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5803  }
5804 
5805  /// set parents
5807  }
5808 
5809 
5810  /// set this parent in the children
5812 
5813  /// optional member could be nullptr
5814  if (name) {
5815  name->set_parent(this);
5816  }
5817 
5818  }
5819 
5820 
5821 
5822  void LocalVar::set_name(std::shared_ptr<Identifier>&& name) {
5823  this->name = name;
5824  // set parents
5825  if (name) {
5826  name->set_parent(this);
5827  }
5828  }
5829 
5830  void LocalVar::set_name(const std::shared_ptr<Identifier>& name) {
5831  this->name = name;
5832  // set parents
5833  if (name) {
5834  name->set_parent(this);
5835  }
5836  }
5837 
5838 
5839 
5840  ///
5841  /// Limits member functions definition
5842  ///
5843 
5844 
5845 
5846 
5847 
5848 
5849 
5850 
5852  /// use -> for pointer member
5853  min->accept(v);
5854  (void)v;
5855  /// use -> for pointer member
5856  max->accept(v);
5857  (void)v;
5858  }
5859 
5861  /// use -> for pointer member
5862  min->accept(v);
5863  (void)v;
5864  /// use -> for pointer member
5865  max->accept(v);
5866  (void)v;
5867  }
5868 
5870  v.visit_limits(*this);
5871  }
5872 
5874  v.visit_limits(*this);
5875  }
5876 
5877 
5879  : min(min), max(max) { set_parent_in_children(); }
5880 
5881 
5882  Limits::Limits(std::shared_ptr<Number> min, std::shared_ptr<Number> max)
5883  : min(min), max(max) { set_parent_in_children(); }
5884 
5885 
5886  /// copy constructor implementation
5887  Limits::Limits(const Limits& obj) {
5888  /// pointer member must be reseted with the new copy
5889  if (obj.min) {
5890  this->min.reset(obj.min->clone());
5891  }
5892  /// pointer member must be reseted with the new copy
5893  if (obj.max) {
5894  this->max.reset(obj.max->clone());
5895  }
5896 
5897  /// if there is a token, make copy
5898  if (obj.token) {
5899  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5900  }
5901 
5902  /// set parents
5904  }
5905 
5906 
5907  /// set this parent in the children
5909 
5910  /// optional member could be nullptr
5911  if (min) {
5912  min->set_parent(this);
5913  }
5914  /// optional member could be nullptr
5915  if (max) {
5916  max->set_parent(this);
5917  }
5918 
5919  }
5920 
5921 
5922 
5923  void Limits::set_min(std::shared_ptr<Number>&& min) {
5924  this->min = min;
5925  // set parents
5926  if (min) {
5927  min->set_parent(this);
5928  }
5929  }
5930 
5931  void Limits::set_min(const std::shared_ptr<Number>& min) {
5932  this->min = min;
5933  // set parents
5934  if (min) {
5935  min->set_parent(this);
5936  }
5937  }
5938 
5939 
5940  void Limits::set_max(std::shared_ptr<Number>&& max) {
5941  this->max = max;
5942  // set parents
5943  if (max) {
5944  max->set_parent(this);
5945  }
5946  }
5947 
5948  void Limits::set_max(const std::shared_ptr<Number>& max) {
5949  this->max = max;
5950  // set parents
5951  if (max) {
5952  max->set_parent(this);
5953  }
5954  }
5955 
5956 
5957 
5958  ///
5959  /// NumberRange member functions definition
5960  ///
5961 
5962 
5963 
5964 
5965 
5966 
5967 
5968 
5970  /// use -> for pointer member
5971  min->accept(v);
5972  (void)v;
5973  /// use -> for pointer member
5974  max->accept(v);
5975  (void)v;
5976  }
5977 
5979  /// use -> for pointer member
5980  min->accept(v);
5981  (void)v;
5982  /// use -> for pointer member
5983  max->accept(v);
5984  (void)v;
5985  }
5986 
5988  v.visit_number_range(*this);
5989  }
5990 
5992  v.visit_number_range(*this);
5993  }
5994 
5995 
5997  : min(min), max(max) { set_parent_in_children(); }
5998 
5999 
6000  NumberRange::NumberRange(std::shared_ptr<Number> min, std::shared_ptr<Number> max)
6001  : min(min), max(max) { set_parent_in_children(); }
6002 
6003 
6004  /// copy constructor implementation
6006  /// pointer member must be reseted with the new copy
6007  if (obj.min) {
6008  this->min.reset(obj.min->clone());
6009  }
6010  /// pointer member must be reseted with the new copy
6011  if (obj.max) {
6012  this->max.reset(obj.max->clone());
6013  }
6014 
6015  /// if there is a token, make copy
6016  if (obj.token) {
6017  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6018  }
6019 
6020  /// set parents
6022  }
6023 
6024 
6025  /// set this parent in the children
6027 
6028  /// optional member could be nullptr
6029  if (min) {
6030  min->set_parent(this);
6031  }
6032  /// optional member could be nullptr
6033  if (max) {
6034  max->set_parent(this);
6035  }
6036 
6037  }
6038 
6039 
6040 
6041  void NumberRange::set_min(std::shared_ptr<Number>&& min) {
6042  this->min = min;
6043  // set parents
6044  if (min) {
6045  min->set_parent(this);
6046  }
6047  }
6048 
6049  void NumberRange::set_min(const std::shared_ptr<Number>& min) {
6050  this->min = min;
6051  // set parents
6052  if (min) {
6053  min->set_parent(this);
6054  }
6055  }
6056 
6057 
6058  void NumberRange::set_max(std::shared_ptr<Number>&& max) {
6059  this->max = max;
6060  // set parents
6061  if (max) {
6062  max->set_parent(this);
6063  }
6064  }
6065 
6066  void NumberRange::set_max(const std::shared_ptr<Number>& max) {
6067  this->max = max;
6068  // set parents
6069  if (max) {
6070  max->set_parent(this);
6071  }
6072  }
6073 
6074 
6075 
6076  ///
6077  /// ConstantVar member functions definition
6078  ///
6079 
6080 
6081 
6082  std::string ConstantVar::get_node_name() const {
6083  return name->get_node_name();
6084  }
6085 
6086 
6087 
6088 
6089 
6090 
6091 
6093  /// use -> for pointer member
6094  name->accept(v);
6095  (void)v;
6096  /// use -> for pointer member
6097  value->accept(v);
6098  (void)v;
6099  /// optional member could be nullptr
6100  if (this->unit) {
6101  this->unit->accept(v);
6102  }
6103  (void)v;
6104  }
6105 
6107  /// use -> for pointer member
6108  name->accept(v);
6109  (void)v;
6110  /// use -> for pointer member
6111  value->accept(v);
6112  (void)v;
6113  /// optional member could be nullptr
6114  if (this->unit) {
6115  this->unit->accept(v);
6116  }
6117  (void)v;
6118  }
6119 
6121  v.visit_constant_var(*this);
6122  }
6123 
6125  v.visit_constant_var(*this);
6126  }
6127 
6128 
6130  : name(name), value(value), unit(unit) { set_parent_in_children(); }
6131 
6132 
6133  ConstantVar::ConstantVar(std::shared_ptr<Name> name, std::shared_ptr<Number> value, std::shared_ptr<Unit> unit)
6134  : name(name), value(value), unit(unit) { set_parent_in_children(); }
6135 
6136 
6137  /// copy constructor implementation
6139  /// pointer member must be reseted with the new copy
6140  if (obj.name) {
6141  this->name.reset(obj.name->clone());
6142  }
6143  /// pointer member must be reseted with the new copy
6144  if (obj.value) {
6145  this->value.reset(obj.value->clone());
6146  }
6147  /// pointer member must be reseted with the new copy
6148  if (obj.unit) {
6149  this->unit.reset(obj.unit->clone());
6150  }
6151 
6152  /// if there is a token, make copy
6153  if (obj.token) {
6154  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6155  }
6156 
6157  /// set parents
6159  }
6160 
6161 
6162  /// set this parent in the children
6164 
6165  /// optional member could be nullptr
6166  if (name) {
6167  name->set_parent(this);
6168  }
6169  /// optional member could be nullptr
6170  if (value) {
6171  value->set_parent(this);
6172  }
6173  /// optional member could be nullptr
6174  if (unit) {
6175  unit->set_parent(this);
6176  }
6177 
6178  }
6179 
6180 
6181 
6182  void ConstantVar::set_name(std::shared_ptr<Name>&& name) {
6183  this->name = name;
6184  // set parents
6185  if (name) {
6186  name->set_parent(this);
6187  }
6188  }
6189 
6190  void ConstantVar::set_name(const std::shared_ptr<Name>& name) {
6191  this->name = name;
6192  // set parents
6193  if (name) {
6194  name->set_parent(this);
6195  }
6196  }
6197 
6198 
6199  void ConstantVar::set_value(std::shared_ptr<Number>&& value) {
6200  this->value = value;
6201  // set parents
6202  if (value) {
6203  value->set_parent(this);
6204  }
6205  }
6206 
6207  void ConstantVar::set_value(const std::shared_ptr<Number>& value) {
6208  this->value = value;
6209  // set parents
6210  if (value) {
6211  value->set_parent(this);
6212  }
6213  }
6214 
6215 
6216  void ConstantVar::set_unit(std::shared_ptr<Unit>&& unit) {
6217  this->unit = unit;
6218  // set parents
6219  if (unit) {
6220  unit->set_parent(this);
6221  }
6222  }
6223 
6224  void ConstantVar::set_unit(const std::shared_ptr<Unit>& unit) {
6225  this->unit = unit;
6226  // set parents
6227  if (unit) {
6228  unit->set_parent(this);
6229  }
6230  }
6231 
6232 
6233 
6234  ///
6235  /// BinaryOperator member functions definition
6236  ///
6237 
6238 
6239 
6240 
6241 
6243  }
6244 
6246  }
6247 
6249  v.visit_binary_operator(*this);
6250  }
6251 
6253  v.visit_binary_operator(*this);
6254  }
6255 
6256 
6258  : value(value) { set_parent_in_children(); }
6259 
6260 
6261 
6262  /// copy constructor implementation
6264  /// object member can be just copied by value
6265  this->value = obj.value;
6266 
6267  /// if there is a token, make copy
6268  if (obj.token) {
6269  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6270  }
6271 
6272  /// set parents
6274  }
6275 
6276 
6277  /// set this parent in the children
6279 
6280 
6281  }
6282 
6283 
6284 
6286  // why don't we use a coding convention instead of this workaround for
6287  // variable shadowing?
6288  this->value = value;
6289  }
6290 
6291 
6292 
6293  ///
6294  /// UnaryOperator member functions definition
6295  ///
6296 
6297 
6298 
6299 
6300 
6302  }
6303 
6305  }
6306 
6308  v.visit_unary_operator(*this);
6309  }
6310 
6312  v.visit_unary_operator(*this);
6313  }
6314 
6315 
6317  : value(value) { set_parent_in_children(); }
6318 
6319 
6320 
6321  /// copy constructor implementation
6323  /// object member can be just copied by value
6324  this->value = obj.value;
6325 
6326  /// if there is a token, make copy
6327  if (obj.token) {
6328  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6329  }
6330 
6331  /// set parents
6333  }
6334 
6335 
6336  /// set this parent in the children
6338 
6339 
6340  }
6341 
6342 
6343 
6345  // why don't we use a coding convention instead of this workaround for
6346  // variable shadowing?
6347  this->value = value;
6348  }
6349 
6350 
6351 
6352  ///
6353  /// ReactionOperator member functions definition
6354  ///
6355 
6356 
6357 
6358 
6359 
6361  }
6362 
6364  }
6365 
6367  v.visit_reaction_operator(*this);
6368  }
6369 
6371  v.visit_reaction_operator(*this);
6372  }
6373 
6374 
6376  : value(value) { set_parent_in_children(); }
6377 
6378 
6379 
6380  /// copy constructor implementation
6382  /// object member can be just copied by value
6383  this->value = obj.value;
6384 
6385  /// if there is a token, make copy
6386  if (obj.token) {
6387  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6388  }
6389 
6390  /// set parents
6392  }
6393 
6394 
6395  /// set this parent in the children
6397 
6398 
6399  }
6400 
6401 
6402 
6404  // why don't we use a coding convention instead of this workaround for
6405  // variable shadowing?
6406  this->value = value;
6407  }
6408 
6409 
6410 
6411  ///
6412  /// ParenExpression member functions definition
6413  ///
6414 
6415 
6416 
6417 
6418 
6420  /// use -> for pointer member
6421  expression->accept(v);
6422  (void)v;
6423  }
6424 
6426  /// use -> for pointer member
6427  expression->accept(v);
6428  (void)v;
6429  }
6430 
6432  v.visit_paren_expression(*this);
6433  }
6434 
6436  v.visit_paren_expression(*this);
6437  }
6438 
6439 
6441  : expression(expression) { set_parent_in_children(); }
6442 
6443 
6444  ParenExpression::ParenExpression(std::shared_ptr<Expression> expression)
6445  : expression(expression) { set_parent_in_children(); }
6446 
6447 
6448  /// copy constructor implementation
6450  /// pointer member must be reseted with the new copy
6451  if (obj.expression) {
6452  this->expression.reset(obj.expression->clone());
6453  }
6454 
6455  /// if there is a token, make copy
6456  if (obj.token) {
6457  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6458  }
6459 
6460  /// set parents
6462  }
6463 
6464 
6465  /// set this parent in the children
6467 
6468  /// optional member could be nullptr
6469  if (expression) {
6470  expression->set_parent(this);
6471  }
6472 
6473  }
6474 
6475 
6476 
6477  void ParenExpression::set_expression(std::shared_ptr<Expression>&& expression) {
6478  this->expression = expression;
6479  // set parents
6480  if (expression) {
6481  expression->set_parent(this);
6482  }
6483  }
6484 
6485  void ParenExpression::set_expression(const std::shared_ptr<Expression>& expression) {
6486  this->expression = expression;
6487  // set parents
6488  if (expression) {
6489  expression->set_parent(this);
6490  }
6491  }
6492 
6493 
6494 
6495  ///
6496  /// BinaryExpression member functions definition
6497  ///
6498 
6499 
6500 
6501 
6502 
6503 
6504 
6505 
6506 
6507 
6508 
6510  /// use -> for pointer member
6511  lhs->accept(v);
6512  (void)v;
6513  /// use . for object member
6514  op.accept(v);
6515  (void)v;
6516  /// use -> for pointer member
6517  rhs->accept(v);
6518  (void)v;
6519  }
6520 
6522  /// use -> for pointer member
6523  lhs->accept(v);
6524  (void)v;
6525  /// use . for object member
6526  op.accept(v);
6527  (void)v;
6528  /// use -> for pointer member
6529  rhs->accept(v);
6530  (void)v;
6531  }
6532 
6534  v.visit_binary_expression(*this);
6535  }
6536 
6538  v.visit_binary_expression(*this);
6539  }
6540 
6541 
6543  : lhs(lhs), op(op), rhs(rhs) { set_parent_in_children(); }
6544 
6545 
6546  BinaryExpression::BinaryExpression(std::shared_ptr<Expression> lhs, const BinaryOperator& op, std::shared_ptr<Expression> rhs)
6547  : lhs(lhs), op(op), rhs(rhs) { set_parent_in_children(); }
6548 
6549 
6550  /// copy constructor implementation
6552  /// pointer member must be reseted with the new copy
6553  if (obj.lhs) {
6554  this->lhs.reset(obj.lhs->clone());
6555  }
6556  /// object member can be just copied by value
6557  this->op = obj.op;
6558  /// pointer member must be reseted with the new copy
6559  if (obj.rhs) {
6560  this->rhs.reset(obj.rhs->clone());
6561  }
6562 
6563  /// if there is a token, make copy
6564  if (obj.token) {
6565  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6566  }
6567 
6568  /// set parents
6570  }
6571 
6572 
6573  /// set this parent in the children
6575 
6576  /// optional member could be nullptr
6577  if (lhs) {
6578  lhs->set_parent(this);
6579  }
6580  op.set_parent(this);
6581  /// optional member could be nullptr
6582  if (rhs) {
6583  rhs->set_parent(this);
6584  }
6585 
6586  }
6587 
6588 
6589 
6590  void BinaryExpression::set_lhs(std::shared_ptr<Expression>&& lhs) {
6591  this->lhs = lhs;
6592  // set parents
6593  if (lhs) {
6594  lhs->set_parent(this);
6595  }
6596  }
6597 
6598  void BinaryExpression::set_lhs(const std::shared_ptr<Expression>& lhs) {
6599  this->lhs = lhs;
6600  // set parents
6601  if (lhs) {
6602  lhs->set_parent(this);
6603  }
6604  }
6605 
6606 
6608  this->op = op;
6609  }
6610 
6612  this->op = op;
6613  }
6614 
6615 
6616  void BinaryExpression::set_rhs(std::shared_ptr<Expression>&& rhs) {
6617  this->rhs = rhs;
6618  // set parents
6619  if (rhs) {
6620  rhs->set_parent(this);
6621  }
6622  }
6623 
6624  void BinaryExpression::set_rhs(const std::shared_ptr<Expression>& rhs) {
6625  this->rhs = rhs;
6626  // set parents
6627  if (rhs) {
6628  rhs->set_parent(this);
6629  }
6630  }
6631 
6632 
6633 
6634  ///
6635  /// DiffEqExpression member functions definition
6636  ///
6637 
6638 
6639 
6640 
6641 
6643  /// use -> for pointer member
6644  expression->accept(v);
6645  (void)v;
6646  }
6647 
6649  /// use -> for pointer member
6650  expression->accept(v);
6651  (void)v;
6652  }
6653 
6655  v.visit_diff_eq_expression(*this);
6656  }
6657 
6659  v.visit_diff_eq_expression(*this);
6660  }
6661 
6662 
6664  : expression(expression) { set_parent_in_children(); }
6665 
6666 
6667  DiffEqExpression::DiffEqExpression(std::shared_ptr<BinaryExpression> expression)
6668  : expression(expression) { set_parent_in_children(); }
6669 
6670 
6671  /// copy constructor implementation
6673  /// pointer member must be reseted with the new copy
6674  if (obj.expression) {
6675  this->expression.reset(obj.expression->clone());
6676  }
6677 
6678  /// if there is a token, make copy
6679  if (obj.token) {
6680  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6681  }
6682 
6683  /// set parents
6685  }
6686 
6687 
6688  /// set this parent in the children
6690 
6691  /// optional member could be nullptr
6692  if (expression) {
6693  expression->set_parent(this);
6694  }
6695 
6696  }
6697 
6698 
6699 
6700  void DiffEqExpression::set_expression(std::shared_ptr<BinaryExpression>&& expression) {
6701  this->expression = expression;
6702  // set parents
6703  if (expression) {
6704  expression->set_parent(this);
6705  }
6706  }
6707 
6708  void DiffEqExpression::set_expression(const std::shared_ptr<BinaryExpression>& expression) {
6709  this->expression = expression;
6710  // set parents
6711  if (expression) {
6712  expression->set_parent(this);
6713  }
6714  }
6715 
6716 
6717 
6718  ///
6719  /// UnaryExpression member functions definition
6720  ///
6721 
6722 
6723 
6724 
6725 
6726 
6727 
6728 
6730  /// use . for object member
6731  op.accept(v);
6732  (void)v;
6733  /// use -> for pointer member
6734  expression->accept(v);
6735  (void)v;
6736  }
6737 
6739  /// use . for object member
6740  op.accept(v);
6741  (void)v;
6742  /// use -> for pointer member
6743  expression->accept(v);
6744  (void)v;
6745  }
6746 
6748  v.visit_unary_expression(*this);
6749  }
6750 
6752  v.visit_unary_expression(*this);
6753  }
6754 
6755 
6757  : op(op), expression(expression) { set_parent_in_children(); }
6758 
6759 
6760  UnaryExpression::UnaryExpression(const UnaryOperator& op, std::shared_ptr<Expression> expression)
6761  : op(op), expression(expression) { set_parent_in_children(); }
6762 
6763 
6764  /// copy constructor implementation
6766  /// object member can be just copied by value
6767  this->op = obj.op;
6768  /// pointer member must be reseted with the new copy
6769  if (obj.expression) {
6770  this->expression.reset(obj.expression->clone());
6771  }
6772 
6773  /// if there is a token, make copy
6774  if (obj.token) {
6775  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6776  }
6777 
6778  /// set parents
6780  }
6781 
6782 
6783  /// set this parent in the children
6785 
6786  op.set_parent(this);
6787  /// optional member could be nullptr
6788  if (expression) {
6789  expression->set_parent(this);
6790  }
6791 
6792  }
6793 
6794 
6795 
6797  this->op = op;
6798  }
6799 
6801  this->op = op;
6802  }
6803 
6804 
6805  void UnaryExpression::set_expression(std::shared_ptr<Expression>&& expression) {
6806  this->expression = expression;
6807  // set parents
6808  if (expression) {
6809  expression->set_parent(this);
6810  }
6811  }
6812 
6813  void UnaryExpression::set_expression(const std::shared_ptr<Expression>& expression) {
6814  this->expression = expression;
6815  // set parents
6816  if (expression) {
6817  expression->set_parent(this);
6818  }
6819  }
6820 
6821 
6822 
6823  ///
6824  /// NonLinEquation member functions definition
6825  ///
6826 
6827 
6828 
6829 
6830 
6831 
6832 
6833 
6835  /// use -> for pointer member
6836  lhs->accept(v);
6837  (void)v;
6838  /// use -> for pointer member
6839  rhs->accept(v);
6840  (void)v;
6841  }
6842 
6844  /// use -> for pointer member
6845  lhs->accept(v);
6846  (void)v;
6847  /// use -> for pointer member
6848  rhs->accept(v);
6849  (void)v;
6850  }
6851 
6853  v.visit_non_lin_equation(*this);
6854  }
6855 
6857  v.visit_non_lin_equation(*this);
6858  }
6859 
6860 
6862  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6863 
6864 
6865  NonLinEquation::NonLinEquation(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs)
6866  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6867 
6868 
6869  /// copy constructor implementation
6871  /// pointer member must be reseted with the new copy
6872  if (obj.lhs) {
6873  this->lhs.reset(obj.lhs->clone());
6874  }
6875  /// pointer member must be reseted with the new copy
6876  if (obj.rhs) {
6877  this->rhs.reset(obj.rhs->clone());
6878  }
6879 
6880  /// if there is a token, make copy
6881  if (obj.token) {
6882  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6883  }
6884 
6885  /// set parents
6887  }
6888 
6889 
6890  /// set this parent in the children
6892 
6893  /// optional member could be nullptr
6894  if (lhs) {
6895  lhs->set_parent(this);
6896  }
6897  /// optional member could be nullptr
6898  if (rhs) {
6899  rhs->set_parent(this);
6900  }
6901 
6902  }
6903 
6904 
6905 
6906  void NonLinEquation::set_lhs(std::shared_ptr<Expression>&& lhs) {
6907  this->lhs = lhs;
6908  // set parents
6909  if (lhs) {
6910  lhs->set_parent(this);
6911  }
6912  }
6913 
6914  void NonLinEquation::set_lhs(const std::shared_ptr<Expression>& lhs) {
6915  this->lhs = lhs;
6916  // set parents
6917  if (lhs) {
6918  lhs->set_parent(this);
6919  }
6920  }
6921 
6922 
6923  void NonLinEquation::set_rhs(std::shared_ptr<Expression>&& rhs) {
6924  this->rhs = rhs;
6925  // set parents
6926  if (rhs) {
6927  rhs->set_parent(this);
6928  }
6929  }
6930 
6931  void NonLinEquation::set_rhs(const std::shared_ptr<Expression>& rhs) {
6932  this->rhs = rhs;
6933  // set parents
6934  if (rhs) {
6935  rhs->set_parent(this);
6936  }
6937  }
6938 
6939 
6940 
6941  ///
6942  /// LinEquation member functions definition
6943  ///
6944 
6945 
6946 
6947 
6948 
6949 
6950 
6951 
6953  /// use -> for pointer member
6954  lhs->accept(v);
6955  (void)v;
6956  /// use -> for pointer member
6957  rhs->accept(v);
6958  (void)v;
6959  }
6960 
6962  /// use -> for pointer member
6963  lhs->accept(v);
6964  (void)v;
6965  /// use -> for pointer member
6966  rhs->accept(v);
6967  (void)v;
6968  }
6969 
6971  v.visit_lin_equation(*this);
6972  }
6973 
6975  v.visit_lin_equation(*this);
6976  }
6977 
6978 
6980  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6981 
6982 
6983  LinEquation::LinEquation(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs)
6984  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6985 
6986 
6987  /// copy constructor implementation
6989  /// pointer member must be reseted with the new copy
6990  if (obj.lhs) {
6991  this->lhs.reset(obj.lhs->clone());
6992  }
6993  /// pointer member must be reseted with the new copy
6994  if (obj.rhs) {
6995  this->rhs.reset(obj.rhs->clone());
6996  }
6997 
6998  /// if there is a token, make copy
6999  if (obj.token) {
7000  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7001  }
7002 
7003  /// set parents
7005  }
7006 
7007 
7008  /// set this parent in the children
7010 
7011  /// optional member could be nullptr
7012  if (lhs) {
7013  lhs->set_parent(this);
7014  }
7015  /// optional member could be nullptr
7016  if (rhs) {
7017  rhs->set_parent(this);
7018  }
7019 
7020  }
7021 
7022 
7023 
7024  void LinEquation::set_lhs(std::shared_ptr<Expression>&& lhs) {
7025  this->lhs = lhs;
7026  // set parents
7027  if (lhs) {
7028  lhs->set_parent(this);
7029  }
7030  }
7031 
7032  void LinEquation::set_lhs(const std::shared_ptr<Expression>& lhs) {
7033  this->lhs = lhs;
7034  // set parents
7035  if (lhs) {
7036  lhs->set_parent(this);
7037  }
7038  }
7039 
7040 
7041  void LinEquation::set_rhs(std::shared_ptr<Expression>&& rhs) {
7042  this->rhs = rhs;
7043  // set parents
7044  if (rhs) {
7045  rhs->set_parent(this);
7046  }
7047  }
7048 
7049  void LinEquation::set_rhs(const std::shared_ptr<Expression>& rhs) {
7050  this->rhs = rhs;
7051  // set parents
7052  if (rhs) {
7053  rhs->set_parent(this);
7054  }
7055  }
7056 
7057 
7058 
7059  ///
7060  /// FunctionCall member functions definition
7061  ///
7062 
7063 
7064 
7065  std::string FunctionCall::get_node_name() const {
7066  return name->get_node_name();
7067  }
7068 
7069 
7070 
7071 
7073  /// use -> for pointer member
7074  name->accept(v);
7075  (void)v;
7076  /// visit each element of vector
7077  for (auto& item : this->arguments) {
7078  item->accept(v);
7079  }
7080  (void)v;
7081  }
7082 
7084  /// use -> for pointer member
7085  name->accept(v);
7086  (void)v;
7087  /// visit each element of vector
7088  for (auto& item : this->arguments) {
7089  item->accept(v);
7090  }
7091  (void)v;
7092  }
7093 
7095  v.visit_function_call(*this);
7096  }
7097 
7099  v.visit_function_call(*this);
7100  }
7101 
7102 
7104  : name(name), arguments(arguments) { set_parent_in_children(); }
7105 
7106 
7107  FunctionCall::FunctionCall(std::shared_ptr<Name> name, const ExpressionVector& arguments)
7108  : name(name), arguments(arguments) { set_parent_in_children(); }
7109 
7110 
7111  /// copy constructor implementation
7113  /// pointer member must be reseted with the new copy
7114  if (obj.name) {
7115  this->name.reset(obj.name->clone());
7116  }
7117  /// copy each element of vector
7118  for (auto& item : obj.arguments) {
7119  this->arguments.emplace_back(item->clone());
7120  }
7121 
7122  /// if there is a token, make copy
7123  if (obj.token) {
7124  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7125  }
7126 
7127  /// set parents
7129  }
7130 
7131 
7132  /// set this parent in the children
7134 
7135  /// optional member could be nullptr
7136  if (name) {
7137  name->set_parent(this);
7138  }
7139  /// set parent for each element of the vector
7140  for (auto& item : arguments) {
7141  item->set_parent(this);
7142 
7143  }
7144 
7145  }
7146 
7147 
7148 
7149  void FunctionCall::set_name(std::shared_ptr<Name>&& name) {
7150  this->name = name;
7151  // set parents
7152  if (name) {
7153  name->set_parent(this);
7154  }
7155  }
7156 
7157  void FunctionCall::set_name(const std::shared_ptr<Name>& name) {
7158  this->name = name;
7159  // set parents
7160  if (name) {
7161  name->set_parent(this);
7162  }
7163  }
7164 
7165 
7167  this->arguments = arguments;
7168  // set parents
7169  for (auto& ii : arguments) {
7170  ii->set_parent(this);
7171  }
7172  }
7173 
7175  this->arguments = arguments;
7176  // set parents
7177  for (auto& ii : arguments) {
7178  ii->set_parent(this);
7179  }
7180  }
7181 
7182 
7183 
7184  ///
7185  /// Watch member functions definition
7186  ///
7187 
7188 
7189 
7190 
7191 
7192 
7193 
7194 
7196  /// use -> for pointer member
7197  expression->accept(v);
7198  (void)v;
7199  /// use -> for pointer member
7200  value->accept(v);
7201  (void)v;
7202  }
7203 
7205  /// use -> for pointer member
7206  expression->accept(v);
7207  (void)v;
7208  /// use -> for pointer member
7209  value->accept(v);
7210  (void)v;
7211  }
7212 
7214  v.visit_watch(*this);
7215  }
7216 
7218  v.visit_watch(*this);
7219  }
7220 
7221 
7222  Watch::Watch(Expression* expression, Expression* value)
7223  : expression(expression), value(value) { set_parent_in_children(); }
7224 
7225 
7226  Watch::Watch(std::shared_ptr<Expression> expression, std::shared_ptr<Expression> value)
7227  : expression(expression), value(value) { set_parent_in_children(); }
7228 
7229 
7230  /// copy constructor implementation
7231  Watch::Watch(const Watch& obj) {
7232  /// pointer member must be reseted with the new copy
7233  if (obj.expression) {
7234  this->expression.reset(obj.expression->clone());
7235  }
7236  /// pointer member must be reseted with the new copy
7237  if (obj.value) {
7238  this->value.reset(obj.value->clone());
7239  }
7240 
7241  /// if there is a token, make copy
7242  if (obj.token) {
7243  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7244  }
7245 
7246  /// set parents
7248  }
7249 
7250 
7251  /// set this parent in the children
7253 
7254  /// optional member could be nullptr
7255  if (expression) {
7256  expression->set_parent(this);
7257  }
7258  /// optional member could be nullptr
7259  if (value) {
7260  value->set_parent(this);
7261  }
7262 
7263  }
7264 
7265 
7266 
7267  void Watch::set_expression(std::shared_ptr<Expression>&& expression) {
7268  this->expression = expression;
7269  // set parents
7270  if (expression) {
7271  expression->set_parent(this);
7272  }
7273  }
7274 
7275  void Watch::set_expression(const std::shared_ptr<Expression>& expression) {
7276  this->expression = expression;
7277  // set parents
7278  if (expression) {
7279  expression->set_parent(this);
7280  }
7281  }
7282 
7283 
7284  void Watch::set_value(std::shared_ptr<Expression>&& value) {
7285  this->value = value;
7286  // set parents
7287  if (value) {
7288  value->set_parent(this);
7289  }
7290  }
7291 
7292  void Watch::set_value(const std::shared_ptr<Expression>& value) {
7293  this->value = value;
7294  // set parents
7295  if (value) {
7296  value->set_parent(this);
7297  }
7298  }
7299 
7300 
7301 
7302  ///
7303  /// BABlockType member functions definition
7304  ///
7305 
7306 
7307 
7308 
7309 
7311  }
7312 
7314  }
7315 
7317  v.visit_ba_block_type(*this);
7318  }
7319 
7321  v.visit_ba_block_type(*this);
7322  }
7323 
7324 
7326  : value(value) { set_parent_in_children(); }
7327 
7328 
7329 
7330  /// copy constructor implementation
7332  /// object member can be just copied by value
7333  this->value = obj.value;
7334 
7335  /// if there is a token, make copy
7336  if (obj.token) {
7337  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7338  }
7339 
7340  /// set parents
7342  }
7343 
7344 
7345  /// set this parent in the children
7347 
7348 
7349  }
7350 
7351 
7352 
7354  // why don't we use a coding convention instead of this workaround for
7355  // variable shadowing?
7356  this->value = value;
7357  }
7358 
7359 
7360 
7361  ///
7362  /// UnitDef member functions definition
7363  ///
7364 
7365 
7366 
7367  std::string UnitDef::get_node_name() const {
7368  return unit1->get_node_name();
7369  }
7370 
7371 
7372 
7373 
7375  /// use -> for pointer member
7376  unit1->accept(v);
7377  (void)v;
7378  /// use -> for pointer member
7379  unit2->accept(v);
7380  (void)v;
7381  }
7382 
7384  /// use -> for pointer member
7385  unit1->accept(v);
7386  (void)v;
7387  /// use -> for pointer member
7388  unit2->accept(v);
7389  (void)v;
7390  }
7391 
7393  v.visit_unit_def(*this);
7394  }
7395 
7397  v.visit_unit_def(*this);
7398  }
7399 
7400 
7401  UnitDef::UnitDef(Unit* unit1, Unit* unit2)
7402  : unit1(unit1), unit2(unit2) { set_parent_in_children(); }
7403 
7404 
7405  UnitDef::UnitDef(std::shared_ptr<Unit> unit1, std::shared_ptr<Unit> unit2)
7406  : unit1(unit1), unit2(unit2) { set_parent_in_children(); }
7407 
7408 
7409  /// copy constructor implementation
7411  /// pointer member must be reseted with the new copy
7412  if (obj.unit1) {
7413  this->unit1.reset(obj.unit1->clone());
7414  }
7415  /// pointer member must be reseted with the new copy
7416  if (obj.unit2) {
7417  this->unit2.reset(obj.unit2->clone());
7418  }
7419 
7420  /// if there is a token, make copy
7421  if (obj.token) {
7422  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7423  }
7424 
7425  /// set parents
7427  }
7428 
7429 
7430  /// set this parent in the children
7432 
7433  /// optional member could be nullptr
7434  if (unit1) {
7435  unit1->set_parent(this);
7436  }
7437  /// optional member could be nullptr
7438  if (unit2) {
7439  unit2->set_parent(this);
7440  }
7441 
7442  }
7443 
7444 
7445 
7446  void UnitDef::set_unit1(std::shared_ptr<Unit>&& unit1) {
7447  this->unit1 = unit1;
7448  // set parents
7449  if (unit1) {
7450  unit1->set_parent(this);
7451  }
7452  }
7453 
7454  void UnitDef::set_unit1(const std::shared_ptr<Unit>& unit1) {
7455  this->unit1 = unit1;
7456  // set parents
7457  if (unit1) {
7458  unit1->set_parent(this);
7459  }
7460  }
7461 
7462 
7463  void UnitDef::set_unit2(std::shared_ptr<Unit>&& unit2) {
7464  this->unit2 = unit2;
7465  // set parents
7466  if (unit2) {
7467  unit2->set_parent(this);
7468  }
7469  }
7470 
7471  void UnitDef::set_unit2(const std::shared_ptr<Unit>& unit2) {
7472  this->unit2 = unit2;
7473  // set parents
7474  if (unit2) {
7475  unit2->set_parent(this);
7476  }
7477  }
7478 
7479 
7480 
7481  ///
7482  /// FactorDef member functions definition
7483  ///
7484 
7485 
7486 
7487  std::string FactorDef::get_node_name() const {
7488  return name->get_node_name();
7489  }
7490 
7491 
7492 
7493 
7494 
7495 
7496 
7497 
7498 
7499 
7500 
7501 
7502 
7504  /// use -> for pointer member
7505  name->accept(v);
7506  (void)v;
7507  /// optional member could be nullptr
7508  if (this->value) {
7509  this->value->accept(v);
7510  }
7511  (void)v;
7512  /// use -> for pointer member
7513  unit1->accept(v);
7514  (void)v;
7515  /// optional member could be nullptr
7516  if (this->gt) {
7517  this->gt->accept(v);
7518  }
7519  (void)v;
7520  /// optional member could be nullptr
7521  if (this->unit2) {
7522  this->unit2->accept(v);
7523  }
7524  (void)v;
7525  }
7526 
7528  /// use -> for pointer member
7529  name->accept(v);
7530  (void)v;
7531  /// optional member could be nullptr
7532  if (this->value) {
7533  this->value->accept(v);
7534  }
7535  (void)v;
7536  /// use -> for pointer member
7537  unit1->accept(v);
7538  (void)v;
7539  /// optional member could be nullptr
7540  if (this->gt) {
7541  this->gt->accept(v);
7542  }
7543  (void)v;
7544  /// optional member could be nullptr
7545  if (this->unit2) {
7546  this->unit2->accept(v);
7547  }
7548  (void)v;
7549  }
7550 
7552  v.visit_factor_def(*this);
7553  }
7554 
7556  v.visit_factor_def(*this);
7557  }
7558 
7559 
7560  FactorDef::FactorDef(Name* name, Double* value, Unit* unit1, Boolean* gt, Unit* unit2)
7561  : name(name), value(value), unit1(unit1), gt(gt), unit2(unit2) { set_parent_in_children(); }
7562 
7563 
7564  FactorDef::FactorDef(std::shared_ptr<Name> name, std::shared_ptr<Double> value, std::shared_ptr<Unit> unit1, std::shared_ptr<Boolean> gt, std::shared_ptr<Unit> unit2)
7565  : name(name), value(value), unit1(unit1), gt(gt), unit2(unit2) { set_parent_in_children(); }
7566 
7567 
7568  /// copy constructor implementation
7570  /// pointer member must be reseted with the new copy
7571  if (obj.name) {
7572  this->name.reset(obj.name->clone());
7573  }
7574  /// pointer member must be reseted with the new copy
7575  if (obj.value) {
7576  this->value.reset(obj.value->clone());
7577  }
7578  /// pointer member must be reseted with the new copy
7579  if (obj.unit1) {
7580  this->unit1.reset(obj.unit1->clone());
7581  }
7582  /// pointer member must be reseted with the new copy
7583  if (obj.gt) {
7584  this->gt.reset(obj.gt->clone());
7585  }
7586  /// pointer member must be reseted with the new copy
7587  if (obj.unit2) {
7588  this->unit2.reset(obj.unit2->clone());
7589  }
7590 
7591  /// if there is a token, make copy
7592  if (obj.token) {
7593  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7594  }
7595 
7596  /// set parents
7598  }
7599 
7600 
7601  /// set this parent in the children
7603 
7604  /// optional member could be nullptr
7605  if (name) {
7606  name->set_parent(this);
7607  }
7608  /// optional member could be nullptr
7609  if (value) {
7610  value->set_parent(this);
7611  }
7612  /// optional member could be nullptr
7613  if (unit1) {
7614  unit1->set_parent(this);
7615  }
7616  /// optional member could be nullptr
7617  if (gt) {
7618  gt->set_parent(this);
7619  }
7620  /// optional member could be nullptr
7621  if (unit2) {
7622  unit2->set_parent(this);
7623  }
7624 
7625  }
7626 
7627 
7628 
7629  void FactorDef::set_name(std::shared_ptr<Name>&& name) {
7630  this->name = name;
7631  // set parents
7632  if (name) {
7633  name->set_parent(this);
7634  }
7635  }
7636 
7637  void FactorDef::set_name(const std::shared_ptr<Name>& name) {
7638  this->name = name;
7639  // set parents
7640  if (name) {
7641  name->set_parent(this);
7642  }
7643  }
7644 
7645 
7646  void FactorDef::set_value(std::shared_ptr<Double>&& value) {
7647  this->value = value;
7648  // set parents
7649  if (value) {
7650  value->set_parent(this);
7651  }
7652  }
7653 
7654  void FactorDef::set_value(const std::shared_ptr<Double>& value) {
7655  this->value = value;
7656  // set parents
7657  if (value) {
7658  value->set_parent(this);
7659  }
7660  }
7661 
7662 
7663  void FactorDef::set_unit1(std::shared_ptr<Unit>&& unit1) {
7664  this->unit1 = unit1;
7665  // set parents
7666  if (unit1) {
7667  unit1->set_parent(this);
7668  }
7669  }
7670 
7671  void FactorDef::set_unit1(const std::shared_ptr<Unit>& unit1) {
7672  this->unit1 = unit1;
7673  // set parents
7674  if (unit1) {
7675  unit1->set_parent(this);
7676  }
7677  }
7678 
7679 
7680  void FactorDef::set_gt(std::shared_ptr<Boolean>&& gt) {
7681  this->gt = gt;
7682  // set parents
7683  if (gt) {
7684  gt->set_parent(this);
7685  }
7686  }
7687 
7688  void FactorDef::set_gt(const std::shared_ptr<Boolean>& gt) {
7689  this->gt = gt;
7690  // set parents
7691  if (gt) {
7692  gt->set_parent(this);
7693  }
7694  }
7695 
7696 
7697  void FactorDef::set_unit2(std::shared_ptr<Unit>&& unit2) {
7698  this->unit2 = unit2;
7699  // set parents
7700  if (unit2) {
7701  unit2->set_parent(this);
7702  }
7703  }
7704 
7705  void FactorDef::set_unit2(const std::shared_ptr<Unit>& unit2) {
7706  this->unit2 = unit2;
7707  // set parents
7708  if (unit2) {
7709  unit2->set_parent(this);
7710  }
7711  }
7712 
7713 
7714 
7715  ///
7716  /// Valence member functions definition
7717  ///
7718 
7719 
7720 
7721 
7722 
7723 
7724 
7725 
7727  /// use -> for pointer member
7728  type->accept(v);
7729  (void)v;
7730  /// use -> for pointer member
7731  value->accept(v);
7732  (void)v;
7733  }
7734 
7736  /// use -> for pointer member
7737  type->accept(v);
7738  (void)v;
7739  /// use -> for pointer member
7740  value->accept(v);
7741  (void)v;
7742  }
7743 
7745  v.visit_valence(*this);
7746  }
7747 
7749  v.visit_valence(*this);
7750  }
7751 
7752 
7754  : type(type), value(value) { set_parent_in_children(); }
7755 
7756 
7757  Valence::Valence(std::shared_ptr<Name> type, std::shared_ptr<Double> value)
7758  : type(type), value(value) { set_parent_in_children(); }
7759 
7760 
7761  /// copy constructor implementation
7763  /// pointer member must be reseted with the new copy
7764  if (obj.type) {
7765  this->type.reset(obj.type->clone());
7766  }
7767  /// pointer member must be reseted with the new copy
7768  if (obj.value) {
7769  this->value.reset(obj.value->clone());
7770  }
7771 
7772  /// if there is a token, make copy
7773  if (obj.token) {
7774  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7775  }
7776 
7777  /// set parents
7779  }
7780 
7781 
7782  /// set this parent in the children
7784 
7785  /// optional member could be nullptr
7786  if (type) {
7787  type->set_parent(this);
7788  }
7789  /// optional member could be nullptr
7790  if (value) {
7791  value->set_parent(this);
7792  }
7793 
7794  }
7795 
7796 
7797 
7798  void Valence::set_type(std::shared_ptr<Name>&& type) {
7799  this->type = type;
7800  // set parents
7801  if (type) {
7802  type->set_parent(this);
7803  }
7804  }
7805 
7806  void Valence::set_type(const std::shared_ptr<Name>& type) {
7807  this->type = type;
7808  // set parents
7809  if (type) {
7810  type->set_parent(this);
7811  }
7812  }
7813 
7814 
7815  void Valence::set_value(std::shared_ptr<Double>&& value) {
7816  this->value = value;
7817  // set parents
7818  if (value) {
7819  value->set_parent(this);
7820  }
7821  }
7822 
7823  void Valence::set_value(const std::shared_ptr<Double>& value) {
7824  this->value = value;
7825  // set parents
7826  if (value) {
7827  value->set_parent(this);
7828  }
7829  }
7830 
7831 
7832 
7833  ///
7834  /// UnitState member functions definition
7835  ///
7836 
7837 
7838 
7839 
7840 
7842  }
7843 
7845  }
7846 
7848  v.visit_unit_state(*this);
7849  }
7850 
7852  v.visit_unit_state(*this);
7853  }
7854 
7855 
7857  : value(value) { set_parent_in_children(); }
7858 
7859 
7860 
7861  /// copy constructor implementation
7863  /// object member can be just copied by value
7864  this->value = obj.value;
7865 
7866  /// if there is a token, make copy
7867  if (obj.token) {
7868  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7869  }
7870 
7871  /// set parents
7873  }
7874 
7875 
7876  /// set this parent in the children
7878 
7879 
7880  }
7881 
7882 
7883 
7885  // why don't we use a coding convention instead of this workaround for
7886  // variable shadowing?
7887  this->value = value;
7888  }
7889 
7890 
7891 
7892  ///
7893  /// LocalListStatement member functions definition
7894  ///
7895 
7896 
7897 /**
7898  * \brief Add member to variables by raw pointer
7899  */
7901  variables.emplace_back(n);
7902 
7903  // set parents
7904  n->set_parent(this);
7905 }
7906 
7907 /**
7908  * \brief Add member to variables by shared_ptr
7909  */
7910 void LocalListStatement::emplace_back_local_var(std::shared_ptr<LocalVar> n) {
7911  variables.emplace_back(n);
7912  // set parents
7913  n->set_parent(this);
7914 }
7915 
7916 /**
7917  * \brief Erase member to variables
7918  */
7919 LocalVarVector::const_iterator LocalListStatement::erase_local_var(LocalVarVector::const_iterator first) {
7920  return variables.erase(first);
7921 }
7922 /**
7923  * \brief Erase members to variables
7924  */
7925 LocalVarVector::const_iterator LocalListStatement::erase_local_var(LocalVarVector::const_iterator first, LocalVarVector::const_iterator last) {
7926  return variables.erase(first, last);
7927 }
7928 /**
7929  * \brief Erase non-consecutive members to variables
7930  *
7931  * loosely following the cpp reference of remove_if
7932  */
7933 size_t LocalListStatement::erase_local_var(std::unordered_set<LocalVar*>& to_be_erased) {
7934  auto first = variables.begin();
7935  auto last = variables.end();
7936  auto result = first;
7937 
7938  while (first != last) {
7939  // automatically erase dangling pointers from the uset while
7940  // looking for them to erase them in the vector
7941  if (to_be_erased.erase(first->get()) == 0) {
7942  reset_local_var(result, *first);
7943  ++result;
7944  }
7945  ++first;
7946  }
7947 
7948  size_t out = last - result;
7949  erase_local_var(result, last);
7950 
7951  return out;
7952 }
7953 
7954 /**
7955  * \brief Insert member to variables
7956  */
7957 LocalVarVector::const_iterator LocalListStatement::insert_local_var(LocalVarVector::const_iterator position, const std::shared_ptr<LocalVar>& n) {
7958  n->set_parent(this);
7959  return variables.insert(position, n);
7960 }
7961 
7962 /**
7963  * \brief Reset member to variables
7964  */
7965 void LocalListStatement::reset_local_var(LocalVarVector::const_iterator position, LocalVar* n) {
7966  //set parents
7967  n->set_parent(this);
7968 
7969  variables[position - variables.begin()].reset(n);
7970 }
7971 
7972 /**
7973  * \brief Reset member to variables
7974  */
7975 void LocalListStatement::reset_local_var(LocalVarVector::const_iterator position, std::shared_ptr<LocalVar> n) {
7976  //set parents
7977  n->set_parent(this);
7978 
7979  variables[position - variables.begin()] = n;
7980 }
7981 
7982 
7983 
7984 
7986  /// visit each element of vector
7987  for (auto& item : this->variables) {
7988  item->accept(v);
7989  }
7990  (void)v;
7991  }
7992 
7994  /// visit each element of vector
7995  for (auto& item : this->variables) {
7996  item->accept(v);
7997  }
7998  (void)v;
7999  }
8000 
8002  v.visit_local_list_statement(*this);
8003  }
8004 
8006  v.visit_local_list_statement(*this);
8007  }
8008 
8009 
8011  : variables(variables) { set_parent_in_children(); }
8012 
8013 
8014 
8015  /// copy constructor implementation
8017  /// copy each element of vector
8018  for (auto& item : obj.variables) {
8019  this->variables.emplace_back(item->clone());
8020  }
8021 
8022  /// if there is a token, make copy
8023  if (obj.token) {
8024  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8025  }
8026 
8027  /// set parents
8029  }
8030 
8031 
8032  /// set this parent in the children
8034 
8035  /// set parent for each element of the vector
8036  for (auto& item : variables) {
8037  item->set_parent(this);
8038 
8039  }
8040 
8041  }
8042 
8043 
8044 
8046  this->variables = variables;
8047  // set parents
8048  for (auto& ii : variables) {
8049  ii->set_parent(this);
8050  }
8051  }
8052 
8054  this->variables = variables;
8055  // set parents
8056  for (auto& ii : variables) {
8057  ii->set_parent(this);
8058  }
8059  }
8060 
8061 
8062 
8063  ///
8064  /// Model member functions definition
8065  ///
8066 
8067 
8068 
8069 
8070 
8072  /// use -> for pointer member
8073  title->accept(v);
8074  (void)v;
8075  }
8076 
8078  /// use -> for pointer member
8079  title->accept(v);
8080  (void)v;
8081  }
8082 
8084  v.visit_model(*this);
8085  }
8086 
8088  v.visit_model(*this);
8089  }
8090 
8091 
8093  : title(title) { set_parent_in_children(); }
8094 
8095 
8096  Model::Model(std::shared_ptr<String> title)
8097  : title(title) { set_parent_in_children(); }
8098 
8099 
8100  /// copy constructor implementation
8101  Model::Model(const Model& obj) {
8102  /// pointer member must be reseted with the new copy
8103  if (obj.title) {
8104  this->title.reset(obj.title->clone());
8105  }
8106 
8107  /// if there is a token, make copy
8108  if (obj.token) {
8109  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8110  }
8111 
8112  /// set parents
8114  }
8115 
8116 
8117  /// set this parent in the children
8119 
8120  /// optional member could be nullptr
8121  if (title) {
8122  title->set_parent(this);
8123  }
8124 
8125  }
8126 
8127 
8128 
8129  void Model::set_title(std::shared_ptr<String>&& title) {
8130  this->title = title;
8131  // set parents
8132  if (title) {
8133  title->set_parent(this);
8134  }
8135  }
8136 
8137  void Model::set_title(const std::shared_ptr<String>& title) {
8138  this->title = title;
8139  // set parents
8140  if (title) {
8141  title->set_parent(this);
8142  }
8143  }
8144 
8145 
8146 
8147  ///
8148  /// Define member functions definition
8149  ///
8150 
8151 
8152 
8153  std::string Define::get_node_name() const {
8154  return name->get_node_name();
8155  }
8156 
8157 
8158 
8159 
8161  /// use -> for pointer member
8162  name->accept(v);
8163  (void)v;
8164  /// use -> for pointer member
8165  value->accept(v);
8166  (void)v;
8167  }
8168 
8170  /// use -> for pointer member
8171  name->accept(v);
8172  (void)v;
8173  /// use -> for pointer member
8174  value->accept(v);
8175  (void)v;
8176  }
8177 
8179  v.visit_define(*this);
8180  }
8181 
8183  v.visit_define(*this);
8184  }
8185 
8186 
8187  Define::Define(Name* name, Integer* value)
8188  : name(name), value(value) { set_parent_in_children(); }
8189 
8190 
8191  Define::Define(std::shared_ptr<Name> name, std::shared_ptr<Integer> value)
8192  : name(name), value(value) { set_parent_in_children(); }
8193 
8194 
8195  /// copy constructor implementation
8196  Define::Define(const Define& obj) {
8197  /// pointer member must be reseted with the new copy
8198  if (obj.name) {
8199  this->name.reset(obj.name->clone());
8200  }
8201  /// pointer member must be reseted with the new copy
8202  if (obj.value) {
8203  this->value.reset(obj.value->clone());
8204  }
8205 
8206  /// if there is a token, make copy
8207  if (obj.token) {
8208  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8209  }
8210 
8211  /// set parents
8213  }
8214 
8215 
8216  /// set this parent in the children
8218 
8219  /// optional member could be nullptr
8220  if (name) {
8221  name->set_parent(this);
8222  }
8223  /// optional member could be nullptr
8224  if (value) {
8225  value->set_parent(this);
8226  }
8227 
8228  }
8229 
8230 
8231 
8232  void Define::set_name(std::shared_ptr<Name>&& name) {
8233  this->name = name;
8234  // set parents
8235  if (name) {
8236  name->set_parent(this);
8237  }
8238  }
8239 
8240  void Define::set_name(const std::shared_ptr<Name>& name) {
8241  this->name = name;
8242  // set parents
8243  if (name) {
8244  name->set_parent(this);
8245  }
8246  }
8247 
8248 
8249  void Define::set_value(std::shared_ptr<Integer>&& value) {
8250  this->value = value;
8251  // set parents
8252  if (value) {
8253  value->set_parent(this);
8254  }
8255  }
8256 
8257  void Define::set_value(const std::shared_ptr<Integer>& value) {
8258  this->value = value;
8259  // set parents
8260  if (value) {
8261  value->set_parent(this);
8262  }
8263  }
8264 
8265 
8266 
8267  ///
8268  /// Include member functions definition
8269  ///
8270 
8271 
8272 
8273 
8274 
8275 
8276 
8277 
8279  /// use -> for pointer member
8280  filename->accept(v);
8281  (void)v;
8282  /// visit each element of vector
8283  for (auto& item : this->blocks) {
8284  item->accept(v);
8285  }
8286  (void)v;
8287  }
8288 
8290  /// use -> for pointer member
8291  filename->accept(v);
8292  (void)v;
8293  /// visit each element of vector
8294  for (auto& item : this->blocks) {
8295  item->accept(v);
8296  }
8297  (void)v;
8298  }
8299 
8301  v.visit_include(*this);
8302  }
8303 
8305  v.visit_include(*this);
8306  }
8307 
8308 
8309  Include::Include(String* filename, const NodeVector& blocks)
8310  : filename(filename), blocks(blocks) { set_parent_in_children(); }
8311 
8312 
8313  Include::Include(std::shared_ptr<String> filename, const NodeVector& blocks)
8314  : filename(filename), blocks(blocks) { set_parent_in_children(); }
8315 
8316 
8317  /// copy constructor implementation
8319  /// pointer member must be reseted with the new copy
8320  if (obj.filename) {
8321  this->filename.reset(obj.filename->clone());
8322  }
8323  /// copy each element of vector
8324  for (auto& item : obj.blocks) {
8325  this->blocks.emplace_back(item->clone());
8326  }
8327 
8328  /// if there is a token, make copy
8329  if (obj.token) {
8330  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8331  }
8332 
8333  /// set parents
8335  }
8336 
8337 
8338  /// set this parent in the children
8340 
8341  /// optional member could be nullptr
8342  if (filename) {
8343  filename->set_parent(this);
8344  }
8345  /// set parent for each element of the vector
8346  for (auto& item : blocks) {
8347  item->set_parent(this);
8348 
8349  }
8350 
8351  }
8352 
8353 
8354 
8355  void Include::set_filename(std::shared_ptr<String>&& filename) {
8356  this->filename = filename;
8357  // set parents
8358  if (filename) {
8359  filename->set_parent(this);
8360  }
8361  }
8362 
8363  void Include::set_filename(const std::shared_ptr<String>& filename) {
8364  this->filename = filename;
8365  // set parents
8366  if (filename) {
8367  filename->set_parent(this);
8368  }
8369  }
8370 
8371 
8373  this->blocks = blocks;
8374  // set parents
8375  for (auto& ii : blocks) {
8376  ii->set_parent(this);
8377  }
8378  }
8379 
8380  void Include::set_blocks(const NodeVector& blocks) {
8381  this->blocks = blocks;
8382  // set parents
8383  for (auto& ii : blocks) {
8384  ii->set_parent(this);
8385  }
8386  }
8387 
8388 
8389 
8390  ///
8391  /// ParamAssign member functions definition
8392  ///
8393 
8394 
8395 
8396  std::string ParamAssign::get_node_name() const {
8397  return name->get_node_name();
8398  }
8399 
8400 
8401 
8402 
8403 
8404 
8405 
8406 
8407 
8408 
8410  /// use -> for pointer member
8411  name->accept(v);
8412  (void)v;
8413  /// optional member could be nullptr
8414  if (this->value) {
8415  this->value->accept(v);
8416  }
8417  (void)v;
8418  /// optional member could be nullptr
8419  if (this->unit) {
8420  this->unit->accept(v);
8421  }
8422  (void)v;
8423  /// optional member could be nullptr
8424  if (this->limit) {
8425  this->limit->accept(v);
8426  }
8427  (void)v;
8428  }
8429 
8431  /// use -> for pointer member
8432  name->accept(v);
8433  (void)v;
8434  /// optional member could be nullptr
8435  if (this->value) {
8436  this->value->accept(v);
8437  }
8438  (void)v;
8439  /// optional member could be nullptr
8440  if (this->unit) {
8441  this->unit->accept(v);
8442  }
8443  (void)v;
8444  /// optional member could be nullptr
8445  if (this->limit) {
8446  this->limit->accept(v);
8447  }
8448  (void)v;
8449  }
8450 
8452  v.visit_param_assign(*this);
8453  }
8454 
8456  v.visit_param_assign(*this);
8457  }
8458 
8459 
8460  ParamAssign::ParamAssign(Identifier* name, Number* value, Unit* unit, Limits* limit)
8461  : name(name), value(value), unit(unit), limit(limit) { set_parent_in_children(); }
8462 
8463 
8464  ParamAssign::ParamAssign(std::shared_ptr<Identifier> name, std::shared_ptr<Number> value, std::shared_ptr<Unit> unit, std::shared_ptr<Limits> limit)
8465  : name(name), value(value), unit(unit), limit(limit) { set_parent_in_children(); }
8466 
8467 
8468  /// copy constructor implementation
8470  /// pointer member must be reseted with the new copy
8471  if (obj.name) {
8472  this->name.reset(obj.name->clone());
8473  }
8474  /// pointer member must be reseted with the new copy
8475  if (obj.value) {
8476  this->value.reset(obj.value->clone());
8477  }
8478  /// pointer member must be reseted with the new copy
8479  if (obj.unit) {
8480  this->unit.reset(obj.unit->clone());
8481  }
8482  /// pointer member must be reseted with the new copy
8483  if (obj.limit) {
8484  this->limit.reset(obj.limit->clone());
8485  }
8486 
8487  /// if there is a token, make copy
8488  if (obj.token) {
8489  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8490  }
8491 
8492  /// set parents
8494  }
8495 
8496 
8497  /// set this parent in the children
8499 
8500  /// optional member could be nullptr
8501  if (name) {
8502  name->set_parent(this);
8503  }
8504  /// optional member could be nullptr
8505  if (value) {
8506  value->set_parent(this);
8507  }
8508  /// optional member could be nullptr
8509  if (unit) {
8510  unit->set_parent(this);
8511  }
8512  /// optional member could be nullptr
8513  if (limit) {
8514  limit->set_parent(this);
8515  }
8516 
8517  }
8518 
8519 
8520 
8521  void ParamAssign::set_name(std::shared_ptr<Identifier>&& name) {
8522  this->name = name;
8523  // set parents
8524  if (name) {
8525  name->set_parent(this);
8526  }
8527  }
8528 
8529  void ParamAssign::set_name(const std::shared_ptr<Identifier>& name) {
8530  this->name = name;
8531  // set parents
8532  if (name) {
8533  name->set_parent(this);
8534  }
8535  }
8536 
8537 
8538  void ParamAssign::set_value(std::shared_ptr<Number>&& value) {
8539  this->value = value;
8540  // set parents
8541  if (value) {
8542  value->set_parent(this);
8543  }
8544  }
8545 
8546  void ParamAssign::set_value(const std::shared_ptr<Number>& value) {
8547  this->value = value;
8548  // set parents
8549  if (value) {
8550  value->set_parent(this);
8551  }
8552  }
8553 
8554 
8555  void ParamAssign::set_unit(std::shared_ptr<Unit>&& unit) {
8556  this->unit = unit;
8557  // set parents
8558  if (unit) {
8559  unit->set_parent(this);
8560  }
8561  }
8562 
8563  void ParamAssign::set_unit(const std::shared_ptr<Unit>& unit) {
8564  this->unit = unit;
8565  // set parents
8566  if (unit) {
8567  unit->set_parent(this);
8568  }
8569  }
8570 
8571 
8572  void ParamAssign::set_limit(std::shared_ptr<Limits>&& limit) {
8573  this->limit = limit;
8574  // set parents
8575  if (limit) {
8576  limit->set_parent(this);
8577  }
8578  }
8579 
8580  void ParamAssign::set_limit(const std::shared_ptr<Limits>& limit) {
8581  this->limit = limit;
8582  // set parents
8583  if (limit) {
8584  limit->set_parent(this);
8585  }
8586  }
8587 
8588 
8589 
8590  ///
8591  /// AssignedDefinition member functions definition
8592  ///
8593 
8594 
8595 
8597  return name->get_node_name();
8598  }
8599 
8600 
8601 
8602 
8603 
8604 
8605 
8606 
8607 
8608 
8609 
8610 
8611 
8612 
8613 
8614 
8615 
8616 
8617 
8619  /// use -> for pointer member
8620  name->accept(v);
8621  (void)v;
8622  /// optional member could be nullptr
8623  if (this->length) {
8624  this->length->accept(v);
8625  }
8626  (void)v;
8627  /// optional member could be nullptr
8628  if (this->from) {
8629  this->from->accept(v);
8630  }
8631  (void)v;
8632  /// optional member could be nullptr
8633  if (this->to) {
8634  this->to->accept(v);
8635  }
8636  (void)v;
8637  /// optional member could be nullptr
8638  if (this->start) {
8639  this->start->accept(v);
8640  }
8641  (void)v;
8642  /// optional member could be nullptr
8643  if (this->unit) {
8644  this->unit->accept(v);
8645  }
8646  (void)v;
8647  /// optional member could be nullptr
8648  if (this->abstol) {
8649  this->abstol->accept(v);
8650  }
8651  (void)v;
8652  }
8653 
8655  /// use -> for pointer member
8656  name->accept(v);
8657  (void)v;
8658  /// optional member could be nullptr
8659  if (this->length) {
8660  this->length->accept(v);
8661  }
8662  (void)v;
8663  /// optional member could be nullptr
8664  if (this->from) {
8665  this->from->accept(v);
8666  }
8667  (void)v;
8668  /// optional member could be nullptr
8669  if (this->to) {
8670  this->to->accept(v);
8671  }
8672  (void)v;
8673  /// optional member could be nullptr
8674  if (this->start) {
8675  this->start->accept(v);
8676  }
8677  (void)v;
8678  /// optional member could be nullptr
8679  if (this->unit) {
8680  this->unit->accept(v);
8681  }
8682  (void)v;
8683  /// optional member could be nullptr
8684  if (this->abstol) {
8685  this->abstol->accept(v);
8686  }
8687  (void)v;
8688  }
8689 
8691  v.visit_assigned_definition(*this);
8692  }
8693 
8695  v.visit_assigned_definition(*this);
8696  }
8697 
8698 
8699  AssignedDefinition::AssignedDefinition(Identifier* name, Integer* length, Number* from, Number* to, Number* start, Unit* unit, Double* abstol)
8700  : name(name), length(length), from(from), to(to), start(start), unit(unit), abstol(abstol) { set_parent_in_children(); }
8701 
8702 
8703  AssignedDefinition::AssignedDefinition(std::shared_ptr<Identifier> name, std::shared_ptr<Integer> length, std::shared_ptr<Number> from, std::shared_ptr<Number> to, std::shared_ptr<Number> start, std::shared_ptr<Unit> unit, std::shared_ptr<Double> abstol)
8704  : name(name), length(length), from(from), to(to), start(start), unit(unit), abstol(abstol) { set_parent_in_children(); }
8705 
8706 
8707  /// copy constructor implementation
8709  /// pointer member must be reseted with the new copy
8710  if (obj.name) {
8711  this->name.reset(obj.name->clone());
8712  }
8713  /// pointer member must be reseted with the new copy
8714  if (obj.length) {
8715  this->length.reset(obj.length->clone());
8716  }
8717  /// pointer member must be reseted with the new copy
8718  if (obj.from) {
8719  this->from.reset(obj.from->clone());
8720  }
8721  /// pointer member must be reseted with the new copy
8722  if (obj.to) {
8723  this->to.reset(obj.to->clone());
8724  }
8725  /// pointer member must be reseted with the new copy
8726  if (obj.start) {
8727  this->start.reset(obj.start->clone());
8728  }
8729  /// pointer member must be reseted with the new copy
8730  if (obj.unit) {
8731  this->unit.reset(obj.unit->clone());
8732  }
8733  /// pointer member must be reseted with the new copy
8734  if (obj.abstol) {
8735  this->abstol.reset(obj.abstol->clone());
8736  }
8737 
8738  /// if there is a token, make copy
8739  if (obj.token) {
8740  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8741  }
8742 
8743  /// set parents
8745  }
8746 
8747 
8748  /// set this parent in the children
8750 
8751  /// optional member could be nullptr
8752  if (name) {
8753  name->set_parent(this);
8754  }
8755  /// optional member could be nullptr
8756  if (length) {
8757  length->set_parent(this);
8758  }
8759  /// optional member could be nullptr
8760  if (from) {
8761  from->set_parent(this);
8762  }
8763  /// optional member could be nullptr
8764  if (to) {
8765  to->set_parent(this);
8766  }
8767  /// optional member could be nullptr
8768  if (start) {
8769  start->set_parent(this);
8770  }
8771  /// optional member could be nullptr
8772  if (unit) {
8773  unit->set_parent(this);
8774  }
8775  /// optional member could be nullptr
8776  if (abstol) {
8777  abstol->set_parent(this);
8778  }
8779 
8780  }
8781 
8782 
8783 
8784  void AssignedDefinition::set_name(std::shared_ptr<Identifier>&& name) {
8785  this->name = name;
8786  // set parents
8787  if (name) {
8788  name->set_parent(this);
8789  }
8790  }
8791 
8792  void AssignedDefinition::set_name(const std::shared_ptr<Identifier>& name) {
8793  this->name = name;
8794  // set parents
8795  if (name) {
8796  name->set_parent(this);
8797  }
8798  }
8799 
8800 
8801  void AssignedDefinition::set_length(std::shared_ptr<Integer>&& length) {
8802  this->length = length;
8803  // set parents
8804  if (length) {
8805  length->set_parent(this);
8806  }
8807  }
8808 
8809  void AssignedDefinition::set_length(const std::shared_ptr<Integer>& length) {
8810  this->length = length;
8811  // set parents
8812  if (length) {
8813  length->set_parent(this);
8814  }
8815  }
8816 
8817 
8818  void AssignedDefinition::set_from(std::shared_ptr<Number>&& from) {
8819  this->from = from;
8820  // set parents
8821  if (from) {
8822  from->set_parent(this);
8823  }
8824  }
8825 
8826  void AssignedDefinition::set_from(const std::shared_ptr<Number>& from) {
8827  this->from = from;
8828  // set parents
8829  if (from) {
8830  from->set_parent(this);
8831  }
8832  }
8833 
8834 
8835  void AssignedDefinition::set_to(std::shared_ptr<Number>&& to) {
8836  this->to = to;
8837  // set parents
8838  if (to) {
8839  to->set_parent(this);
8840  }
8841  }
8842 
8843  void AssignedDefinition::set_to(const std::shared_ptr<Number>& to) {
8844  this->to = to;
8845  // set parents
8846  if (to) {
8847  to->set_parent(this);
8848  }
8849  }
8850 
8851 
8852  void AssignedDefinition::set_start(std::shared_ptr<Number>&& start) {
8853  this->start = start;
8854  // set parents
8855  if (start) {
8856  start->set_parent(this);
8857  }
8858  }
8859 
8860  void AssignedDefinition::set_start(const std::shared_ptr<Number>& start) {
8861  this->start = start;
8862  // set parents
8863  if (start) {
8864  start->set_parent(this);
8865  }
8866  }
8867 
8868 
8869  void AssignedDefinition::set_unit(std::shared_ptr<Unit>&& unit) {
8870  this->unit = unit;
8871  // set parents
8872  if (unit) {
8873  unit->set_parent(this);
8874  }
8875  }
8876 
8877  void AssignedDefinition::set_unit(const std::shared_ptr<Unit>& unit) {
8878  this->unit = unit;
8879  // set parents
8880  if (unit) {
8881  unit->set_parent(this);
8882  }
8883  }
8884 
8885 
8886  void AssignedDefinition::set_abstol(std::shared_ptr<Double>&& abstol) {
8887  this->abstol = abstol;
8888  // set parents
8889  if (abstol) {
8890  abstol->set_parent(this);
8891  }
8892  }
8893 
8894  void AssignedDefinition::set_abstol(const std::shared_ptr<Double>& abstol) {
8895  this->abstol = abstol;
8896  // set parents
8897  if (abstol) {
8898  abstol->set_parent(this);
8899  }
8900  }
8901 
8902 
8903 
8904  ///
8905  /// ConductanceHint member functions definition
8906  ///
8907 
8908 
8909 
8910 
8911 
8912 
8913 
8914 
8916  /// use -> for pointer member
8917  conductance->accept(v);
8918  (void)v;
8919  /// optional member could be nullptr
8920  if (this->ion) {
8921  this->ion->accept(v);
8922  }
8923  (void)v;
8924  }
8925 
8927  /// use -> for pointer member
8928  conductance->accept(v);
8929  (void)v;
8930  /// optional member could be nullptr
8931  if (this->ion) {
8932  this->ion->accept(v);
8933  }
8934  (void)v;
8935  }
8936 
8938  v.visit_conductance_hint(*this);
8939  }
8940 
8942  v.visit_conductance_hint(*this);
8943  }
8944 
8945 
8947  : conductance(conductance), ion(ion) { set_parent_in_children(); }
8948 
8949 
8950  ConductanceHint::ConductanceHint(std::shared_ptr<Name> conductance, std::shared_ptr<Name> ion)
8951  : conductance(conductance), ion(ion) { set_parent_in_children(); }
8952 
8953 
8954  /// copy constructor implementation
8956  /// pointer member must be reseted with the new copy
8957  if (obj.conductance) {
8958  this->conductance.reset(obj.conductance->clone());
8959  }
8960  /// pointer member must be reseted with the new copy
8961  if (obj.ion) {
8962  this->ion.reset(obj.ion->clone());
8963  }
8964 
8965  /// if there is a token, make copy
8966  if (obj.token) {
8967  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8968  }
8969 
8970  /// set parents
8972  }
8973 
8974 
8975  /// set this parent in the children
8977 
8978  /// optional member could be nullptr
8979  if (conductance) {
8980  conductance->set_parent(this);
8981  }
8982  /// optional member could be nullptr
8983  if (ion) {
8984  ion->set_parent(this);
8985  }
8986 
8987  }
8988 
8989 
8990 
8991  void ConductanceHint::set_conductance(std::shared_ptr<Name>&& conductance) {
8992  this->conductance = conductance;
8993  // set parents
8994  if (conductance) {
8995  conductance->set_parent(this);
8996  }
8997  }
8998 
8999  void ConductanceHint::set_conductance(const std::shared_ptr<Name>& conductance) {
9000  this->conductance = conductance;
9001  // set parents
9002  if (conductance) {
9003  conductance->set_parent(this);
9004  }
9005  }
9006 
9007 
9008  void ConductanceHint::set_ion(std::shared_ptr<Name>&& ion) {
9009  this->ion = ion;
9010  // set parents
9011  if (ion) {
9012  ion->set_parent(this);
9013  }
9014  }
9015 
9016  void ConductanceHint::set_ion(const std::shared_ptr<Name>& ion) {
9017  this->ion = ion;
9018  // set parents
9019  if (ion) {
9020  ion->set_parent(this);
9021  }
9022  }
9023 
9024 
9025 
9026  ///
9027  /// ExpressionStatement member functions definition
9028  ///
9029 
9030 
9031 
9032 
9033 
9035  /// use -> for pointer member
9036  expression->accept(v);
9037  (void)v;
9038  }
9039 
9041  /// use -> for pointer member
9042  expression->accept(v);
9043  (void)v;
9044  }
9045 
9047  v.visit_expression_statement(*this);
9048  }
9049 
9051  v.visit_expression_statement(*this);
9052  }
9053 
9054 
9056  : expression(expression) { set_parent_in_children(); }
9057 
9058 
9059  ExpressionStatement::ExpressionStatement(std::shared_ptr<Expression> expression)
9060  : expression(expression) { set_parent_in_children(); }
9061 
9062 
9063  /// copy constructor implementation
9065  /// pointer member must be reseted with the new copy
9066  if (obj.expression) {
9067  this->expression.reset(obj.expression->clone());
9068  }
9069 
9070  /// if there is a token, make copy
9071  if (obj.token) {
9072  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9073  }
9074 
9075  /// set parents
9077  }
9078 
9079 
9080  /// set this parent in the children
9082 
9083  /// optional member could be nullptr
9084  if (expression) {
9085  expression->set_parent(this);
9086  }
9087 
9088  }
9089 
9090 
9091 
9092  void ExpressionStatement::set_expression(std::shared_ptr<Expression>&& expression) {
9093  this->expression = expression;
9094  // set parents
9095  if (expression) {
9096  expression->set_parent(this);
9097  }
9098  }
9099 
9100  void ExpressionStatement::set_expression(const std::shared_ptr<Expression>& expression) {
9101  this->expression = expression;
9102  // set parents
9103  if (expression) {
9104  expression->set_parent(this);
9105  }
9106  }
9107 
9108 
9109 
9110  ///
9111  /// ProtectStatement member functions definition
9112  ///
9113 
9114 
9115 
9116 
9117 
9119  /// use -> for pointer member
9120  expression->accept(v);
9121  (void)v;
9122  }
9123 
9125  /// use -> for pointer member
9126  expression->accept(v);
9127  (void)v;
9128  }
9129 
9131  v.visit_protect_statement(*this);
9132  }
9133 
9135  v.visit_protect_statement(*this);
9136  }
9137 
9138 
9140  : expression(expression) { set_parent_in_children(); }
9141 
9142 
9143  ProtectStatement::ProtectStatement(std::shared_ptr<Expression> expression)
9144  : expression(expression) { set_parent_in_children(); }
9145 
9146 
9147  /// copy constructor implementation
9149  /// pointer member must be reseted with the new copy
9150  if (obj.expression) {
9151  this->expression.reset(obj.expression->clone());
9152  }
9153 
9154  /// if there is a token, make copy
9155  if (obj.token) {
9156  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9157  }
9158 
9159  /// set parents
9161  }
9162 
9163 
9164  /// set this parent in the children
9166 
9167  /// optional member could be nullptr
9168  if (expression) {
9169  expression->set_parent(this);
9170  }
9171 
9172  }
9173 
9174 
9175 
9176  void ProtectStatement::set_expression(std::shared_ptr<Expression>&& expression) {
9177  this->expression = expression;
9178  // set parents
9179  if (expression) {
9180  expression->set_parent(this);
9181  }
9182  }
9183 
9184  void ProtectStatement::set_expression(const std::shared_ptr<Expression>& expression) {
9185  this->expression = expression;
9186  // set parents
9187  if (expression) {
9188  expression->set_parent(this);
9189  }
9190  }
9191 
9192 
9193 
9194  ///
9195  /// FromStatement member functions definition
9196  ///
9197 
9198 
9199 
9200  std::string FromStatement::get_node_name() const {
9201  return name->get_node_name();
9202  }
9203 
9204 
9205 
9206 
9207 
9208 
9209 
9210 
9211 
9212 
9213 
9214 
9215 
9217  /// use -> for pointer member
9218  name->accept(v);
9219  (void)v;
9220  /// use -> for pointer member
9221  from->accept(v);
9222  (void)v;
9223  /// use -> for pointer member
9224  to->accept(v);
9225  (void)v;
9226  /// optional member could be nullptr
9227  if (this->increment) {
9228  this->increment->accept(v);
9229  }
9230  (void)v;
9231  /// use -> for pointer member
9232  statement_block->accept(v);
9233  (void)v;
9234  }
9235 
9237  /// use -> for pointer member
9238  name->accept(v);
9239  (void)v;
9240  /// use -> for pointer member
9241  from->accept(v);
9242  (void)v;
9243  /// use -> for pointer member
9244  to->accept(v);
9245  (void)v;
9246  /// optional member could be nullptr
9247  if (this->increment) {
9248  this->increment->accept(v);
9249  }
9250  (void)v;
9251  /// use -> for pointer member
9252  statement_block->accept(v);
9253  (void)v;
9254  }
9255 
9257  v.visit_from_statement(*this);
9258  }
9259 
9261  v.visit_from_statement(*this);
9262  }
9263 
9264 
9265  FromStatement::FromStatement(Name* name, Expression* from, Expression* to, Expression* increment, StatementBlock* statement_block)
9266  : name(name), from(from), to(to), increment(increment), statement_block(statement_block) { set_parent_in_children(); }
9267 
9268 
9269  FromStatement::FromStatement(std::shared_ptr<Name> name, std::shared_ptr<Expression> from, std::shared_ptr<Expression> to, std::shared_ptr<Expression> increment, std::shared_ptr<StatementBlock> statement_block)
9270  : name(name), from(from), to(to), increment(increment), statement_block(statement_block) { set_parent_in_children(); }
9271 
9272 
9273  /// copy constructor implementation
9275  /// pointer member must be reseted with the new copy
9276  if (obj.name) {
9277  this->name.reset(obj.name->clone());
9278  }
9279  /// pointer member must be reseted with the new copy
9280  if (obj.from) {
9281  this->from.reset(obj.from->clone());
9282  }
9283  /// pointer member must be reseted with the new copy
9284  if (obj.to) {
9285  this->to.reset(obj.to->clone());
9286  }
9287  /// pointer member must be reseted with the new copy
9288  if (obj.increment) {
9289  this->increment.reset(obj.increment->clone());
9290  }
9291  /// pointer member must be reseted with the new copy
9292  if (obj.statement_block) {
9293  this->statement_block.reset(obj.statement_block->clone());
9294  }
9295 
9296  /// if there is a token, make copy
9297  if (obj.token) {
9298  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9299  }
9300 
9301  /// set parents
9303  }
9304 
9305 
9306  /// set this parent in the children
9308 
9309  /// optional member could be nullptr
9310  if (name) {
9311  name->set_parent(this);
9312  }
9313  /// optional member could be nullptr
9314  if (from) {
9315  from->set_parent(this);
9316  }
9317  /// optional member could be nullptr
9318  if (to) {
9319  to->set_parent(this);
9320  }
9321  /// optional member could be nullptr
9322  if (increment) {
9323  increment->set_parent(this);
9324  }
9325  /// optional member could be nullptr
9326  if (statement_block) {
9327  statement_block->set_parent(this);
9328  }
9329 
9330  }
9331 
9332 
9333 
9334  void FromStatement::set_name(std::shared_ptr<Name>&& name) {
9335  this->name = name;
9336  // set parents
9337  if (name) {
9338  name->set_parent(this);
9339  }
9340  }
9341 
9342  void FromStatement::set_name(const std::shared_ptr<Name>& name) {
9343  this->name = name;
9344  // set parents
9345  if (name) {
9346  name->set_parent(this);
9347  }
9348  }
9349 
9350 
9351  void FromStatement::set_from(std::shared_ptr<Expression>&& from) {
9352  this->from = from;
9353  // set parents
9354  if (from) {
9355  from->set_parent(this);
9356  }
9357  }
9358 
9359  void FromStatement::set_from(const std::shared_ptr<Expression>& from) {
9360  this->from = from;
9361  // set parents
9362  if (from) {
9363  from->set_parent(this);
9364  }
9365  }
9366 
9367 
9368  void FromStatement::set_to(std::shared_ptr<Expression>&& to) {
9369  this->to = to;
9370  // set parents
9371  if (to) {
9372  to->set_parent(this);
9373  }
9374  }
9375 
9376  void FromStatement::set_to(const std::shared_ptr<Expression>& to) {
9377  this->to = to;
9378  // set parents
9379  if (to) {
9380  to->set_parent(this);
9381  }
9382  }
9383 
9384 
9385  void FromStatement::set_increment(std::shared_ptr<Expression>&& increment) {
9386  this->increment = increment;
9387  // set parents
9388  if (increment) {
9389  increment->set_parent(this);
9390  }
9391  }
9392 
9393  void FromStatement::set_increment(const std::shared_ptr<Expression>& increment) {
9394  this->increment = increment;
9395  // set parents
9396  if (increment) {
9397  increment->set_parent(this);
9398  }
9399  }
9400 
9401 
9402  void FromStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9404  // set parents
9405  if (statement_block) {
9406  statement_block->set_parent(this);
9407  }
9408  }
9409 
9410  void FromStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9411  this->statement_block = statement_block;
9412  // set parents
9413  if (statement_block) {
9414  statement_block->set_parent(this);
9415  }
9416  }
9417 
9418 
9419 
9420  ///
9421  /// WhileStatement member functions definition
9422  ///
9423 
9424 
9425 
9426 
9427 
9428 
9429 
9430 
9432  /// use -> for pointer member
9433  condition->accept(v);
9434  (void)v;
9435  /// use -> for pointer member
9436  statement_block->accept(v);
9437  (void)v;
9438  }
9439 
9441  /// use -> for pointer member
9442  condition->accept(v);
9443  (void)v;
9444  /// use -> for pointer member
9445  statement_block->accept(v);
9446  (void)v;
9447  }
9448 
9450  v.visit_while_statement(*this);
9451  }
9452 
9454  v.visit_while_statement(*this);
9455  }
9456 
9457 
9459  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9460 
9461 
9462  WhileStatement::WhileStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block)
9463  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9464 
9465 
9466  /// copy constructor implementation
9468  /// pointer member must be reseted with the new copy
9469  if (obj.condition) {
9470  this->condition.reset(obj.condition->clone());
9471  }
9472  /// pointer member must be reseted with the new copy
9473  if (obj.statement_block) {
9474  this->statement_block.reset(obj.statement_block->clone());
9475  }
9476 
9477  /// if there is a token, make copy
9478  if (obj.token) {
9479  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9480  }
9481 
9482  /// set parents
9484  }
9485 
9486 
9487  /// set this parent in the children
9489 
9490  /// optional member could be nullptr
9491  if (condition) {
9492  condition->set_parent(this);
9493  }
9494  /// optional member could be nullptr
9495  if (statement_block) {
9496  statement_block->set_parent(this);
9497  }
9498 
9499  }
9500 
9501 
9502 
9503  void WhileStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9504  this->condition = condition;
9505  // set parents
9506  if (condition) {
9507  condition->set_parent(this);
9508  }
9509  }
9510 
9511  void WhileStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9512  this->condition = condition;
9513  // set parents
9514  if (condition) {
9515  condition->set_parent(this);
9516  }
9517  }
9518 
9519 
9520  void WhileStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9522  // set parents
9523  if (statement_block) {
9524  statement_block->set_parent(this);
9525  }
9526  }
9527 
9528  void WhileStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9529  this->statement_block = statement_block;
9530  // set parents
9531  if (statement_block) {
9532  statement_block->set_parent(this);
9533  }
9534  }
9535 
9536 
9537 
9538  ///
9539  /// IfStatement member functions definition
9540  ///
9541 
9542 
9543 
9544 
9545 
9546 
9547 
9548 
9549 
9550 
9551 
9552 
9553 
9554 
9556  /// use -> for pointer member
9557  condition->accept(v);
9558  (void)v;
9559  /// use -> for pointer member
9560  statement_block->accept(v);
9561  (void)v;
9562  /// visit each element of vector
9563  for (auto& item : this->elseifs) {
9564  item->accept(v);
9565  }
9566  (void)v;
9567  /// optional member could be nullptr
9568  if (this->elses) {
9569  this->elses->accept(v);
9570  }
9571  (void)v;
9572  }
9573 
9575  /// use -> for pointer member
9576  condition->accept(v);
9577  (void)v;
9578  /// use -> for pointer member
9579  statement_block->accept(v);
9580  (void)v;
9581  /// visit each element of vector
9582  for (auto& item : this->elseifs) {
9583  item->accept(v);
9584  }
9585  (void)v;
9586  /// optional member could be nullptr
9587  if (this->elses) {
9588  this->elses->accept(v);
9589  }
9590  (void)v;
9591  }
9592 
9594  v.visit_if_statement(*this);
9595  }
9596 
9598  v.visit_if_statement(*this);
9599  }
9600 
9601 
9602  IfStatement::IfStatement(Expression* condition, StatementBlock* statement_block, const ElseIfStatementVector& elseifs, ElseStatement* elses)
9603  : condition(condition), statement_block(statement_block), elseifs(elseifs), elses(elses) { set_parent_in_children(); }
9604 
9605 
9606  IfStatement::IfStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block, const ElseIfStatementVector& elseifs, std::shared_ptr<ElseStatement> elses)
9607  : condition(condition), statement_block(statement_block), elseifs(elseifs), elses(elses) { set_parent_in_children(); }
9608 
9609 
9610  /// copy constructor implementation
9612  /// pointer member must be reseted with the new copy
9613  if (obj.condition) {
9614  this->condition.reset(obj.condition->clone());
9615  }
9616  /// pointer member must be reseted with the new copy
9617  if (obj.statement_block) {
9618  this->statement_block.reset(obj.statement_block->clone());
9619  }
9620  /// copy each element of vector
9621  for (auto& item : obj.elseifs) {
9622  this->elseifs.emplace_back(item->clone());
9623  }
9624  /// pointer member must be reseted with the new copy
9625  if (obj.elses) {
9626  this->elses.reset(obj.elses->clone());
9627  }
9628 
9629  /// if there is a token, make copy
9630  if (obj.token) {
9631  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9632  }
9633 
9634  /// set parents
9636  }
9637 
9638 
9639  /// set this parent in the children
9641 
9642  /// optional member could be nullptr
9643  if (condition) {
9644  condition->set_parent(this);
9645  }
9646  /// optional member could be nullptr
9647  if (statement_block) {
9648  statement_block->set_parent(this);
9649  }
9650  /// set parent for each element of the vector
9651  for (auto& item : elseifs) {
9652  item->set_parent(this);
9653 
9654  }
9655  /// optional member could be nullptr
9656  if (elses) {
9657  elses->set_parent(this);
9658  }
9659 
9660  }
9661 
9662 
9663 
9664  void IfStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9665  this->condition = condition;
9666  // set parents
9667  if (condition) {
9668  condition->set_parent(this);
9669  }
9670  }
9671 
9672  void IfStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9673  this->condition = condition;
9674  // set parents
9675  if (condition) {
9676  condition->set_parent(this);
9677  }
9678  }
9679 
9680 
9681  void IfStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9683  // set parents
9684  if (statement_block) {
9685  statement_block->set_parent(this);
9686  }
9687  }
9688 
9689  void IfStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9690  this->statement_block = statement_block;
9691  // set parents
9692  if (statement_block) {
9693  statement_block->set_parent(this);
9694  }
9695  }
9696 
9697 
9699  this->elseifs = elseifs;
9700  // set parents
9701  for (auto& ii : elseifs) {
9702  ii->set_parent(this);
9703  }
9704  }
9705 
9707  this->elseifs = elseifs;
9708  // set parents
9709  for (auto& ii : elseifs) {
9710  ii->set_parent(this);
9711  }
9712  }
9713 
9714 
9715  void IfStatement::set_elses(std::shared_ptr<ElseStatement>&& elses) {
9716  this->elses = elses;
9717  // set parents
9718  if (elses) {
9719  elses->set_parent(this);
9720  }
9721  }
9722 
9723  void IfStatement::set_elses(const std::shared_ptr<ElseStatement>& elses) {
9724  this->elses = elses;
9725  // set parents
9726  if (elses) {
9727  elses->set_parent(this);
9728  }
9729  }
9730 
9731 
9732 
9733  ///
9734  /// ElseIfStatement member functions definition
9735  ///
9736 
9737 
9738 
9739 
9740 
9741 
9742 
9743 
9745  /// use -> for pointer member
9746  condition->accept(v);
9747  (void)v;
9748  /// use -> for pointer member
9749  statement_block->accept(v);
9750  (void)v;
9751  }
9752 
9754  /// use -> for pointer member
9755  condition->accept(v);
9756  (void)v;
9757  /// use -> for pointer member
9758  statement_block->accept(v);
9759  (void)v;
9760  }
9761 
9763  v.visit_else_if_statement(*this);
9764  }
9765 
9767  v.visit_else_if_statement(*this);
9768  }
9769 
9770 
9772  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9773 
9774 
9775  ElseIfStatement::ElseIfStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block)
9776  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9777 
9778 
9779  /// copy constructor implementation
9781  /// pointer member must be reseted with the new copy
9782  if (obj.condition) {
9783  this->condition.reset(obj.condition->clone());
9784  }
9785  /// pointer member must be reseted with the new copy
9786  if (obj.statement_block) {
9787  this->statement_block.reset(obj.statement_block->clone());
9788  }
9789 
9790  /// if there is a token, make copy
9791  if (obj.token) {
9792  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9793  }
9794 
9795  /// set parents
9797  }
9798 
9799 
9800  /// set this parent in the children
9802 
9803  /// optional member could be nullptr
9804  if (condition) {
9805  condition->set_parent(this);
9806  }
9807  /// optional member could be nullptr
9808  if (statement_block) {
9809  statement_block->set_parent(this);
9810  }
9811 
9812  }
9813 
9814 
9815 
9816  void ElseIfStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9817  this->condition = condition;
9818  // set parents
9819  if (condition) {
9820  condition->set_parent(this);
9821  }
9822  }
9823 
9824  void ElseIfStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9825  this->condition = condition;
9826  // set parents
9827  if (condition) {
9828  condition->set_parent(this);
9829  }
9830  }
9831 
9832 
9833  void ElseIfStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9835  // set parents
9836  if (statement_block) {
9837  statement_block->set_parent(this);
9838  }
9839  }
9840 
9841  void ElseIfStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9842  this->statement_block = statement_block;
9843  // set parents
9844  if (statement_block) {
9845  statement_block->set_parent(this);
9846  }
9847  }
9848 
9849 
9850 
9851  ///
9852  /// ElseStatement member functions definition
9853  ///
9854 
9855 
9856 
9857 
9858 
9860  /// use -> for pointer member
9861  statement_block->accept(v);
9862  (void)v;
9863  }
9864 
9866  /// use -> for pointer member
9867  statement_block->accept(v);
9868  (void)v;
9869  }
9870 
9872  v.visit_else_statement(*this);
9873  }
9874 
9876  v.visit_else_statement(*this);
9877  }
9878 
9879 
9881  : statement_block(statement_block) { set_parent_in_children(); }
9882 
9883 
9884  ElseStatement::ElseStatement(std::shared_ptr<StatementBlock> statement_block)
9885  : statement_block(statement_block) { set_parent_in_children(); }
9886 
9887 
9888  /// copy constructor implementation
9890  /// pointer member must be reseted with the new copy
9891  if (obj.statement_block) {
9892  this->statement_block.reset(obj.statement_block->clone());
9893  }
9894 
9895  /// if there is a token, make copy
9896  if (obj.token) {
9897  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9898  }
9899 
9900  /// set parents
9902  }
9903 
9904 
9905  /// set this parent in the children
9907 
9908  /// optional member could be nullptr
9909  if (statement_block) {
9910  statement_block->set_parent(this);
9911  }
9912 
9913  }
9914 
9915 
9916 
9917  void ElseStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9919  // set parents
9920  if (statement_block) {
9921  statement_block->set_parent(this);
9922  }
9923  }
9924 
9925  void ElseStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9926  this->statement_block = statement_block;
9927  // set parents
9928  if (statement_block) {
9929  statement_block->set_parent(this);
9930  }
9931  }
9932 
9933 
9934 
9935  ///
9936  /// WatchStatement member functions definition
9937  ///
9938 
9939 
9940 /**
9941  * \brief Add member to statements by raw pointer
9942  */
9944  statements.emplace_back(n);
9945 
9946  // set parents
9947  n->set_parent(this);
9948 }
9949 
9950 /**
9951  * \brief Add member to statements by shared_ptr
9952  */
9953 void WatchStatement::emplace_back_watch(std::shared_ptr<Watch> n) {
9954  statements.emplace_back(n);
9955  // set parents
9956  n->set_parent(this);
9957 }
9958 
9959 /**
9960  * \brief Erase member to statements
9961  */
9962 WatchVector::const_iterator WatchStatement::erase_watch(WatchVector::const_iterator first) {
9963  return statements.erase(first);
9964 }
9965 /**
9966  * \brief Erase members to statements
9967  */
9968 WatchVector::const_iterator WatchStatement::erase_watch(WatchVector::const_iterator first, WatchVector::const_iterator last) {
9969  return statements.erase(first, last);
9970 }
9971 /**
9972  * \brief Erase non-consecutive members to statements
9973  *
9974  * loosely following the cpp reference of remove_if
9975  */
9976 size_t WatchStatement::erase_watch(std::unordered_set<Watch*>& to_be_erased) {
9977  auto first = statements.begin();
9978  auto last = statements.end();
9979  auto result = first;
9980 
9981  while (first != last) {
9982  // automatically erase dangling pointers from the uset while
9983  // looking for them to erase them in the vector
9984  if (to_be_erased.erase(first->get()) == 0) {
9985  reset_watch(result, *first);
9986  ++result;
9987  }
9988  ++first;
9989  }
9990 
9991  size_t out = last - result;
9992  erase_watch(result, last);
9993 
9994  return out;
9995 }
9996 
9997 /**
9998  * \brief Insert member to statements
9999  */
10000 WatchVector::const_iterator WatchStatement::insert_watch(WatchVector::const_iterator position, const std::shared_ptr<Watch>& n) {
10001  n->set_parent(this);
10002  return statements.insert(position, n);
10003 }
10004 
10005 /**
10006  * \brief Reset member to statements
10007  */
10008 void WatchStatement::reset_watch(WatchVector::const_iterator position, Watch* n) {
10009  //set parents
10010  n->set_parent(this);
10011 
10012  statements[position - statements.begin()].reset(n);
10013 }
10014 
10015 /**
10016  * \brief Reset member to statements
10017  */
10018 void WatchStatement::reset_watch(WatchVector::const_iterator position, std::shared_ptr<Watch> n) {
10019  //set parents
10020  n->set_parent(this);
10021 
10022  statements[position - statements.begin()] = n;
10023 }
10024 
10025 
10026 
10027 
10029  /// visit each element of vector
10030  for (auto& item : this->statements) {
10031  item->accept(v);
10032  }
10033  (void)v;
10034  }
10035 
10037  /// visit each element of vector
10038  for (auto& item : this->statements) {
10039  item->accept(v);
10040  }
10041  (void)v;
10042  }
10043 
10045  v.visit_watch_statement(*this);
10046  }
10047 
10049  v.visit_watch_statement(*this);
10050  }
10051 
10052 
10054  : statements(statements) { set_parent_in_children(); }
10055 
10056 
10057 
10058  /// copy constructor implementation
10060  /// copy each element of vector
10061  for (auto& item : obj.statements) {
10062  this->statements.emplace_back(item->clone());
10063  }
10064 
10065  /// if there is a token, make copy
10066  if (obj.token) {
10067  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10068  }
10069 
10070  /// set parents
10072  }
10073 
10074 
10075  /// set this parent in the children
10077 
10078  /// set parent for each element of the vector
10079  for (auto& item : statements) {
10080  item->set_parent(this);
10081 
10082  }
10083 
10084  }
10085 
10086 
10087 
10089  this->statements = statements;
10090  // set parents
10091  for (auto& ii : statements) {
10092  ii->set_parent(this);
10093  }
10094  }
10095 
10097  this->statements = statements;
10098  // set parents
10099  for (auto& ii : statements) {
10100  ii->set_parent(this);
10101  }
10102  }
10103 
10104 
10105 
10106  ///
10107  /// MutexLock member functions definition
10108  ///
10109 
10110 
10112  }
10113 
10115  }
10116 
10118  v.visit_mutex_lock(*this);
10119  }
10120 
10122  v.visit_mutex_lock(*this);
10123  }
10124 
10125 
10126 
10127 
10128  ///
10129  /// MutexUnlock member functions definition
10130  ///
10131 
10132 
10134  }
10135 
10137  }
10138 
10140  v.visit_mutex_unlock(*this);
10141  }
10142 
10144  v.visit_mutex_unlock(*this);
10145  }
10146 
10147 
10148 
10149 
10150  ///
10151  /// Conserve member functions definition
10152  ///
10153 
10154 
10155 
10156 
10157 
10158 
10159 
10160 
10162  /// use -> for pointer member
10163  react->accept(v);
10164  (void)v;
10165  /// use -> for pointer member
10166  expr->accept(v);
10167  (void)v;
10168  }
10169 
10171  /// use -> for pointer member
10172  react->accept(v);
10173  (void)v;
10174  /// use -> for pointer member
10175  expr->accept(v);
10176  (void)v;
10177  }
10178 
10180  v.visit_conserve(*this);
10181  }
10182 
10184  v.visit_conserve(*this);
10185  }
10186 
10187 
10189  : react(react), expr(expr) { set_parent_in_children(); }
10190 
10191 
10192  Conserve::Conserve(std::shared_ptr<Expression> react, std::shared_ptr<Expression> expr)
10193  : react(react), expr(expr) { set_parent_in_children(); }
10194 
10195 
10196  /// copy constructor implementation
10198  /// pointer member must be reseted with the new copy
10199  if (obj.react) {
10200  this->react.reset(obj.react->clone());
10201  }
10202  /// pointer member must be reseted with the new copy
10203  if (obj.expr) {
10204  this->expr.reset(obj.expr->clone());
10205  }
10206 
10207  /// if there is a token, make copy
10208  if (obj.token) {
10209  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10210  }
10211 
10212  /// set parents
10214  }
10215 
10216 
10217  /// set this parent in the children
10219 
10220  /// optional member could be nullptr
10221  if (react) {
10222  react->set_parent(this);
10223  }
10224  /// optional member could be nullptr
10225  if (expr) {
10226  expr->set_parent(this);
10227  }
10228 
10229  }
10230 
10231 
10232 
10233  void Conserve::set_react(std::shared_ptr<Expression>&& react) {
10234  this->react = react;
10235  // set parents
10236  if (react) {
10237  react->set_parent(this);
10238  }
10239  }
10240 
10241  void Conserve::set_react(const std::shared_ptr<Expression>& react) {
10242  this->react = react;
10243  // set parents
10244  if (react) {
10245  react->set_parent(this);
10246  }
10247  }
10248 
10249 
10250  void Conserve::set_expr(std::shared_ptr<Expression>&& expr) {
10251  this->expr = expr;
10252  // set parents
10253  if (expr) {
10254  expr->set_parent(this);
10255  }
10256  }
10257 
10258  void Conserve::set_expr(const std::shared_ptr<Expression>& expr) {
10259  this->expr = expr;
10260  // set parents
10261  if (expr) {
10262  expr->set_parent(this);
10263  }
10264  }
10265 
10266 
10267 
10268  ///
10269  /// Compartment member functions definition
10270  ///
10271 
10272 
10273 
10274 
10275 
10276 
10277 
10278 
10279 
10280 
10281 
10283  /// optional member could be nullptr
10284  if (this->index_name) {
10285  this->index_name->accept(v);
10286  }
10287  (void)v;
10288  /// use -> for pointer member
10289  volume->accept(v);
10290  (void)v;
10291  /// visit each element of vector
10292  for (auto& item : this->species) {
10293  item->accept(v);
10294  }
10295  (void)v;
10296  }
10297 
10299  /// optional member could be nullptr
10300  if (this->index_name) {
10301  this->index_name->accept(v);
10302  }
10303  (void)v;
10304  /// use -> for pointer member
10305  volume->accept(v);
10306  (void)v;
10307  /// visit each element of vector
10308  for (auto& item : this->species) {
10309  item->accept(v);
10310  }
10311  (void)v;
10312  }
10313 
10315  v.visit_compartment(*this);
10316  }
10317 
10319  v.visit_compartment(*this);
10320  }
10321 
10322 
10323  Compartment::Compartment(Name* index_name, Expression* volume, const NameVector& species)
10324  : index_name(index_name), volume(volume), species(species) { set_parent_in_children(); }
10325 
10326 
10327  Compartment::Compartment(std::shared_ptr<Name> index_name, std::shared_ptr<Expression> volume, const NameVector& species)
10328  : index_name(index_name), volume(volume), species(species) { set_parent_in_children(); }
10329 
10330 
10331  /// copy constructor implementation
10333  /// pointer member must be reseted with the new copy
10334  if (obj.index_name) {
10335  this->index_name.reset(obj.index_name->clone());
10336  }
10337  /// pointer member must be reseted with the new copy
10338  if (obj.volume) {
10339  this->volume.reset(obj.volume->clone());
10340  }
10341  /// copy each element of vector
10342  for (auto& item : obj.species) {
10343  this->species.emplace_back(item->clone());
10344  }
10345 
10346  /// if there is a token, make copy
10347  if (obj.token) {
10348  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10349  }
10350 
10351  /// set parents
10353  }
10354 
10355 
10356  /// set this parent in the children
10358 
10359  /// optional member could be nullptr
10360  if (index_name) {
10361  index_name->set_parent(this);
10362  }
10363  /// optional member could be nullptr
10364  if (volume) {
10365  volume->set_parent(this);
10366  }
10367  /// set parent for each element of the vector
10368  for (auto& item : species) {
10369  item->set_parent(this);
10370 
10371  }
10372 
10373  }
10374 
10375 
10376 
10377  void Compartment::set_index_name(std::shared_ptr<Name>&& index_name) {
10378  this->index_name = index_name;
10379  // set parents
10380  if (index_name) {
10381  index_name->set_parent(this);
10382  }
10383  }
10384 
10385  void Compartment::set_index_name(const std::shared_ptr<Name>& index_name) {
10386  this->index_name = index_name;
10387  // set parents
10388  if (index_name) {
10389  index_name->set_parent(this);
10390  }
10391  }
10392 
10393 
10394  void Compartment::set_volume(std::shared_ptr<Expression>&& volume) {
10395  this->volume = volume;
10396  // set parents
10397  if (volume) {
10398  volume->set_parent(this);
10399  }
10400  }
10401 
10402  void Compartment::set_volume(const std::shared_ptr<Expression>& volume) {
10403  this->volume = volume;
10404  // set parents
10405  if (volume) {
10406  volume->set_parent(this);
10407  }
10408  }
10409 
10410 
10412  this->species = species;
10413  // set parents
10414  for (auto& ii : species) {
10415  ii->set_parent(this);
10416  }
10417  }
10418 
10419  void Compartment::set_species(const NameVector& species) {
10420  this->species = species;
10421  // set parents
10422  for (auto& ii : species) {
10423  ii->set_parent(this);
10424  }
10425  }
10426 
10427 
10428 
10429  ///
10430  /// LonDiffuse member functions definition
10431  ///
10432 
10433 
10434 
10435 
10436 
10437 
10438 
10439 
10440 
10441 
10442 
10444  /// optional member could be nullptr
10445  if (this->index_name) {
10446  this->index_name->accept(v);
10447  }
10448  (void)v;
10449  /// use -> for pointer member
10450  rate->accept(v);
10451  (void)v;
10452  /// visit each element of vector
10453  for (auto& item : this->species) {
10454  item->accept(v);
10455  }
10456  (void)v;
10457  }
10458 
10460  /// optional member could be nullptr
10461  if (this->index_name) {
10462  this->index_name->accept(v);
10463  }
10464  (void)v;
10465  /// use -> for pointer member
10466  rate->accept(v);
10467  (void)v;
10468  /// visit each element of vector
10469  for (auto& item : this->species) {
10470  item->accept(v);
10471  }
10472  (void)v;
10473  }
10474 
10476  v.visit_lon_diffuse(*this);
10477  }
10478 
10480  v.visit_lon_diffuse(*this);
10481  }
10482 
10483 
10484  LonDiffuse::LonDiffuse(Name* index_name, Expression* rate, const NameVector& species)
10485  : index_name(index_name), rate(rate), species(species) { set_parent_in_children(); }
10486 
10487 
10488  LonDiffuse::LonDiffuse(std::shared_ptr<Name> index_name, std::shared_ptr<Expression> rate, const NameVector& species)
10489  : index_name(index_name), rate(rate), species(species) { set_parent_in_children(); }
10490 
10491 
10492  /// copy constructor implementation
10494  /// pointer member must be reseted with the new copy
10495  if (obj.index_name) {
10496  this->index_name.reset(obj.index_name->clone());
10497  }
10498  /// pointer member must be reseted with the new copy
10499  if (obj.rate) {
10500  this->rate.reset(obj.rate->clone());
10501  }
10502  /// copy each element of vector
10503  for (auto& item : obj.species) {
10504  this->species.emplace_back(item->clone());
10505  }
10506 
10507  /// if there is a token, make copy
10508  if (obj.token) {
10509  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10510  }
10511 
10512  /// set parents
10514  }
10515 
10516 
10517  /// set this parent in the children
10519 
10520  /// optional member could be nullptr
10521  if (index_name) {
10522  index_name->set_parent(this);
10523  }
10524  /// optional member could be nullptr
10525  if (rate) {
10526  rate->set_parent(this);
10527  }
10528  /// set parent for each element of the vector
10529  for (auto& item : species) {
10530  item->set_parent(this);
10531 
10532  }
10533 
10534  }
10535 
10536 
10537 
10538  void LonDiffuse::set_index_name(std::shared_ptr<Name>&& index_name) {
10539  this->index_name = index_name;
10540  // set parents
10541  if (index_name) {
10542  index_name->set_parent(this);
10543  }
10544  }
10545 
10546  void LonDiffuse::set_index_name(const std::shared_ptr<Name>& index_name) {
10547  this->index_name = index_name;
10548  // set parents
10549  if (index_name) {
10550  index_name->set_parent(this);
10551  }
10552  }
10553 
10554 
10555  void LonDiffuse::set_rate(std::shared_ptr<Expression>&& rate) {
10556  this->rate = rate;
10557  // set parents
10558  if (rate) {
10559  rate->set_parent(this);
10560  }
10561  }
10562 
10563  void LonDiffuse::set_rate(const std::shared_ptr<Expression>& rate) {
10564  this->rate = rate;
10565  // set parents
10566  if (rate) {
10567  rate->set_parent(this);
10568  }
10569  }
10570 
10571 
10573  this->species = species;
10574  // set parents
10575  for (auto& ii : species) {
10576  ii->set_parent(this);
10577  }
10578  }
10579 
10580  void LonDiffuse::set_species(const NameVector& species) {
10581  this->species = species;
10582  // set parents
10583  for (auto& ii : species) {
10584  ii->set_parent(this);
10585  }
10586  }
10587 
10588 
10589 
10590  ///
10591  /// ReactionStatement member functions definition
10592  ///
10593 
10594 
10595 
10596 
10597 
10598 
10599 
10600 
10601 
10602 
10603 
10604 
10605 
10606 
10607 
10608 
10609 
10611  /// use -> for pointer member
10612  reaction1->accept(v);
10613  (void)v;
10614  /// use . for object member
10615  op.accept(v);
10616  (void)v;
10617  /// optional member could be nullptr
10618  if (this->reaction2) {
10619  this->reaction2->accept(v);
10620  }
10621  (void)v;
10622  /// use -> for pointer member
10623  expression1->accept(v);
10624  (void)v;
10625  /// optional member could be nullptr
10626  if (this->expression2) {
10627  this->expression2->accept(v);
10628  }
10629  (void)v;
10630  }
10631 
10633  /// use -> for pointer member
10634  reaction1->accept(v);
10635  (void)v;
10636  /// use . for object member
10637  op.accept(v);
10638  (void)v;
10639  /// optional member could be nullptr
10640  if (this->reaction2) {
10641  this->reaction2->accept(v);
10642  }
10643  (void)v;
10644  /// use -> for pointer member
10645  expression1->accept(v);
10646  (void)v;
10647  /// optional member could be nullptr
10648  if (this->expression2) {
10649  this->expression2->accept(v);
10650  }
10651  (void)v;
10652  }
10653 
10655  v.visit_reaction_statement(*this);
10656  }
10657 
10659  v.visit_reaction_statement(*this);
10660  }
10661 
10662 
10663  ReactionStatement::ReactionStatement(Expression* reaction1, const ReactionOperator& op, Expression* reaction2, Expression* expression1, Expression* expression2)
10664  : reaction1(reaction1), op(op), reaction2(reaction2), expression1(expression1), expression2(expression2) { set_parent_in_children(); }
10665 
10666 
10667  ReactionStatement::ReactionStatement(std::shared_ptr<Expression> reaction1, const ReactionOperator& op, std::shared_ptr<Expression> reaction2, std::shared_ptr<Expression> expression1, std::shared_ptr<Expression> expression2)
10668  : reaction1(reaction1), op(op), reaction2(reaction2), expression1(expression1), expression2(expression2) { set_parent_in_children(); }
10669 
10670 
10671  /// copy constructor implementation
10673  /// pointer member must be reseted with the new copy
10674  if (obj.reaction1) {
10675  this->reaction1.reset(obj.reaction1->clone());
10676  }
10677  /// object member can be just copied by value
10678  this->op = obj.op;
10679  /// pointer member must be reseted with the new copy
10680  if (obj.reaction2) {
10681  this->reaction2.reset(obj.reaction2->clone());
10682  }
10683  /// pointer member must be reseted with the new copy
10684  if (obj.expression1) {
10685  this->expression1.reset(obj.expression1->clone());
10686  }
10687  /// pointer member must be reseted with the new copy
10688  if (obj.expression2) {
10689  this->expression2.reset(obj.expression2->clone());
10690  }
10691 
10692  /// if there is a token, make copy
10693  if (obj.token) {
10694  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10695  }
10696 
10697  /// set parents
10699  }
10700 
10701 
10702  /// set this parent in the children
10704 
10705  /// optional member could be nullptr
10706  if (reaction1) {
10707  reaction1->set_parent(this);
10708  }
10709  op.set_parent(this);
10710  /// optional member could be nullptr
10711  if (reaction2) {
10712  reaction2->set_parent(this);
10713  }
10714  /// optional member could be nullptr
10715  if (expression1) {
10716  expression1->set_parent(this);
10717  }
10718  /// optional member could be nullptr
10719  if (expression2) {
10720  expression2->set_parent(this);
10721  }
10722 
10723  }
10724 
10725 
10726 
10727  void ReactionStatement::set_reaction1(std::shared_ptr<Expression>&& reaction1) {
10728  this->reaction1 = reaction1;
10729  // set parents
10730  if (reaction1) {
10731  reaction1->set_parent(this);
10732  }
10733  }
10734 
10735  void ReactionStatement::set_reaction1(const std::shared_ptr<Expression>& reaction1) {
10736  this->reaction1 = reaction1;
10737  // set parents
10738  if (reaction1) {
10739  reaction1->set_parent(this);
10740  }
10741  }
10742 
10743 
10745  this->op = op;
10746  }
10747 
10749  this->op = op;
10750  }
10751 
10752 
10753  void ReactionStatement::set_reaction2(std::shared_ptr<Expression>&& reaction2) {
10754  this->reaction2 = reaction2;
10755  // set parents
10756  if (reaction2) {
10757  reaction2->set_parent(this);
10758  }
10759  }
10760 
10761  void ReactionStatement::set_reaction2(const std::shared_ptr<Expression>& reaction2) {
10762  this->reaction2 = reaction2;
10763  // set parents
10764  if (reaction2) {
10765  reaction2->set_parent(this);
10766  }
10767  }
10768 
10769 
10770  void ReactionStatement::set_expression1(std::shared_ptr<Expression>&& expression1) {
10771  this->expression1 = expression1;
10772  // set parents
10773  if (expression1) {
10774  expression1->set_parent(this);
10775  }
10776  }
10777 
10778  void ReactionStatement::set_expression1(const std::shared_ptr<Expression>& expression1) {
10779  this->expression1 = expression1;
10780  // set parents
10781  if (expression1) {
10782  expression1->set_parent(this);
10783  }
10784  }
10785 
10786 
10787  void ReactionStatement::set_expression2(std::shared_ptr<Expression>&& expression2) {
10788  this->expression2 = expression2;
10789  // set parents
10790  if (expression2) {
10791  expression2->set_parent(this);
10792  }
10793  }
10794 
10795  void ReactionStatement::set_expression2(const std::shared_ptr<Expression>& expression2) {
10796  this->expression2 = expression2;
10797  // set parents
10798  if (expression2) {
10799  expression2->set_parent(this);
10800  }
10801  }
10802 
10803 
10804 
10805  ///
10806  /// LagStatement member functions definition
10807  ///
10808 
10809 
10810 
10811 
10812 
10813 
10814 
10815 
10817  /// use -> for pointer member
10818  name->accept(v);
10819  (void)v;
10820  /// use -> for pointer member
10821  byname->accept(v);
10822  (void)v;
10823  }
10824 
10826  /// use -> for pointer member
10827  name->accept(v);
10828  (void)v;
10829  /// use -> for pointer member
10830  byname->accept(v);
10831  (void)v;
10832  }
10833 
10835  v.visit_lag_statement(*this);
10836  }
10837 
10839  v.visit_lag_statement(*this);
10840  }
10841 
10842 
10844  : name(name), byname(byname) { set_parent_in_children(); }
10845 
10846 
10847  LagStatement::LagStatement(std::shared_ptr<Identifier> name, std::shared_ptr<Name> byname)
10848  : name(name), byname(byname) { set_parent_in_children(); }
10849 
10850 
10851  /// copy constructor implementation
10853  /// pointer member must be reseted with the new copy
10854  if (obj.name) {
10855  this->name.reset(obj.name->clone());
10856  }
10857  /// pointer member must be reseted with the new copy
10858  if (obj.byname) {
10859  this->byname.reset(obj.byname->clone());
10860  }
10861 
10862  /// if there is a token, make copy
10863  if (obj.token) {
10864  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10865  }
10866 
10867  /// set parents
10869  }
10870 
10871 
10872  /// set this parent in the children
10874 
10875  /// optional member could be nullptr
10876  if (name) {
10877  name->set_parent(this);
10878  }
10879  /// optional member could be nullptr
10880  if (byname) {
10881  byname->set_parent(this);
10882  }
10883 
10884  }
10885 
10886 
10887 
10888  void LagStatement::set_name(std::shared_ptr<Identifier>&& name) {
10889  this->name = name;
10890  // set parents
10891  if (name) {
10892  name->set_parent(this);
10893  }
10894  }
10895 
10896  void LagStatement::set_name(const std::shared_ptr<Identifier>& name) {
10897  this->name = name;
10898  // set parents
10899  if (name) {
10900  name->set_parent(this);
10901  }
10902  }
10903 
10904 
10905  void LagStatement::set_byname(std::shared_ptr<Name>&& byname) {
10906  this->byname = byname;
10907  // set parents
10908  if (byname) {
10909  byname->set_parent(this);
10910  }
10911  }
10912 
10913  void LagStatement::set_byname(const std::shared_ptr<Name>& byname) {
10914  this->byname = byname;
10915  // set parents
10916  if (byname) {
10917  byname->set_parent(this);
10918  }
10919  }
10920 
10921 
10922 
10923  ///
10924  /// ConstantStatement member functions definition
10925  ///
10926 
10927 
10928 
10929 
10930 
10932  /// use -> for pointer member
10933  constant->accept(v);
10934  (void)v;
10935  }
10936 
10938  /// use -> for pointer member
10939  constant->accept(v);
10940  (void)v;
10941  }
10942 
10944  v.visit_constant_statement(*this);
10945  }
10946 
10948  v.visit_constant_statement(*this);
10949  }
10950 
10951 
10953  : constant(constant) { set_parent_in_children(); }
10954 
10955 
10956  ConstantStatement::ConstantStatement(std::shared_ptr<ConstantVar> constant)
10957  : constant(constant) { set_parent_in_children(); }
10958 
10959 
10960  /// copy constructor implementation
10962  /// pointer member must be reseted with the new copy
10963  if (obj.constant) {
10964  this->constant.reset(obj.constant->clone());
10965  }
10966 
10967  /// if there is a token, make copy
10968  if (obj.token) {
10969  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10970  }
10971 
10972  /// set parents
10974  }
10975 
10976 
10977  /// set this parent in the children
10979 
10980  /// optional member could be nullptr
10981  if (constant) {
10982  constant->set_parent(this);
10983  }
10984 
10985  }
10986 
10987 
10988 
10989  void ConstantStatement::set_constant(std::shared_ptr<ConstantVar>&& constant) {
10990  this->constant = constant;
10991  // set parents
10992  if (constant) {
10993  constant->set_parent(this);
10994  }
10995  }
10996 
10997  void ConstantStatement::set_constant(const std::shared_ptr<ConstantVar>& constant) {
10998  this->constant = constant;
10999  // set parents
11000  if (constant) {
11001  constant->set_parent(this);
11002  }
11003  }
11004 
11005 
11006 
11007  ///
11008  /// TableStatement member functions definition
11009  ///
11010 
11011 
11012 
11013 
11014 
11015 
11016 
11017 
11018 
11019 
11020 
11021 
11022 
11023 
11024 
11025 
11026 
11028  /// visit each element of vector
11029  for (auto& item : this->table_vars) {
11030  item->accept(v);
11031  }
11032  (void)v;
11033  /// visit each element of vector
11034  for (auto& item : this->depend_vars) {
11035  item->accept(v);
11036  }
11037  (void)v;
11038  /// use -> for pointer member
11039  from->accept(v);
11040  (void)v;
11041  /// use -> for pointer member
11042  to->accept(v);
11043  (void)v;
11044  /// use -> for pointer member
11045  with->accept(v);
11046  (void)v;
11047  }
11048 
11050  /// visit each element of vector
11051  for (auto& item : this->table_vars) {
11052  item->accept(v);
11053  }
11054  (void)v;
11055  /// visit each element of vector
11056  for (auto& item : this->depend_vars) {
11057  item->accept(v);
11058  }
11059  (void)v;
11060  /// use -> for pointer member
11061  from->accept(v);
11062  (void)v;
11063  /// use -> for pointer member
11064  to->accept(v);
11065  (void)v;
11066  /// use -> for pointer member
11067  with->accept(v);
11068  (void)v;
11069  }
11070 
11072  v.visit_table_statement(*this);
11073  }
11074 
11076  v.visit_table_statement(*this);
11077  }
11078 
11079 
11080  TableStatement::TableStatement(const NameVector& table_vars, const NameVector& depend_vars, Expression* from, Expression* to, Integer* with)
11081  : table_vars(table_vars), depend_vars(depend_vars), from(from), to(to), with(with) { set_parent_in_children(); }
11082 
11083 
11084  TableStatement::TableStatement(const NameVector& table_vars, const NameVector& depend_vars, std::shared_ptr<Expression> from, std::shared_ptr<Expression> to, std::shared_ptr<Integer> with)
11085  : table_vars(table_vars), depend_vars(depend_vars), from(from), to(to), with(with) { set_parent_in_children(); }
11086 
11087 
11088  /// copy constructor implementation
11090  /// copy each element of vector
11091  for (auto& item : obj.table_vars) {
11092  this->table_vars.emplace_back(item->clone());
11093  }
11094  /// copy each element of vector
11095  for (auto& item : obj.depend_vars) {
11096  this->depend_vars.emplace_back(item->clone());
11097  }
11098  /// pointer member must be reseted with the new copy
11099  if (obj.from) {
11100  this->from.reset(obj.from->clone());
11101  }
11102  /// pointer member must be reseted with the new copy
11103  if (obj.to) {
11104  this->to.reset(obj.to->clone());
11105  }
11106  /// pointer member must be reseted with the new copy
11107  if (obj.with) {
11108  this->with.reset(obj.with->clone());
11109  }
11110 
11111  /// if there is a token, make copy
11112  if (obj.token) {
11113  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11114  }
11115 
11116  /// set parents
11118  }
11119 
11120 
11121  /// set this parent in the children
11123 
11124  /// set parent for each element of the vector
11125  for (auto& item : table_vars) {
11126  item->set_parent(this);
11127 
11128  }
11129  /// set parent for each element of the vector
11130  for (auto& item : depend_vars) {
11131  item->set_parent(this);
11132 
11133  }
11134  /// optional member could be nullptr
11135  if (from) {
11136  from->set_parent(this);
11137  }
11138  /// optional member could be nullptr
11139  if (to) {
11140  to->set_parent(this);
11141  }
11142  /// optional member could be nullptr
11143  if (with) {
11144  with->set_parent(this);
11145  }
11146 
11147  }
11148 
11149 
11150 
11152  this->table_vars = table_vars;
11153  // set parents
11154  for (auto& ii : table_vars) {
11155  ii->set_parent(this);
11156  }
11157  }
11158 
11159  void TableStatement::set_table_vars(const NameVector& table_vars) {
11160  this->table_vars = table_vars;
11161  // set parents
11162  for (auto& ii : table_vars) {
11163  ii->set_parent(this);
11164  }
11165  }
11166 
11167 
11169  this->depend_vars = depend_vars;
11170  // set parents
11171  for (auto& ii : depend_vars) {
11172  ii->set_parent(this);
11173  }
11174  }
11175 
11176  void TableStatement::set_depend_vars(const NameVector& depend_vars) {
11177  this->depend_vars = depend_vars;
11178  // set parents
11179  for (auto& ii : depend_vars) {
11180  ii->set_parent(this);
11181  }
11182  }
11183 
11184 
11185  void TableStatement::set_from(std::shared_ptr<Expression>&& from) {
11186  this->from = from;
11187  // set parents
11188  if (from) {
11189  from->set_parent(this);
11190  }
11191  }
11192 
11193  void TableStatement::set_from(const std::shared_ptr<Expression>& from) {
11194  this->from = from;
11195  // set parents
11196  if (from) {
11197  from->set_parent(this);
11198  }
11199  }
11200 
11201 
11202  void TableStatement::set_to(std::shared_ptr<Expression>&& to) {
11203  this->to = to;
11204  // set parents
11205  if (to) {
11206  to->set_parent(this);
11207  }
11208  }
11209 
11210  void TableStatement::set_to(const std::shared_ptr<Expression>& to) {
11211  this->to = to;
11212  // set parents
11213  if (to) {
11214  to->set_parent(this);
11215  }
11216  }
11217 
11218 
11219  void TableStatement::set_with(std::shared_ptr<Integer>&& with) {
11220  this->with = with;
11221  // set parents
11222  if (with) {
11223  with->set_parent(this);
11224  }
11225  }
11226 
11227  void TableStatement::set_with(const std::shared_ptr<Integer>& with) {
11228  this->with = with;
11229  // set parents
11230  if (with) {
11231  with->set_parent(this);
11232  }
11233  }
11234 
11235 
11236 
11237  ///
11238  /// Suffix member functions definition
11239  ///
11240 
11241 
11242 
11243 
11244 
11245 
11246  std::string Suffix::get_node_name() const {
11247  return name->get_node_name();
11248  }
11249 
11251  /// use -> for pointer member
11252  type->accept(v);
11253  (void)v;
11254  /// use -> for pointer member
11255  name->accept(v);
11256  (void)v;
11257  }
11258 
11260  /// use -> for pointer member
11261  type->accept(v);
11262  (void)v;
11263  /// use -> for pointer member
11264  name->accept(v);
11265  (void)v;
11266  }
11267 
11269  v.visit_suffix(*this);
11270  }
11271 
11273  v.visit_suffix(*this);
11274  }
11275 
11276 
11277  Suffix::Suffix(Name* type, Name* name)
11278  : type(type), name(name) { set_parent_in_children(); }
11279 
11280 
11281  Suffix::Suffix(std::shared_ptr<Name> type, std::shared_ptr<Name> name)
11282  : type(type), name(name) { set_parent_in_children(); }
11283 
11284 
11285  /// copy constructor implementation
11286  Suffix::Suffix(const Suffix& obj) {
11287  /// pointer member must be reseted with the new copy
11288  if (obj.type) {
11289  this->type.reset(obj.type->clone());
11290  }
11291  /// pointer member must be reseted with the new copy
11292  if (obj.name) {
11293  this->name.reset(obj.name->clone());
11294  }
11295 
11296  /// if there is a token, make copy
11297  if (obj.token) {
11298  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11299  }
11300 
11301  /// set parents
11303  }
11304 
11305 
11306  /// set this parent in the children
11308 
11309  /// optional member could be nullptr
11310  if (type) {
11311  type->set_parent(this);
11312  }
11313  /// optional member could be nullptr
11314  if (name) {
11315  name->set_parent(this);
11316  }
11317 
11318  }
11319 
11320 
11321 
11322  void Suffix::set_type(std::shared_ptr<Name>&& type) {
11323  this->type = type;
11324  // set parents
11325  if (type) {
11326  type->set_parent(this);
11327  }
11328  }
11329 
11330  void Suffix::set_type(const std::shared_ptr<Name>& type) {
11331  this->type = type;
11332  // set parents
11333  if (type) {
11334  type->set_parent(this);
11335  }
11336  }
11337 
11338 
11339  void Suffix::set_name(std::shared_ptr<Name>&& name) {
11340  this->name = name;
11341  // set parents
11342  if (name) {
11343  name->set_parent(this);
11344  }
11345  }
11346 
11347  void Suffix::set_name(const std::shared_ptr<Name>& name) {
11348  this->name = name;
11349  // set parents
11350  if (name) {
11351  name->set_parent(this);
11352  }
11353  }
11354 
11355 
11356 
11357  ///
11358  /// Useion member functions definition
11359  ///
11360 
11361 
11362 
11363  std::string Useion::get_node_name() const {
11364  return name->get_node_name();
11365  }
11366 
11367 
11368 
11369 
11370 
11371 
11372 
11373 
11374 
11375 
11376 
11377 
11378 
11380  /// use -> for pointer member
11381  name->accept(v);
11382  (void)v;
11383  /// visit each element of vector
11384  for (auto& item : this->readlist) {
11385  item->accept(v);
11386  }
11387  (void)v;
11388  /// visit each element of vector
11389  for (auto& item : this->writelist) {
11390  item->accept(v);
11391  }
11392  (void)v;
11393  /// optional member could be nullptr
11394  if (this->valence) {
11395  this->valence->accept(v);
11396  }
11397  (void)v;
11398  /// optional member could be nullptr
11399  if (this->ontology_id) {
11400  this->ontology_id->accept(v);
11401  }
11402  (void)v;
11403  }
11404 
11406  /// use -> for pointer member
11407  name->accept(v);
11408  (void)v;
11409  /// visit each element of vector
11410  for (auto& item : this->readlist) {
11411  item->accept(v);
11412  }
11413  (void)v;
11414  /// visit each element of vector
11415  for (auto& item : this->writelist) {
11416  item->accept(v);
11417  }
11418  (void)v;
11419  /// optional member could be nullptr
11420  if (this->valence) {
11421  this->valence->accept(v);
11422  }
11423  (void)v;
11424  /// optional member could be nullptr
11425  if (this->ontology_id) {
11426  this->ontology_id->accept(v);
11427  }
11428  (void)v;
11429  }
11430 
11432  v.visit_useion(*this);
11433  }
11434 
11436  v.visit_useion(*this);
11437  }
11438 
11439 
11440  Useion::Useion(Name* name, const ReadIonVarVector& readlist, const WriteIonVarVector& writelist, Valence* valence, String* ontology_id)
11441  : name(name), readlist(readlist), writelist(writelist), valence(valence), ontology_id(ontology_id) { set_parent_in_children(); }
11442 
11443 
11444  Useion::Useion(std::shared_ptr<Name> name, const ReadIonVarVector& readlist, const WriteIonVarVector& writelist, std::shared_ptr<Valence> valence, std::shared_ptr<String> ontology_id)
11445  : name(name), readlist(readlist), writelist(writelist), valence(valence), ontology_id(ontology_id) { set_parent_in_children(); }
11446 
11447 
11448  /// copy constructor implementation
11449  Useion::Useion(const Useion& obj) {
11450  /// pointer member must be reseted with the new copy
11451  if (obj.name) {
11452  this->name.reset(obj.name->clone());
11453  }
11454  /// copy each element of vector
11455  for (auto& item : obj.readlist) {
11456  this->readlist.emplace_back(item->clone());
11457  }
11458  /// copy each element of vector
11459  for (auto& item : obj.writelist) {
11460  this->writelist.emplace_back(item->clone());
11461  }
11462  /// pointer member must be reseted with the new copy
11463  if (obj.valence) {
11464  this->valence.reset(obj.valence->clone());
11465  }
11466  /// pointer member must be reseted with the new copy
11467  if (obj.ontology_id) {
11468  this->ontology_id.reset(obj.ontology_id->clone());
11469  }
11470 
11471  /// if there is a token, make copy
11472  if (obj.token) {
11473  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11474  }
11475 
11476  /// set parents
11478  }
11479 
11480 
11481  /// set this parent in the children
11483 
11484  /// optional member could be nullptr
11485  if (name) {
11486  name->set_parent(this);
11487  }
11488  /// set parent for each element of the vector
11489  for (auto& item : readlist) {
11490  item->set_parent(this);
11491 
11492  }
11493  /// set parent for each element of the vector
11494  for (auto& item : writelist) {
11495  item->set_parent(this);
11496 
11497  }
11498  /// optional member could be nullptr
11499  if (valence) {
11500  valence->set_parent(this);
11501  }
11502  /// optional member could be nullptr
11503  if (ontology_id) {
11504  ontology_id->set_parent(this);
11505  }
11506 
11507  }
11508 
11509 
11510 
11511  void Useion::set_name(std::shared_ptr<Name>&& name) {
11512  this->name = name;
11513  // set parents
11514  if (name) {
11515  name->set_parent(this);
11516  }
11517  }
11518 
11519  void Useion::set_name(const std::shared_ptr<Name>& name) {
11520  this->name = name;
11521  // set parents
11522  if (name) {
11523  name->set_parent(this);
11524  }
11525  }
11526 
11527 
11529  this->readlist = readlist;
11530  // set parents
11531  for (auto& ii : readlist) {
11532  ii->set_parent(this);
11533  }
11534  }
11535 
11536  void Useion::set_readlist(const ReadIonVarVector& readlist) {
11537  this->readlist = readlist;
11538  // set parents
11539  for (auto& ii : readlist) {
11540  ii->set_parent(this);
11541  }
11542  }
11543 
11544 
11546  this->writelist = writelist;
11547  // set parents
11548  for (auto& ii : writelist) {
11549  ii->set_parent(this);
11550  }
11551  }
11552 
11553  void Useion::set_writelist(const WriteIonVarVector& writelist) {
11554  this->writelist = writelist;
11555  // set parents
11556  for (auto& ii : writelist) {
11557  ii->set_parent(this);
11558  }
11559  }
11560 
11561 
11562  void Useion::set_valence(std::shared_ptr<Valence>&& valence) {
11563  this->valence = valence;
11564  // set parents
11565  if (valence) {
11566  valence->set_parent(this);
11567  }
11568  }
11569 
11570  void Useion::set_valence(const std::shared_ptr<Valence>& valence) {
11571  this->valence = valence;
11572  // set parents
11573  if (valence) {
11574  valence->set_parent(this);
11575  }
11576  }
11577 
11578 
11579  void Useion::set_ontology_id(std::shared_ptr<String>&& ontology_id) {
11580  this->ontology_id = ontology_id;
11581  // set parents
11582  if (ontology_id) {
11583  ontology_id->set_parent(this);
11584  }
11585  }
11586 
11587  void Useion::set_ontology_id(const std::shared_ptr<String>& ontology_id) {
11588  this->ontology_id = ontology_id;
11589  // set parents
11590  if (ontology_id) {
11591  ontology_id->set_parent(this);
11592  }
11593  }
11594 
11595 
11596 
11597  ///
11598  /// Nonspecific member functions definition
11599  ///
11600 
11601 
11602 
11603 
11604 
11606  /// visit each element of vector
11607  for (auto& item : this->currents) {
11608  item->accept(v);
11609  }
11610  (void)v;
11611  }
11612 
11614  /// visit each element of vector
11615  for (auto& item : this->currents) {
11616  item->accept(v);
11617  }
11618  (void)v;
11619  }
11620 
11622  v.visit_nonspecific(*this);
11623  }
11624 
11626  v.visit_nonspecific(*this);
11627  }
11628 
11629 
11631  : currents(currents) { set_parent_in_children(); }
11632 
11633 
11634 
11635  /// copy constructor implementation
11637  /// copy each element of vector
11638  for (auto& item : obj.currents) {
11639  this->currents.emplace_back(item->clone());
11640  }
11641 
11642  /// if there is a token, make copy
11643  if (obj.token) {
11644  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11645  }
11646 
11647  /// set parents
11649  }
11650 
11651 
11652  /// set this parent in the children
11654 
11655  /// set parent for each element of the vector
11656  for (auto& item : currents) {
11657  item->set_parent(this);
11658 
11659  }
11660 
11661  }
11662 
11663 
11664 
11666  this->currents = currents;
11667  // set parents
11668  for (auto& ii : currents) {
11669  ii->set_parent(this);
11670  }
11671  }
11672 
11674  this->currents = currents;
11675  // set parents
11676  for (auto& ii : currents) {
11677  ii->set_parent(this);
11678  }
11679  }
11680 
11681 
11682 
11683  ///
11684  /// ElectrodeCurrent member functions definition
11685  ///
11686 
11687 
11688 
11689 
11690 
11692  /// visit each element of vector
11693  for (auto& item : this->currents) {
11694  item->accept(v);
11695  }
11696  (void)v;
11697  }
11698 
11700  /// visit each element of vector
11701  for (auto& item : this->currents) {
11702  item->accept(v);
11703  }
11704  (void)v;
11705  }
11706 
11708  v.visit_electrode_current(*this);
11709  }
11710 
11712  v.visit_electrode_current(*this);
11713  }
11714 
11715 
11717  : currents(currents) { set_parent_in_children(); }
11718 
11719 
11720 
11721  /// copy constructor implementation
11723  /// copy each element of vector
11724  for (auto& item : obj.currents) {
11725  this->currents.emplace_back(item->clone());
11726  }
11727 
11728  /// if there is a token, make copy
11729  if (obj.token) {
11730  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11731  }
11732 
11733  /// set parents
11735  }
11736 
11737 
11738  /// set this parent in the children
11740 
11741  /// set parent for each element of the vector
11742  for (auto& item : currents) {
11743  item->set_parent(this);
11744 
11745  }
11746 
11747  }
11748 
11749 
11750 
11752  this->currents = currents;
11753  // set parents
11754  for (auto& ii : currents) {
11755  ii->set_parent(this);
11756  }
11757  }
11758 
11760  this->currents = currents;
11761  // set parents
11762  for (auto& ii : currents) {
11763  ii->set_parent(this);
11764  }
11765  }
11766 
11767 
11768 
11769  ///
11770  /// Range member functions definition
11771  ///
11772 
11773 
11774 
11775 
11776 
11778  /// visit each element of vector
11779  for (auto& item : this->variables) {
11780  item->accept(v);
11781  }
11782  (void)v;
11783  }
11784 
11786  /// visit each element of vector
11787  for (auto& item : this->variables) {
11788  item->accept(v);
11789  }
11790  (void)v;
11791  }
11792 
11794  v.visit_range(*this);
11795  }
11796 
11798  v.visit_range(*this);
11799  }
11800 
11801 
11802  Range::Range(const RangeVarVector& variables)
11803  : variables(variables) { set_parent_in_children(); }
11804 
11805 
11806 
11807  /// copy constructor implementation
11808  Range::Range(const Range& obj) {
11809  /// copy each element of vector
11810  for (auto& item : obj.variables) {
11811  this->variables.emplace_back(item->clone());
11812  }
11813 
11814  /// if there is a token, make copy
11815  if (obj.token) {
11816  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11817  }
11818 
11819  /// set parents
11821  }
11822 
11823 
11824  /// set this parent in the children
11826 
11827  /// set parent for each element of the vector
11828  for (auto& item : variables) {
11829  item->set_parent(this);
11830 
11831  }
11832 
11833  }
11834 
11835 
11836 
11838  this->variables = variables;
11839  // set parents
11840  for (auto& ii : variables) {
11841  ii->set_parent(this);
11842  }
11843  }
11844 
11845  void Range::set_variables(const RangeVarVector& variables) {
11846  this->variables = variables;
11847  // set parents
11848  for (auto& ii : variables) {
11849  ii->set_parent(this);
11850  }
11851  }
11852 
11853 
11854 
11855  ///
11856  /// Global member functions definition
11857  ///
11858 
11859 
11860 /**
11861  * \brief Add member to variables by raw pointer
11862  */
11864  variables.emplace_back(n);
11865 
11866  // set parents
11867  n->set_parent(this);
11868 }
11869 
11870 /**
11871  * \brief Add member to variables by shared_ptr
11872  */
11873 void Global::emplace_back_global_var(std::shared_ptr<GlobalVar> n) {
11874  variables.emplace_back(n);
11875  // set parents
11876  n->set_parent(this);
11877 }
11878 
11879 /**
11880  * \brief Erase member to variables
11881  */
11882 GlobalVarVector::const_iterator Global::erase_global_var(GlobalVarVector::const_iterator first) {
11883  return variables.erase(first);
11884 }
11885 /**
11886  * \brief Erase members to variables
11887  */
11888 GlobalVarVector::const_iterator Global::erase_global_var(GlobalVarVector::const_iterator first, GlobalVarVector::const_iterator last) {
11889  return variables.erase(first, last);
11890 }
11891 /**
11892  * \brief Erase non-consecutive members to variables
11893  *
11894  * loosely following the cpp reference of remove_if
11895  */
11896 size_t Global::erase_global_var(std::unordered_set<GlobalVar*>& to_be_erased) {
11897  auto first = variables.begin();
11898  auto last = variables.end();
11899  auto result = first;
11900 
11901  while (first != last) {
11902  // automatically erase dangling pointers from the uset while
11903  // looking for them to erase them in the vector
11904  if (to_be_erased.erase(first->get()) == 0) {
11905  reset_global_var(result, *first);
11906  ++result;
11907  }
11908  ++first;
11909  }
11910 
11911  size_t out = last - result;
11912  erase_global_var(result, last);
11913 
11914  return out;
11915 }
11916 
11917 /**
11918  * \brief Insert member to variables
11919  */
11920 GlobalVarVector::const_iterator Global::insert_global_var(GlobalVarVector::const_iterator position, const std::shared_ptr<GlobalVar>& n) {
11921  n->set_parent(this);
11922  return variables.insert(position, n);
11923 }
11924 
11925 /**
11926  * \brief Reset member to variables
11927  */
11928 void Global::reset_global_var(GlobalVarVector::const_iterator position, GlobalVar* n) {
11929  //set parents
11930  n->set_parent(this);
11931 
11932  variables[position - variables.begin()].reset(n);
11933 }
11934 
11935 /**
11936  * \brief Reset member to variables
11937  */
11938 void Global::reset_global_var(GlobalVarVector::const_iterator position, std::shared_ptr<GlobalVar> n) {
11939  //set parents
11940  n->set_parent(this);
11941 
11942  variables[position - variables.begin()] = n;
11943 }
11944 
11945 
11946 
11947 
11949  /// visit each element of vector
11950  for (auto& item : this->variables) {
11951  item->accept(v);
11952  }
11953  (void)v;
11954  }
11955 
11957  /// visit each element of vector
11958  for (auto& item : this->variables) {
11959  item->accept(v);
11960  }
11961  (void)v;
11962  }
11963 
11965  v.visit_global(*this);
11966  }
11967 
11969  v.visit_global(*this);
11970  }
11971 
11972 
11974  : variables(variables) { set_parent_in_children(); }
11975 
11976 
11977 
11978  /// copy constructor implementation
11979  Global::Global(const Global& obj) {
11980  /// copy each element of vector
11981  for (auto& item : obj.variables) {
11982  this->variables.emplace_back(item->clone());
11983  }
11984 
11985  /// if there is a token, make copy
11986  if (obj.token) {
11987  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11988  }
11989 
11990  /// set parents
11992  }
11993 
11994 
11995  /// set this parent in the children
11997 
11998  /// set parent for each element of the vector
11999  for (auto& item : variables) {
12000  item->set_parent(this);
12001 
12002  }
12003 
12004  }
12005 
12006 
12007 
12009  this->variables = variables;
12010  // set parents
12011  for (auto& ii : variables) {
12012  ii->set_parent(this);
12013  }
12014  }
12015 
12016  void Global::set_variables(const GlobalVarVector& variables) {
12017  this->variables = variables;
12018  // set parents
12019  for (auto& ii : variables) {
12020  ii->set_parent(this);
12021  }
12022  }
12023 
12024 
12025 
12026  ///
12027  /// RandomVarList member functions definition
12028  ///
12029 
12030 
12031 
12032 
12033 
12035  /// visit each element of vector
12036  for (auto& item : this->variables) {
12037  item->accept(v);
12038  }
12039  (void)v;
12040  }
12041 
12043  /// visit each element of vector
12044  for (auto& item : this->variables) {
12045  item->accept(v);
12046  }
12047  (void)v;
12048  }
12049 
12051  v.visit_random_var_list(*this);
12052  }
12053 
12055  v.visit_random_var_list(*this);
12056  }
12057 
12058 
12060  : variables(variables) { set_parent_in_children(); }
12061 
12062 
12063 
12064  /// copy constructor implementation
12066  /// copy each element of vector
12067  for (auto& item : obj.variables) {
12068  this->variables.emplace_back(item->clone());
12069  }
12070 
12071  /// if there is a token, make copy
12072  if (obj.token) {
12073  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12074  }
12075 
12076  /// set parents
12078  }
12079 
12080 
12081  /// set this parent in the children
12083 
12084  /// set parent for each element of the vector
12085  for (auto& item : variables) {
12086  item->set_parent(this);
12087 
12088  }
12089 
12090  }
12091 
12092 
12093 
12095  this->variables = variables;
12096  // set parents
12097  for (auto& ii : variables) {
12098  ii->set_parent(this);
12099  }
12100  }
12101 
12103  this->variables = variables;
12104  // set parents
12105  for (auto& ii : variables) {
12106  ii->set_parent(this);
12107  }
12108  }
12109 
12110 
12111 
12112  ///
12113  /// Pointer member functions definition
12114  ///
12115 
12116 
12117 /**
12118  * \brief Add member to variables by raw pointer
12119  */
12121  variables.emplace_back(n);
12122 
12123  // set parents
12124  n->set_parent(this);
12125 }
12126 
12127 /**
12128  * \brief Add member to variables by shared_ptr
12129  */
12130 void Pointer::emplace_back_pointer_var(std::shared_ptr<PointerVar> n) {
12131  variables.emplace_back(n);
12132  // set parents
12133  n->set_parent(this);
12134 }
12135 
12136 /**
12137  * \brief Erase member to variables
12138  */
12139 PointerVarVector::const_iterator Pointer::erase_pointer_var(PointerVarVector::const_iterator first) {
12140  return variables.erase(first);
12141 }
12142 /**
12143  * \brief Erase members to variables
12144  */
12145 PointerVarVector::const_iterator Pointer::erase_pointer_var(PointerVarVector::const_iterator first, PointerVarVector::const_iterator last) {
12146  return variables.erase(first, last);
12147 }
12148 /**
12149  * \brief Erase non-consecutive members to variables
12150  *
12151  * loosely following the cpp reference of remove_if
12152  */
12153 size_t Pointer::erase_pointer_var(std::unordered_set<PointerVar*>& to_be_erased) {
12154  auto first = variables.begin();
12155  auto last = variables.end();
12156  auto result = first;
12157 
12158  while (first != last) {
12159  // automatically erase dangling pointers from the uset while
12160  // looking for them to erase them in the vector
12161  if (to_be_erased.erase(first->get()) == 0) {
12162  reset_pointer_var(result, *first);
12163  ++result;
12164  }
12165  ++first;
12166  }
12167 
12168  size_t out = last - result;
12169  erase_pointer_var(result, last);
12170 
12171  return out;
12172 }
12173 
12174 /**
12175  * \brief Insert member to variables
12176  */
12177 PointerVarVector::const_iterator Pointer::insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr<PointerVar>& n) {
12178  n->set_parent(this);
12179  return variables.insert(position, n);
12180 }
12181 
12182 /**
12183  * \brief Reset member to variables
12184  */
12185 void Pointer::reset_pointer_var(PointerVarVector::const_iterator position, PointerVar* n) {
12186  //set parents
12187  n->set_parent(this);
12188 
12189  variables[position - variables.begin()].reset(n);
12190 }
12191 
12192 /**
12193  * \brief Reset member to variables
12194  */
12195 void Pointer::reset_pointer_var(PointerVarVector::const_iterator position, std::shared_ptr<PointerVar> n) {
12196  //set parents
12197  n->set_parent(this);
12198 
12199  variables[position - variables.begin()] = n;
12200 }
12201 
12202 
12203 
12204 
12206  /// visit each element of vector
12207  for (auto& item : this->variables) {
12208  item->accept(v);
12209  }
12210  (void)v;
12211  }
12212 
12214  /// visit each element of vector
12215  for (auto& item : this->variables) {
12216  item->accept(v);
12217  }
12218  (void)v;
12219  }
12220 
12222  v.visit_pointer(*this);
12223  }
12224 
12226  v.visit_pointer(*this);
12227  }
12228 
12229 
12231  : variables(variables) { set_parent_in_children(); }
12232 
12233 
12234 
12235  /// copy constructor implementation
12237  /// copy each element of vector
12238  for (auto& item : obj.variables) {
12239  this->variables.emplace_back(item->clone());
12240  }
12241 
12242  /// if there is a token, make copy
12243  if (obj.token) {
12244  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12245  }
12246 
12247  /// set parents
12249  }
12250 
12251 
12252  /// set this parent in the children
12254 
12255  /// set parent for each element of the vector
12256  for (auto& item : variables) {
12257  item->set_parent(this);
12258 
12259  }
12260 
12261  }
12262 
12263 
12264 
12266  this->variables = variables;
12267  // set parents
12268  for (auto& ii : variables) {
12269  ii->set_parent(this);
12270  }
12271  }
12272 
12273  void Pointer::set_variables(const PointerVarVector& variables) {
12274  this->variables = variables;
12275  // set parents
12276  for (auto& ii : variables) {
12277  ii->set_parent(this);
12278  }
12279  }
12280 
12281 
12282 
12283  ///
12284  /// BbcorePointer member functions definition
12285  ///
12286 
12287 
12288 
12289 
12290 
12292  /// visit each element of vector
12293  for (auto& item : this->variables) {
12294  item->accept(v);
12295  }
12296  (void)v;
12297  }
12298 
12300  /// visit each element of vector
12301  for (auto& item : this->variables) {
12302  item->accept(v);
12303  }
12304  (void)v;
12305  }
12306 
12308  v.visit_bbcore_pointer(*this);
12309  }
12310 
12312  v.visit_bbcore_pointer(*this);
12313  }
12314 
12315 
12317  : variables(variables) { set_parent_in_children(); }
12318 
12319 
12320 
12321  /// copy constructor implementation
12323  /// copy each element of vector
12324  for (auto& item : obj.variables) {
12325  this->variables.emplace_back(item->clone());
12326  }
12327 
12328  /// if there is a token, make copy
12329  if (obj.token) {
12330  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12331  }
12332 
12333  /// set parents
12335  }
12336 
12337 
12338  /// set this parent in the children
12340 
12341  /// set parent for each element of the vector
12342  for (auto& item : variables) {
12343  item->set_parent(this);
12344 
12345  }
12346 
12347  }
12348 
12349 
12350 
12352  this->variables = variables;
12353  // set parents
12354  for (auto& ii : variables) {
12355  ii->set_parent(this);
12356  }
12357  }
12358 
12360  this->variables = variables;
12361  // set parents
12362  for (auto& ii : variables) {
12363  ii->set_parent(this);
12364  }
12365  }
12366 
12367 
12368 
12369  ///
12370  /// External member functions definition
12371  ///
12372 
12373 
12374 
12375 
12376 
12378  /// visit each element of vector
12379  for (auto& item : this->variables) {
12380  item->accept(v);
12381  }
12382  (void)v;
12383  }
12384 
12386  /// visit each element of vector
12387  for (auto& item : this->variables) {
12388  item->accept(v);
12389  }
12390  (void)v;
12391  }
12392 
12394  v.visit_external(*this);
12395  }
12396 
12398  v.visit_external(*this);
12399  }
12400 
12401 
12403  : variables(variables) { set_parent_in_children(); }
12404 
12405 
12406 
12407  /// copy constructor implementation
12409  /// copy each element of vector
12410  for (auto& item : obj.variables) {
12411  this->variables.emplace_back(item->clone());
12412  }
12413 
12414  /// if there is a token, make copy
12415  if (obj.token) {
12416  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12417  }
12418 
12419  /// set parents
12421  }
12422 
12423 
12424  /// set this parent in the children
12426 
12427  /// set parent for each element of the vector
12428  for (auto& item : variables) {
12429  item->set_parent(this);
12430 
12431  }
12432 
12433  }
12434 
12435 
12436 
12438  this->variables = variables;
12439  // set parents
12440  for (auto& ii : variables) {
12441  ii->set_parent(this);
12442  }
12443  }
12444 
12445  void External::set_variables(const ExternVarVector& variables) {
12446  this->variables = variables;
12447  // set parents
12448  for (auto& ii : variables) {
12449  ii->set_parent(this);
12450  }
12451  }
12452 
12453 
12454 
12455  ///
12456  /// ThreadSafe member functions definition
12457  ///
12458 
12459 
12461  }
12462 
12464  }
12465 
12467  v.visit_thread_safe(*this);
12468  }
12469 
12471  v.visit_thread_safe(*this);
12472  }
12473 
12474 
12475 
12476 
12477  ///
12478  /// Verbatim member functions definition
12479  ///
12480 
12481 
12482 
12483 
12484 
12486  /// use -> for pointer member
12487  statement->accept(v);
12488  (void)v;
12489  }
12490 
12492  /// use -> for pointer member
12493  statement->accept(v);
12494  (void)v;
12495  }
12496 
12498  v.visit_verbatim(*this);
12499  }
12500 
12502  v.visit_verbatim(*this);
12503  }
12504 
12505 
12507  : statement(statement) { set_parent_in_children(); }
12508 
12509 
12510  Verbatim::Verbatim(std::shared_ptr<String> statement)
12511  : statement(statement) { set_parent_in_children(); }
12512 
12513 
12514  /// copy constructor implementation
12516  /// pointer member must be reseted with the new copy
12517  if (obj.statement) {
12518  this->statement.reset(obj.statement->clone());
12519  }
12520 
12521  /// if there is a token, make copy
12522  if (obj.token) {
12523  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12524  }
12525 
12526  /// set parents
12528  }
12529 
12530 
12531  /// set this parent in the children
12533 
12534  /// optional member could be nullptr
12535  if (statement) {
12536  statement->set_parent(this);
12537  }
12538 
12539  }
12540 
12541 
12542 
12543  void Verbatim::set_statement(std::shared_ptr<String>&& statement) {
12544  this->statement = statement;
12545  // set parents
12546  if (statement) {
12547  statement->set_parent(this);
12548  }
12549  }
12550 
12551  void Verbatim::set_statement(const std::shared_ptr<String>& statement) {
12552  this->statement = statement;
12553  // set parents
12554  if (statement) {
12555  statement->set_parent(this);
12556  }
12557  }
12558 
12559 
12560 
12561  ///
12562  /// LineComment member functions definition
12563  ///
12564 
12565 
12566 
12567 
12568 
12570  /// use -> for pointer member
12571  statement->accept(v);
12572  (void)v;
12573  }
12574 
12576  /// use -> for pointer member
12577  statement->accept(v);
12578  (void)v;
12579  }
12580 
12582  v.visit_line_comment(*this);
12583  }
12584 
12586  v.visit_line_comment(*this);
12587  }
12588 
12589 
12591  : statement(statement) { set_parent_in_children(); }
12592 
12593 
12594  LineComment::LineComment(std::shared_ptr<String> statement)
12595  : statement(statement) { set_parent_in_children(); }
12596 
12597 
12598  /// copy constructor implementation
12600  /// pointer member must be reseted with the new copy
12601  if (obj.statement) {
12602  this->statement.reset(obj.statement->clone());
12603  }
12604 
12605  /// if there is a token, make copy
12606  if (obj.token) {
12607  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12608  }
12609 
12610  /// set parents
12612  }
12613 
12614 
12615  /// set this parent in the children
12617 
12618  /// optional member could be nullptr
12619  if (statement) {
12620  statement->set_parent(this);
12621  }
12622 
12623  }
12624 
12625 
12626 
12627  void LineComment::set_statement(std::shared_ptr<String>&& statement) {
12628  this->statement = statement;
12629  // set parents
12630  if (statement) {
12631  statement->set_parent(this);
12632  }
12633  }
12634 
12635  void LineComment::set_statement(const std::shared_ptr<String>& statement) {
12636  this->statement = statement;
12637  // set parents
12638  if (statement) {
12639  statement->set_parent(this);
12640  }
12641  }
12642 
12643 
12644 
12645  ///
12646  /// BlockComment member functions definition
12647  ///
12648 
12649 
12650 
12651 
12652 
12654  /// use -> for pointer member
12655  statement->accept(v);
12656  (void)v;
12657  }
12658 
12660  /// use -> for pointer member
12661  statement->accept(v);
12662  (void)v;
12663  }
12664 
12666  v.visit_block_comment(*this);
12667  }
12668 
12670  v.visit_block_comment(*this);
12671  }
12672 
12673 
12675  : statement(statement) { set_parent_in_children(); }
12676 
12677 
12678  BlockComment::BlockComment(std::shared_ptr<String> statement)
12679  : statement(statement) { set_parent_in_children(); }
12680 
12681 
12682  /// copy constructor implementation
12684  /// pointer member must be reseted with the new copy
12685  if (obj.statement) {
12686  this->statement.reset(obj.statement->clone());
12687  }
12688 
12689  /// if there is a token, make copy
12690  if (obj.token) {
12691  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12692  }
12693 
12694  /// set parents
12696  }
12697 
12698 
12699  /// set this parent in the children
12701 
12702  /// optional member could be nullptr
12703  if (statement) {
12704  statement->set_parent(this);
12705  }
12706 
12707  }
12708 
12709 
12710 
12711  void BlockComment::set_statement(std::shared_ptr<String>&& statement) {
12712  this->statement = statement;
12713  // set parents
12714  if (statement) {
12715  statement->set_parent(this);
12716  }
12717  }
12718 
12719  void BlockComment::set_statement(const std::shared_ptr<String>& statement) {
12720  this->statement = statement;
12721  // set parents
12722  if (statement) {
12723  statement->set_parent(this);
12724  }
12725  }
12726 
12727 
12728 
12729  ///
12730  /// OntologyStatement member functions definition
12731  ///
12732 
12733 
12734 
12735 
12736 
12738  /// use -> for pointer member
12739  ontology_id->accept(v);
12740  (void)v;
12741  }
12742 
12744  /// use -> for pointer member
12745  ontology_id->accept(v);
12746  (void)v;
12747  }
12748 
12750  v.visit_ontology_statement(*this);
12751  }
12752 
12754  v.visit_ontology_statement(*this);
12755  }
12756 
12757 
12759  : ontology_id(ontology_id) { set_parent_in_children(); }
12760 
12761 
12762  OntologyStatement::OntologyStatement(std::shared_ptr<String> ontology_id)
12763  : ontology_id(ontology_id) { set_parent_in_children(); }
12764 
12765 
12766  /// copy constructor implementation
12768  /// pointer member must be reseted with the new copy
12769  if (obj.ontology_id) {
12770  this->ontology_id.reset(obj.ontology_id->clone());
12771  }
12772 
12773  /// if there is a token, make copy
12774  if (obj.token) {
12775  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12776  }
12777 
12778  /// set parents
12780  }
12781 
12782 
12783  /// set this parent in the children
12785 
12786  /// optional member could be nullptr
12787  if (ontology_id) {
12788  ontology_id->set_parent(this);
12789  }
12790 
12791  }
12792 
12793 
12794 
12795  void OntologyStatement::set_ontology_id(std::shared_ptr<String>&& ontology_id) {
12796  this->ontology_id = ontology_id;
12797  // set parents
12798  if (ontology_id) {
12799  ontology_id->set_parent(this);
12800  }
12801  }
12802 
12803  void OntologyStatement::set_ontology_id(const std::shared_ptr<String>& ontology_id) {
12804  this->ontology_id = ontology_id;
12805  // set parents
12806  if (ontology_id) {
12807  ontology_id->set_parent(this);
12808  }
12809  }
12810 
12811 
12812 
12813  ///
12814  /// Program member functions definition
12815  ///
12816 
12817 
12818 /**
12819  * \brief Add member to blocks by raw pointer
12820  */
12822  blocks.emplace_back(n);
12823 
12824  // set parents
12825  n->set_parent(this);
12826 }
12827 
12828 /**
12829  * \brief Add member to blocks by shared_ptr
12830  */
12831 void Program::emplace_back_node(std::shared_ptr<Node> n) {
12832  blocks.emplace_back(n);
12833  // set parents
12834  n->set_parent(this);
12835 }
12836 
12837 /**
12838  * \brief Erase member to blocks
12839  */
12840 NodeVector::const_iterator Program::erase_node(NodeVector::const_iterator first) {
12841  return blocks.erase(first);
12842 }
12843 /**
12844  * \brief Erase members to blocks
12845  */
12846 NodeVector::const_iterator Program::erase_node(NodeVector::const_iterator first, NodeVector::const_iterator last) {
12847  return blocks.erase(first, last);
12848 }
12849 /**
12850  * \brief Erase non-consecutive members to blocks
12851  *
12852  * loosely following the cpp reference of remove_if
12853  */
12854 size_t Program::erase_node(std::unordered_set<Node*>& to_be_erased) {
12855  auto first = blocks.begin();
12856  auto last = blocks.end();
12857  auto result = first;
12858 
12859  while (first != last) {
12860  // automatically erase dangling pointers from the uset while
12861  // looking for them to erase them in the vector
12862  if (to_be_erased.erase(first->get()) == 0) {
12863  reset_node(result, *first);
12864  ++result;
12865  }
12866  ++first;
12867  }
12868 
12869  size_t out = last - result;
12870  erase_node(result, last);
12871 
12872  return out;
12873 }
12874 
12875 /**
12876  * \brief Insert member to blocks
12877  */
12878 NodeVector::const_iterator Program::insert_node(NodeVector::const_iterator position, const std::shared_ptr<Node>& n) {
12879  n->set_parent(this);
12880  return blocks.insert(position, n);
12881 }
12882 
12883 /**
12884  * \brief Reset member to blocks
12885  */
12886 void Program::reset_node(NodeVector::const_iterator position, Node* n) {
12887  //set parents
12888  n->set_parent(this);
12889 
12890  blocks[position - blocks.begin()].reset(n);
12891 }
12892 
12893 /**
12894  * \brief Reset member to blocks
12895  */
12896 void Program::reset_node(NodeVector::const_iterator position, std::shared_ptr<Node> n) {
12897  //set parents
12898  n->set_parent(this);
12899 
12900  blocks[position - blocks.begin()] = n;
12901 }
12902 
12903 
12904 
12905 
12907  /// visit each element of vector
12908  for (auto& item : this->blocks) {
12909  item->accept(v);
12910  }
12911  (void)v;
12912  }
12913 
12915  /// visit each element of vector
12916  for (auto& item : this->blocks) {
12917  item->accept(v);
12918  }
12919  (void)v;
12920  }
12921 
12923  v.visit_program(*this);
12924  }
12925 
12927  v.visit_program(*this);
12928  }
12929 
12930 
12932  : blocks(blocks) { set_parent_in_children(); }
12933 
12934 
12935 
12936  /// copy constructor implementation
12938  /// copy each element of vector
12939  for (auto& item : obj.blocks) {
12940  this->blocks.emplace_back(item->clone());
12941  }
12942 
12943  /// if there is a token, make copy
12944  if (obj.token) {
12945  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12946  }
12947 
12948  /// set parents
12950  }
12951 
12952 
12953  /// set this parent in the children
12955 
12956  /// set parent for each element of the vector
12957  for (auto& item : blocks) {
12958  item->set_parent(this);
12959 
12960  }
12961 
12962  }
12963 
12964 
12965 
12967  this->blocks = blocks;
12968  // set parents
12969  for (auto& ii : blocks) {
12970  ii->set_parent(this);
12971  }
12972  }
12973 
12974  void Program::set_blocks(const NodeVector& blocks) {
12975  this->blocks = blocks;
12976  // set parents
12977  for (auto& ii : blocks) {
12978  ii->set_parent(this);
12979  }
12980  }
12981 
12982 
12983 
12984  ///
12985  /// NrnStateBlock member functions definition
12986  ///
12987 
12988 
12989 
12990 
12991 
12993  /// visit each element of vector
12994  for (auto& item : this->solve_statements) {
12995  item->accept(v);
12996  }
12997  (void)v;
12998  }
12999 
13001  /// visit each element of vector
13002  for (auto& item : this->solve_statements) {
13003  item->accept(v);
13004  }
13005  (void)v;
13006  }
13007 
13009  v.visit_nrn_state_block(*this);
13010  }
13011 
13013  v.visit_nrn_state_block(*this);
13014  }
13015 
13016 
13018  : solve_statements(solve_statements) { set_parent_in_children(); }
13019 
13020 
13021 
13022  /// copy constructor implementation
13024  /// copy each element of vector
13025  for (auto& item : obj.solve_statements) {
13026  this->solve_statements.emplace_back(item->clone());
13027  }
13028 
13029  /// if there is a token, make copy
13030  if (obj.token) {
13031  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13032  }
13033 
13034  /// set parents
13036  }
13037 
13038 
13039  /// set this parent in the children
13041 
13042  /// set parent for each element of the vector
13043  for (auto& item : solve_statements) {
13044  item->set_parent(this);
13045 
13046  }
13047 
13048  }
13049 
13050 
13051 
13054  // set parents
13055  for (auto& ii : solve_statements) {
13056  ii->set_parent(this);
13057  }
13058  }
13059 
13061  this->solve_statements = solve_statements;
13062  // set parents
13063  for (auto& ii : solve_statements) {
13064  ii->set_parent(this);
13065  }
13066  }
13067 
13068 
13069 
13070  ///
13071  /// EigenNewtonSolverBlock member functions definition
13072  ///
13073 
13074 
13075 
13076 
13077 
13078 
13079 
13080 
13081 
13082 
13083 
13084 
13085 
13086 
13087 
13088 
13089 
13090 
13091 
13092 
13093 
13094 
13095 
13097  /// use -> for pointer member
13098  n_state_vars->accept(v);
13099  (void)v;
13100  /// use -> for pointer member
13101  variable_block->accept(v);
13102  (void)v;
13103  /// use -> for pointer member
13104  initialize_block->accept(v);
13105  (void)v;
13106  /// use -> for pointer member
13107  setup_x_block->accept(v);
13108  (void)v;
13109  /// use -> for pointer member
13110  functor_block->accept(v);
13111  (void)v;
13112  /// use -> for pointer member
13113  update_states_block->accept(v);
13114  (void)v;
13115  /// use -> for pointer member
13116  finalize_block->accept(v);
13117  (void)v;
13118  }
13119 
13121  /// use -> for pointer member
13122  n_state_vars->accept(v);
13123  (void)v;
13124  /// use -> for pointer member
13125  variable_block->accept(v);
13126  (void)v;
13127  /// use -> for pointer member
13128  initialize_block->accept(v);
13129  (void)v;
13130  /// use -> for pointer member
13131  setup_x_block->accept(v);
13132  (void)v;
13133  /// use -> for pointer member
13134  functor_block->accept(v);
13135  (void)v;
13136  /// use -> for pointer member
13137  update_states_block->accept(v);
13138  (void)v;
13139  /// use -> for pointer member
13140  finalize_block->accept(v);
13141  (void)v;
13142  }
13143 
13146  }
13147 
13150  }
13151 
13152 
13153  EigenNewtonSolverBlock::EigenNewtonSolverBlock(Integer* n_state_vars, StatementBlock* variable_block, StatementBlock* initialize_block, StatementBlock* setup_x_block, StatementBlock* functor_block, StatementBlock* update_states_block, StatementBlock* finalize_block)
13154  : n_state_vars(n_state_vars), variable_block(variable_block), initialize_block(initialize_block), setup_x_block(setup_x_block), functor_block(functor_block), update_states_block(update_states_block), finalize_block(finalize_block) { set_parent_in_children(); }
13155 
13156 
13157  EigenNewtonSolverBlock::EigenNewtonSolverBlock(std::shared_ptr<Integer> n_state_vars, std::shared_ptr<StatementBlock> variable_block, std::shared_ptr<StatementBlock> initialize_block, std::shared_ptr<StatementBlock> setup_x_block, std::shared_ptr<StatementBlock> functor_block, std::shared_ptr<StatementBlock> update_states_block, std::shared_ptr<StatementBlock> finalize_block)
13158  : n_state_vars(n_state_vars), variable_block(variable_block), initialize_block(initialize_block), setup_x_block(setup_x_block), functor_block(functor_block), update_states_block(update_states_block), finalize_block(finalize_block) { set_parent_in_children(); }
13159 
13160 
13161  /// copy constructor implementation
13163  /// pointer member must be reseted with the new copy
13164  if (obj.n_state_vars) {
13165  this->n_state_vars.reset(obj.n_state_vars->clone());
13166  }
13167  /// pointer member must be reseted with the new copy
13168  if (obj.variable_block) {
13169  this->variable_block.reset(obj.variable_block->clone());
13170  }
13171  /// pointer member must be reseted with the new copy
13172  if (obj.initialize_block) {
13173  this->initialize_block.reset(obj.initialize_block->clone());
13174  }
13175  /// pointer member must be reseted with the new copy
13176  if (obj.setup_x_block) {
13177  this->setup_x_block.reset(obj.setup_x_block->clone());
13178  }
13179  /// pointer member must be reseted with the new copy
13180  if (obj.functor_block) {
13181  this->functor_block.reset(obj.functor_block->clone());
13182  }
13183  /// pointer member must be reseted with the new copy
13184  if (obj.update_states_block) {
13185  this->update_states_block.reset(obj.update_states_block->clone());
13186  }
13187  /// pointer member must be reseted with the new copy
13188  if (obj.finalize_block) {
13189  this->finalize_block.reset(obj.finalize_block->clone());
13190  }
13191 
13192  /// if there is a token, make copy
13193  if (obj.token) {
13194  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13195  }
13196 
13197  /// set parents
13199  }
13200 
13201 
13202  /// set this parent in the children
13204 
13205  /// optional member could be nullptr
13206  if (n_state_vars) {
13207  n_state_vars->set_parent(this);
13208  }
13209  /// optional member could be nullptr
13210  if (variable_block) {
13211  variable_block->set_parent(this);
13212  }
13213  /// optional member could be nullptr
13214  if (initialize_block) {
13215  initialize_block->set_parent(this);
13216  }
13217  /// optional member could be nullptr
13218  if (setup_x_block) {
13219  setup_x_block->set_parent(this);
13220  }
13221  /// optional member could be nullptr
13222  if (functor_block) {
13223  functor_block->set_parent(this);
13224  }
13225  /// optional member could be nullptr
13226  if (update_states_block) {
13227  update_states_block->set_parent(this);
13228  }
13229  /// optional member could be nullptr
13230  if (finalize_block) {
13231  finalize_block->set_parent(this);
13232  }
13233 
13234  }
13235 
13236 
13237 
13238  void EigenNewtonSolverBlock::set_n_state_vars(std::shared_ptr<Integer>&& n_state_vars) {
13239  this->n_state_vars = n_state_vars;
13240  // set parents
13241  if (n_state_vars) {
13242  n_state_vars->set_parent(this);
13243  }
13244  }
13245 
13246  void EigenNewtonSolverBlock::set_n_state_vars(const std::shared_ptr<Integer>& n_state_vars) {
13247  this->n_state_vars = n_state_vars;
13248  // set parents
13249  if (n_state_vars) {
13250  n_state_vars->set_parent(this);
13251  }
13252  }
13253 
13254 
13255  void EigenNewtonSolverBlock::set_variable_block(std::shared_ptr<StatementBlock>&& variable_block) {
13257  // set parents
13258  if (variable_block) {
13259  variable_block->set_parent(this);
13260  }
13261  }
13262 
13263  void EigenNewtonSolverBlock::set_variable_block(const std::shared_ptr<StatementBlock>& variable_block) {
13264  this->variable_block = variable_block;
13265  // set parents
13266  if (variable_block) {
13267  variable_block->set_parent(this);
13268  }
13269  }
13270 
13271 
13272  void EigenNewtonSolverBlock::set_initialize_block(std::shared_ptr<StatementBlock>&& initialize_block) {
13274  // set parents
13275  if (initialize_block) {
13276  initialize_block->set_parent(this);
13277  }
13278  }
13279 
13280  void EigenNewtonSolverBlock::set_initialize_block(const std::shared_ptr<StatementBlock>& initialize_block) {
13281  this->initialize_block = initialize_block;
13282  // set parents
13283  if (initialize_block) {
13284  initialize_block->set_parent(this);
13285  }
13286  }
13287 
13288 
13289  void EigenNewtonSolverBlock::set_setup_x_block(std::shared_ptr<StatementBlock>&& setup_x_block) {
13290  this->setup_x_block = setup_x_block;
13291  // set parents
13292  if (setup_x_block) {
13293  setup_x_block->set_parent(this);
13294  }
13295  }
13296 
13297  void EigenNewtonSolverBlock::set_setup_x_block(const std::shared_ptr<StatementBlock>& setup_x_block) {
13298  this->setup_x_block = setup_x_block;
13299  // set parents
13300  if (setup_x_block) {
13301  setup_x_block->set_parent(this);
13302  }
13303  }
13304 
13305 
13306  void EigenNewtonSolverBlock::set_functor_block(std::shared_ptr<StatementBlock>&& functor_block) {
13307  this->functor_block = functor_block;
13308  // set parents
13309  if (functor_block) {
13310  functor_block->set_parent(this);
13311  }
13312  }
13313 
13314  void EigenNewtonSolverBlock::set_functor_block(const std::shared_ptr<StatementBlock>& functor_block) {
13315  this->functor_block = functor_block;
13316  // set parents
13317  if (functor_block) {
13318  functor_block->set_parent(this);
13319  }
13320  }
13321 
13322 
13323  void EigenNewtonSolverBlock::set_update_states_block(std::shared_ptr<StatementBlock>&& update_states_block) {
13325  // set parents
13326  if (update_states_block) {
13327  update_states_block->set_parent(this);
13328  }
13329  }
13330 
13331  void EigenNewtonSolverBlock::set_update_states_block(const std::shared_ptr<StatementBlock>& update_states_block) {
13332  this->update_states_block = update_states_block;
13333  // set parents
13334  if (update_states_block) {
13335  update_states_block->set_parent(this);
13336  }
13337  }
13338 
13339 
13340  void EigenNewtonSolverBlock::set_finalize_block(std::shared_ptr<StatementBlock>&& finalize_block) {
13342  // set parents
13343  if (finalize_block) {
13344  finalize_block->set_parent(this);
13345  }
13346  }
13347 
13348  void EigenNewtonSolverBlock::set_finalize_block(const std::shared_ptr<StatementBlock>& finalize_block) {
13349  this->finalize_block = finalize_block;
13350  // set parents
13351  if (finalize_block) {
13352  finalize_block->set_parent(this);
13353  }
13354  }
13355 
13356 
13357 
13358  ///
13359  /// EigenLinearSolverBlock member functions definition
13360  ///
13361 
13362 
13363 
13364 
13365 
13366 
13367 
13368 
13369 
13370 
13371 
13372 
13373 
13374 
13375 
13376 
13377 
13378 
13379 
13380 
13382  /// use -> for pointer member
13383  n_state_vars->accept(v);
13384  (void)v;
13385  /// use -> for pointer member
13386  variable_block->accept(v);
13387  (void)v;
13388  /// use -> for pointer member
13389  initialize_block->accept(v);
13390  (void)v;
13391  /// use -> for pointer member
13392  setup_x_block->accept(v);
13393  (void)v;
13394  /// use -> for pointer member
13395  update_states_block->accept(v);
13396  (void)v;
13397  /// use -> for pointer member
13398  finalize_block->accept(v);
13399  (void)v;
13400  }
13401 
13403  /// use -> for pointer member
13404  n_state_vars->accept(v);
13405  (void)v;
13406  /// use -> for pointer member
13407  variable_block->accept(v);
13408  (void)v;
13409  /// use -> for pointer member
13410  initialize_block->accept(v);
13411  (void)v;
13412  /// use -> for pointer member
13413  setup_x_block->accept(v);
13414  (void)v;
13415  /// use -> for pointer member
13416  update_states_block->accept(v);
13417  (void)v;
13418  /// use -> for pointer member
13419  finalize_block->accept(v);
13420  (void)v;
13421  }
13422 
13425  }
13426 
13429  }
13430 
13431 
13432  EigenLinearSolverBlock::EigenLinearSolverBlock(Integer* n_state_vars, StatementBlock* variable_block, StatementBlock* initialize_block, StatementBlock* setup_x_block, StatementBlock* update_states_block, StatementBlock* finalize_block)
13433  : n_state_vars(n_state_vars), variable_block(variable_block), initialize_block(initialize_block), setup_x_block(setup_x_block), update_states_block(update_states_block), finalize_block(finalize_block) { set_parent_in_children(); }
13434 
13435 
13436  EigenLinearSolverBlock::EigenLinearSolverBlock(std::shared_ptr<Integer> n_state_vars, std::shared_ptr<StatementBlock> variable_block, std::shared_ptr<StatementBlock> initialize_block, std::shared_ptr<StatementBlock> setup_x_block, std::shared_ptr<StatementBlock> update_states_block, std::shared_ptr<StatementBlock> finalize_block)
13437  : n_state_vars(n_state_vars), variable_block(variable_block), initialize_block(initialize_block), setup_x_block(setup_x_block), update_states_block(update_states_block), finalize_block(finalize_block) { set_parent_in_children(); }
13438 
13439 
13440  /// copy constructor implementation
13442  /// pointer member must be reseted with the new copy
13443  if (obj.n_state_vars) {
13444  this->n_state_vars.reset(obj.n_state_vars->clone());
13445  }
13446  /// pointer member must be reseted with the new copy
13447  if (obj.variable_block) {
13448  this->variable_block.reset(obj.variable_block->clone());
13449  }
13450  /// pointer member must be reseted with the new copy
13451  if (obj.initialize_block) {
13452  this->initialize_block.reset(obj.initialize_block->clone());
13453  }
13454  /// pointer member must be reseted with the new copy
13455  if (obj.setup_x_block) {
13456  this->setup_x_block.reset(obj.setup_x_block->clone());
13457  }
13458  /// pointer member must be reseted with the new copy
13459  if (obj.update_states_block) {
13460  this->update_states_block.reset(obj.update_states_block->clone());
13461  }
13462  /// pointer member must be reseted with the new copy
13463  if (obj.finalize_block) {
13464  this->finalize_block.reset(obj.finalize_block->clone());
13465  }
13466 
13467  /// if there is a token, make copy
13468  if (obj.token) {
13469  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13470  }
13471 
13472  /// set parents
13474  }
13475 
13476 
13477  /// set this parent in the children
13479 
13480  /// optional member could be nullptr
13481  if (n_state_vars) {
13482  n_state_vars->set_parent(this);
13483  }
13484  /// optional member could be nullptr
13485  if (variable_block) {
13486  variable_block->set_parent(this);
13487  }
13488  /// optional member could be nullptr
13489  if (initialize_block) {
13490  initialize_block->set_parent(this);
13491  }
13492  /// optional member could be nullptr
13493  if (setup_x_block) {
13494  setup_x_block->set_parent(this);
13495  }
13496  /// optional member could be nullptr
13497  if (update_states_block) {
13498  update_states_block->set_parent(this);
13499  }
13500  /// optional member could be nullptr
13501  if (finalize_block) {
13502  finalize_block->set_parent(this);
13503  }
13504 
13505  }
13506 
13507 
13508 
13509  void EigenLinearSolverBlock::set_n_state_vars(std::shared_ptr<Integer>&& n_state_vars) {
13510  this->n_state_vars = n_state_vars;
13511  // set parents
13512  if (n_state_vars) {
13513  n_state_vars->set_parent(this);
13514  }
13515  }
13516 
13517  void EigenLinearSolverBlock::set_n_state_vars(const std::shared_ptr<Integer>& n_state_vars) {
13518  this->n_state_vars = n_state_vars;
13519  // set parents
13520  if (n_state_vars) {
13521  n_state_vars->set_parent(this);
13522  }
13523  }
13524 
13525 
13526  void EigenLinearSolverBlock::set_variable_block(std::shared_ptr<StatementBlock>&& variable_block) {
13528  // set parents
13529  if (variable_block) {
13530  variable_block->set_parent(this);
13531  }
13532  }
13533 
13534  void EigenLinearSolverBlock::set_variable_block(const std::shared_ptr<StatementBlock>& variable_block) {
13535  this->variable_block = variable_block;
13536  // set parents
13537  if (variable_block) {
13538  variable_block->set_parent(this);
13539  }
13540  }
13541 
13542 
13543  void EigenLinearSolverBlock::set_initialize_block(std::shared_ptr<StatementBlock>&& initialize_block) {
13545  // set parents
13546  if (initialize_block) {
13547  initialize_block->set_parent(this);
13548  }
13549  }
13550 
13551  void EigenLinearSolverBlock::set_initialize_block(const std::shared_ptr<StatementBlock>& initialize_block) {
13552  this->initialize_block = initialize_block;
13553  // set parents
13554  if (initialize_block) {
13555  initialize_block->set_parent(this);
13556  }
13557  }
13558 
13559 
13560  void EigenLinearSolverBlock::set_setup_x_block(std::shared_ptr<StatementBlock>&& setup_x_block) {
13561  this->setup_x_block = setup_x_block;
13562  // set parents
13563  if (setup_x_block) {
13564  setup_x_block->set_parent(this);
13565  }
13566  }
13567 
13568  void EigenLinearSolverBlock::set_setup_x_block(const std::shared_ptr<StatementBlock>& setup_x_block) {
13569  this->setup_x_block = setup_x_block;
13570  // set parents
13571  if (setup_x_block) {
13572  setup_x_block->set_parent(this);
13573  }
13574  }
13575 
13576 
13577  void EigenLinearSolverBlock::set_update_states_block(std::shared_ptr<StatementBlock>&& update_states_block) {
13579  // set parents
13580  if (update_states_block) {
13581  update_states_block->set_parent(this);
13582  }
13583  }
13584 
13585  void EigenLinearSolverBlock::set_update_states_block(const std::shared_ptr<StatementBlock>& update_states_block) {
13586  this->update_states_block = update_states_block;
13587  // set parents
13588  if (update_states_block) {
13589  update_states_block->set_parent(this);
13590  }
13591  }
13592 
13593 
13594  void EigenLinearSolverBlock::set_finalize_block(std::shared_ptr<StatementBlock>&& finalize_block) {
13596  // set parents
13597  if (finalize_block) {
13598  finalize_block->set_parent(this);
13599  }
13600  }
13601 
13602  void EigenLinearSolverBlock::set_finalize_block(const std::shared_ptr<StatementBlock>& finalize_block) {
13603  this->finalize_block = finalize_block;
13604  // set parents
13605  if (finalize_block) {
13606  finalize_block->set_parent(this);
13607  }
13608  }
13609 
13610 
13611 
13612  ///
13613  /// CvodeBlock member functions definition
13614  ///
13615 
13616 
13617 
13618  std::string CvodeBlock::get_node_name() const {
13619  return name->get_node_name();
13620  }
13621 
13622 
13623 
13624 
13625 
13626 
13627 
13628 
13629 
13630 
13632  /// use -> for pointer member
13633  name->accept(v);
13634  (void)v;
13635  /// use -> for pointer member
13636  n_odes->accept(v);
13637  (void)v;
13638  /// use -> for pointer member
13639  non_stiff_block->accept(v);
13640  (void)v;
13641  /// use -> for pointer member
13642  stiff_block->accept(v);
13643  (void)v;
13644  }
13645 
13647  /// use -> for pointer member
13648  name->accept(v);
13649  (void)v;
13650  /// use -> for pointer member
13651  n_odes->accept(v);
13652  (void)v;
13653  /// use -> for pointer member
13654  non_stiff_block->accept(v);
13655  (void)v;
13656  /// use -> for pointer member
13657  stiff_block->accept(v);
13658  (void)v;
13659  }
13660 
13662  v.visit_cvode_block(*this);
13663  }
13664 
13666  v.visit_cvode_block(*this);
13667  }
13668 
13669 
13670  CvodeBlock::CvodeBlock(Name* name, Integer* n_odes, StatementBlock* non_stiff_block, StatementBlock* stiff_block)
13671  : name(name), n_odes(n_odes), non_stiff_block(non_stiff_block), stiff_block(stiff_block) { set_parent_in_children(); }
13672 
13673 
13674  CvodeBlock::CvodeBlock(std::shared_ptr<Name> name, std::shared_ptr<Integer> n_odes, std::shared_ptr<StatementBlock> non_stiff_block, std::shared_ptr<StatementBlock> stiff_block)
13675  : name(name), n_odes(n_odes), non_stiff_block(non_stiff_block), stiff_block(stiff_block) { set_parent_in_children(); }
13676 
13677 
13678  /// copy constructor implementation
13680  /// pointer member must be reseted with the new copy
13681  if (obj.name) {
13682  this->name.reset(obj.name->clone());
13683  }
13684  /// pointer member must be reseted with the new copy
13685  if (obj.n_odes) {
13686  this->n_odes.reset(obj.n_odes->clone());
13687  }
13688  /// pointer member must be reseted with the new copy
13689  if (obj.non_stiff_block) {
13690  this->non_stiff_block.reset(obj.non_stiff_block->clone());
13691  }
13692  /// pointer member must be reseted with the new copy
13693  if (obj.stiff_block) {
13694  this->stiff_block.reset(obj.stiff_block->clone());
13695  }
13696 
13697  /// if there is a token, make copy
13698  if (obj.token) {
13699  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13700  }
13701 
13702  /// set parents
13704  }
13705 
13706 
13707  /// set this parent in the children
13709 
13710  /// optional member could be nullptr
13711  if (name) {
13712  name->set_parent(this);
13713  }
13714  /// optional member could be nullptr
13715  if (n_odes) {
13716  n_odes->set_parent(this);
13717  }
13718  /// optional member could be nullptr
13719  if (non_stiff_block) {
13720  non_stiff_block->set_parent(this);
13721  }
13722  /// optional member could be nullptr
13723  if (stiff_block) {
13724  stiff_block->set_parent(this);
13725  }
13726 
13727  }
13728 
13729 
13730 
13731  void CvodeBlock::set_name(std::shared_ptr<Name>&& name) {
13732  this->name = name;
13733  // set parents
13734  if (name) {
13735  name->set_parent(this);
13736  }
13737  }
13738 
13739  void CvodeBlock::set_name(const std::shared_ptr<Name>& name) {
13740  this->name = name;
13741  // set parents
13742  if (name) {
13743  name->set_parent(this);
13744  }
13745  }
13746 
13747 
13748  void CvodeBlock::set_n_odes(std::shared_ptr<Integer>&& n_odes) {
13749  this->n_odes = n_odes;
13750  // set parents
13751  if (n_odes) {
13752  n_odes->set_parent(this);
13753  }
13754  }
13755 
13756  void CvodeBlock::set_n_odes(const std::shared_ptr<Integer>& n_odes) {
13757  this->n_odes = n_odes;
13758  // set parents
13759  if (n_odes) {
13760  n_odes->set_parent(this);
13761  }
13762  }
13763 
13764 
13765  void CvodeBlock::set_non_stiff_block(std::shared_ptr<StatementBlock>&& non_stiff_block) {
13767  // set parents
13768  if (non_stiff_block) {
13769  non_stiff_block->set_parent(this);
13770  }
13771  }
13772 
13773  void CvodeBlock::set_non_stiff_block(const std::shared_ptr<StatementBlock>& non_stiff_block) {
13774  this->non_stiff_block = non_stiff_block;
13775  // set parents
13776  if (non_stiff_block) {
13777  non_stiff_block->set_parent(this);
13778  }
13779  }
13780 
13781 
13782  void CvodeBlock::set_stiff_block(std::shared_ptr<StatementBlock>&& stiff_block) {
13783  this->stiff_block = stiff_block;
13784  // set parents
13785  if (stiff_block) {
13786  stiff_block->set_parent(this);
13787  }
13788  }
13789 
13790  void CvodeBlock::set_stiff_block(const std::shared_ptr<StatementBlock>& stiff_block) {
13791  this->stiff_block = stiff_block;
13792  // set parents
13793  if (stiff_block) {
13794  stiff_block->set_parent(this);
13795  }
13796  }
13797 
13798 
13799 
13800  ///
13801  /// LongitudinalDiffusionBlock member functions definition
13802  ///
13803 
13804 
13805 
13807  return name->get_node_name();
13808  }
13809 
13810 
13811 
13812 
13813 
13814 
13815 
13817  /// use -> for pointer member
13818  name->accept(v);
13819  (void)v;
13820  /// use -> for pointer member
13822  (void)v;
13823  /// use -> for pointer member
13824  compartment_statements->accept(v);
13825  (void)v;
13826  }
13827 
13829  /// use -> for pointer member
13830  name->accept(v);
13831  (void)v;
13832  /// use -> for pointer member
13834  (void)v;
13835  /// use -> for pointer member
13836  compartment_statements->accept(v);
13837  (void)v;
13838  }
13839 
13842  }
13843 
13846  }
13847 
13848 
13849  LongitudinalDiffusionBlock::LongitudinalDiffusionBlock(Name* name, StatementBlock* longitudinal_diffusion_statements, StatementBlock* compartment_statements)
13850  : name(name), longitudinal_diffusion_statements(longitudinal_diffusion_statements), compartment_statements(compartment_statements) { set_parent_in_children(); }
13851 
13852 
13853  LongitudinalDiffusionBlock::LongitudinalDiffusionBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> longitudinal_diffusion_statements, std::shared_ptr<StatementBlock> compartment_statements)
13854  : name(name), longitudinal_diffusion_statements(longitudinal_diffusion_statements), compartment_statements(compartment_statements) { set_parent_in_children(); }
13855 
13856 
13857  /// copy constructor implementation
13859  /// pointer member must be reseted with the new copy
13860  if (obj.name) {
13861  this->name.reset(obj.name->clone());
13862  }
13863  /// pointer member must be reseted with the new copy
13866  }
13867  /// pointer member must be reseted with the new copy
13868  if (obj.compartment_statements) {
13869  this->compartment_statements.reset(obj.compartment_statements->clone());
13870  }
13871 
13872  /// if there is a token, make copy
13873  if (obj.token) {
13874  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13875  }
13876 
13877  /// set parents
13879  }
13880 
13881 
13882  /// set this parent in the children
13884 
13885  /// optional member could be nullptr
13886  if (name) {
13887  name->set_parent(this);
13888  }
13889  /// optional member could be nullptr
13891  longitudinal_diffusion_statements->set_parent(this);
13892  }
13893  /// optional member could be nullptr
13894  if (compartment_statements) {
13895  compartment_statements->set_parent(this);
13896  }
13897 
13898  }
13899 
13900 
13901 
13902  void LongitudinalDiffusionBlock::set_name(std::shared_ptr<Name>&& name) {
13903  this->name = name;
13904  // set parents
13905  if (name) {
13906  name->set_parent(this);
13907  }
13908  }
13909 
13910  void LongitudinalDiffusionBlock::set_name(const std::shared_ptr<Name>& name) {
13911  this->name = name;
13912  // set parents
13913  if (name) {
13914  name->set_parent(this);
13915  }
13916  }
13917 
13918 
13919  void LongitudinalDiffusionBlock::set_longitudinal_diffusion_statements(std::shared_ptr<StatementBlock>&& longitudinal_diffusion_statements) {
13921  // set parents
13923  longitudinal_diffusion_statements->set_parent(this);
13924  }
13925  }
13926 
13927  void LongitudinalDiffusionBlock::set_longitudinal_diffusion_statements(const std::shared_ptr<StatementBlock>& longitudinal_diffusion_statements) {
13928  this->longitudinal_diffusion_statements = longitudinal_diffusion_statements;
13929  // set parents
13931  longitudinal_diffusion_statements->set_parent(this);
13932  }
13933  }
13934 
13935 
13936  void LongitudinalDiffusionBlock::set_compartment_statements(std::shared_ptr<StatementBlock>&& compartment_statements) {
13938  // set parents
13939  if (compartment_statements) {
13940  compartment_statements->set_parent(this);
13941  }
13942  }
13943 
13944  void LongitudinalDiffusionBlock::set_compartment_statements(const std::shared_ptr<StatementBlock>& compartment_statements) {
13945  this->compartment_statements = compartment_statements;
13946  // set parents
13947  if (compartment_statements) {
13948  compartment_statements->set_parent(this);
13949  }
13950  }
13951 
13952 
13953 
13954  ///
13955  /// WrappedExpression member functions definition
13956  ///
13957 
13958 
13959 
13960 
13961 
13963  /// use -> for pointer member
13964  expression->accept(v);
13965  (void)v;
13966  }
13967 
13969  /// use -> for pointer member
13970  expression->accept(v);
13971  (void)v;
13972  }
13973 
13975  v.visit_wrapped_expression(*this);
13976  }
13977 
13979  v.visit_wrapped_expression(*this);
13980  }
13981 
13982 
13984  : expression(expression) { set_parent_in_children(); }
13985 
13986 
13987  WrappedExpression::WrappedExpression(std::shared_ptr<Expression> expression)
13988  : expression(expression) { set_parent_in_children(); }
13989 
13990 
13991  /// copy constructor implementation
13993  /// pointer member must be reseted with the new copy
13994  if (obj.expression) {
13995  this->expression.reset(obj.expression->clone());
13996  }
13997 
13998  /// if there is a token, make copy
13999  if (obj.token) {
14000  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14001  }
14002 
14003  /// set parents
14005  }
14006 
14007 
14008  /// set this parent in the children
14010 
14011  /// optional member could be nullptr
14012  if (expression) {
14013  expression->set_parent(this);
14014  }
14015 
14016  }
14017 
14018 
14019 
14020  void WrappedExpression::set_expression(std::shared_ptr<Expression>&& expression) {
14021  this->expression = expression;
14022  // set parents
14023  if (expression) {
14024  expression->set_parent(this);
14025  }
14026  }
14027 
14028  void WrappedExpression::set_expression(const std::shared_ptr<Expression>& expression) {
14029  this->expression = expression;
14030  // set parents
14031  if (expression) {
14032  expression->set_parent(this);
14033  }
14034  }
14035 
14036 
14037 
14038  ///
14039  /// DerivimplicitCallback member functions definition
14040  ///
14041 
14042 
14043 
14044 
14045 
14047  /// use -> for pointer member
14048  node_to_solve->accept(v);
14049  (void)v;
14050  }
14051 
14053  /// use -> for pointer member
14054  node_to_solve->accept(v);
14055  (void)v;
14056  }
14057 
14060  }
14061 
14064  }
14065 
14066 
14068  : node_to_solve(node_to_solve) { set_parent_in_children(); }
14069 
14070 
14071  DerivimplicitCallback::DerivimplicitCallback(std::shared_ptr<Block> node_to_solve)
14072  : node_to_solve(node_to_solve) { set_parent_in_children(); }
14073 
14074 
14075  /// copy constructor implementation
14077  /// pointer member must be reseted with the new copy
14078  if (obj.node_to_solve) {
14079  this->node_to_solve.reset(obj.node_to_solve->clone());
14080  }
14081 
14082  /// if there is a token, make copy
14083  if (obj.token) {
14084  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14085  }
14086 
14087  /// set parents
14089  }
14090 
14091 
14092  /// set this parent in the children
14094 
14095  /// optional member could be nullptr
14096  if (node_to_solve) {
14097  node_to_solve->set_parent(this);
14098  }
14099 
14100  }
14101 
14102 
14103 
14104  void DerivimplicitCallback::set_node_to_solve(std::shared_ptr<Block>&& node_to_solve) {
14105  this->node_to_solve = node_to_solve;
14106  // set parents
14107  if (node_to_solve) {
14108  node_to_solve->set_parent(this);
14109  }
14110  }
14111 
14112  void DerivimplicitCallback::set_node_to_solve(const std::shared_ptr<Block>& node_to_solve) {
14113  this->node_to_solve = node_to_solve;
14114  // set parents
14115  if (node_to_solve) {
14116  node_to_solve->set_parent(this);
14117  }
14118  }
14119 
14120 
14121 
14122  ///
14123  /// SolutionExpression member functions definition
14124  ///
14125 
14126 
14127 
14128 
14129 
14130 
14131 
14132 
14134  /// use -> for pointer member
14135  solve_block->accept(v);
14136  (void)v;
14137  /// use -> for pointer member
14138  node_to_solve->accept(v);
14139  (void)v;
14140  }
14141 
14143  /// use -> for pointer member
14144  solve_block->accept(v);
14145  (void)v;
14146  /// use -> for pointer member
14147  node_to_solve->accept(v);
14148  (void)v;
14149  }
14150 
14152  v.visit_solution_expression(*this);
14153  }
14154 
14156  v.visit_solution_expression(*this);
14157  }
14158 
14159 
14161  : solve_block(solve_block), node_to_solve(node_to_solve) { set_parent_in_children(); }
14162 
14163 
14164  SolutionExpression::SolutionExpression(std::shared_ptr<SolveBlock> solve_block, std::shared_ptr<Expression> node_to_solve)
14165  : solve_block(solve_block), node_to_solve(node_to_solve) { set_parent_in_children(); }
14166 
14167 
14168  /// copy constructor implementation
14170  /// pointer member must be reseted with the new copy
14171  if (obj.solve_block) {
14172  this->solve_block.reset(obj.solve_block->clone());
14173  }
14174  /// pointer member must be reseted with the new copy
14175  if (obj.node_to_solve) {
14176  this->node_to_solve.reset(obj.node_to_solve->clone());
14177  }
14178 
14179  /// if there is a token, make copy
14180  if (obj.token) {
14181  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14182  }
14183 
14184  /// set parents
14186  }
14187 
14188 
14189  /// set this parent in the children
14191 
14192  /// optional member could be nullptr
14193  if (solve_block) {
14194  solve_block->set_parent(this);
14195  }
14196  /// optional member could be nullptr
14197  if (node_to_solve) {
14198  node_to_solve->set_parent(this);
14199  }
14200 
14201  }
14202 
14203 
14204 
14205  void SolutionExpression::set_solve_block(std::shared_ptr<SolveBlock>&& solve_block) {
14206  this->solve_block = solve_block;
14207  // set parents
14208  if (solve_block) {
14209  solve_block->set_parent(this);
14210  }
14211  }
14212 
14213  void SolutionExpression::set_solve_block(const std::shared_ptr<SolveBlock>& solve_block) {
14214  this->solve_block = solve_block;
14215  // set parents
14216  if (solve_block) {
14217  solve_block->set_parent(this);
14218  }
14219  }
14220 
14221 
14222  void SolutionExpression::set_node_to_solve(std::shared_ptr<Expression>&& node_to_solve) {
14223  this->node_to_solve = node_to_solve;
14224  // set parents
14225  if (node_to_solve) {
14226  node_to_solve->set_parent(this);
14227  }
14228  }
14229 
14230  void SolutionExpression::set_node_to_solve(const std::shared_ptr<Expression>& node_to_solve) {
14231  this->node_to_solve = node_to_solve;
14232  // set parents
14233  if (node_to_solve) {
14234  node_to_solve->set_parent(this);
14235  }
14236  }
14237 
14238 
14239 
14240  ///
14241  /// UpdateDt member functions definition
14242  ///
14243 
14244 
14245 
14246 
14247 
14249  /// use -> for pointer member
14250  value->accept(v);
14251  (void)v;
14252  }
14253 
14255  /// use -> for pointer member
14256  value->accept(v);
14257  (void)v;
14258  }
14259 
14261  v.visit_update_dt(*this);
14262  }
14263 
14265  v.visit_update_dt(*this);
14266  }
14267 
14268 
14270  : value(value) { set_parent_in_children(); }
14271 
14272 
14273  UpdateDt::UpdateDt(std::shared_ptr<Double> value)
14274  : value(value) { set_parent_in_children(); }
14275 
14276 
14277  /// copy constructor implementation
14279  /// pointer member must be reseted with the new copy
14280  if (obj.value) {
14281  this->value.reset(obj.value->clone());
14282  }
14283 
14284  /// if there is a token, make copy
14285  if (obj.token) {
14286  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14287  }
14288 
14289  /// set parents
14291  }
14292 
14293 
14294  /// set this parent in the children
14296 
14297  /// optional member could be nullptr
14298  if (value) {
14299  value->set_parent(this);
14300  }
14301 
14302  }
14303 
14304 
14305 
14306  void UpdateDt::set_value(std::shared_ptr<Double>&& value) {
14307  this->value = value;
14308  // set parents
14309  if (value) {
14310  value->set_parent(this);
14311  }
14312  }
14313 
14314  void UpdateDt::set_value(const std::shared_ptr<Double>& value) {
14315  this->value = value;
14316  // set parents
14317  if (value) {
14318  value->set_parent(this);
14319  }
14320  }
14321 
14322 
14323 } // namespace nmodl::ast
14324 
nmodl::ast::SolutionExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14190
nmodl::ast::LocalListStatement::set_variables
void set_variables(LocalVarVector &&variables)
Setter for member variable LocalListStatement::variables (rvalue reference)
Definition: ast.cpp:8045
nmodl::ast::FunctionCall::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7065
nmodl::ast::BinaryOp
BinaryOp
enum Type for binary operators in NMODL
Definition: ast_common.hpp:47
nmodl::ast::ConstantStatementVector
std::vector< std::shared_ptr< ConstantStatement > > ConstantStatementVector
Definition: ast_decl.hpp:398
nmodl::visitor::ConstVisitor::visit_react_var_name
virtual void visit_react_var_name(const ast::ReactVarName &node)=0
visit node of type ast::ReactVarName
nmodl::ast::Useion::ontology_id
std::shared_ptr< String > ontology_id
Ontology to indicate the chemical ion.
Definition: useion.hpp:51
nmodl::ast::ConstantStatement::ConstantStatement
ConstantStatement(ConstantVar *constant)
Definition: ast.cpp:10952
nmodl::ast::IfStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: if_statement.hpp:50
nmodl::ast::ElseIfStatement::statement_block
std::shared_ptr< StatementBlock > statement_block
TODO.
Definition: else_if_statement.hpp:43
nmodl::ast::LocalListStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7985
nmodl::ast::IfStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9555
nmodl::ast::NrnStateBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12992
nmodl::ast::BinaryExpression::op
BinaryOperator op
Operator.
Definition: binary_expression.hpp:57
nmodl::ast::Ast::is_argument
virtual bool is_argument() const noexcept
Check if the ast node is an instance of ast::Argument.
Definition: ast.cpp:92
nmodl::visitor::ConstVisitor
Abstract base class for all constant visitors implementation.
Definition: visitor.hpp:302
nmodl::ast::RandomVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2152
nmodl::ast::Define::set_value
void set_value(std::shared_ptr< Integer > &&value)
Setter for member variable Define::value (rvalue reference)
Definition: ast.cpp:8249
nmodl::ast::StatementBlock::statements
StatementVector statements
Vector of statements.
Definition: statement_block.hpp:56
nmodl::ast::FromStatement::set_to
void set_to(std::shared_ptr< Expression > &&to)
Setter for member variable FromStatement::to (rvalue reference)
Definition: ast.cpp:9368
nmodl::ast::DerivativeBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: derivative_block.hpp:56
nmodl::ast::NumberRange::token
std::shared_ptr< ModToken > token
token with location information
Definition: number_range.hpp:45
nmodl::ast::TableStatement::set_table_vars
void set_table_vars(NameVector &&table_vars)
Setter for member variable TableStatement::table_vars (rvalue reference)
Definition: ast.cpp:11151
nmodl::ast::ParamAssign
TODO.
Definition: param_assign.hpp:38
nmodl::ast::FunctionTableBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3814
nmodl::ast::BeforeBlock
Represents a BEFORE block in NMODL.
Definition: before_block.hpp:38
nmodl::ast::Global::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11964
nmodl::ast::LonDiffuse::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10518
nmodl::ast::LonDiffuse::token
std::shared_ptr< ModToken > token
token with location information
Definition: lon_diffuse.hpp:48
nmodl::ast::ConstantVar
Represents a variable in the ast::ConstantBlock.
Definition: constant_var.hpp:38
nmodl::ast::Float::set_value
void set_value(std::string value)
Setter for member variable Float::value.
Definition: ast.cpp:663
nmodl::ast::SolutionExpression::set_solve_block
void set_solve_block(std::shared_ptr< SolveBlock > &&solve_block)
Setter for member variable SolutionExpression::solve_block (rvalue reference)
Definition: ast.cpp:14205
nmodl::visitor::Visitor::visit_after_block
virtual void visit_after_block(ast::AfterBlock &node)=0
visit node of type ast::AfterBlock
nmodl::ast::BinaryExpression::rhs
std::shared_ptr< Expression > rhs
RHS of the binary expression.
Definition: binary_expression.hpp:59
nmodl::ast::LagStatement::LagStatement
LagStatement(Identifier *name, Name *byname)
Definition: ast.cpp:10843
nmodl::ast::BABlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable BABlock::statement_block (rvalue reference)
Definition: ast.cpp:4990
nmodl::visitor::ConstVisitor::visit_eigen_linear_solver_block
virtual void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node)=0
visit node of type ast::EigenLinearSolverBlock
nmodl::ast::LocalVar::name
std::shared_ptr< Identifier > name
TODO.
Definition: local_var.hpp:41
nmodl::ast::UnaryOperator
TODO.
Definition: unary_operator.hpp:38
nmodl::ast::NetReceiveBlock::set_parameters
void set_parameters(ArgumentVector &&parameters)
Setter for member variable NetReceiveBlock::parameters (rvalue reference)
Definition: ast.cpp:4443
nmodl::ast::ConstantBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5384
nmodl::ast::LonDiffuse::LonDiffuse
LonDiffuse(Name *index_name, Expression *rate, const NameVector &species)
Definition: ast.cpp:10484
nmodl::ast::Ast::is_external
virtual bool is_external() const noexcept
Check if the ast node is an instance of ast::External.
Definition: ast.cpp:278
nmodl::ast::SolveBlock
TODO.
Definition: solve_block.hpp:38
nmodl::ast::RandomVarList::token
std::shared_ptr< ModToken > token
token with location information
Definition: random_var_list.hpp:52
nmodl::ast::AssignedDefinition::set_start
void set_start(std::shared_ptr< Number > &&start)
Setter for member variable AssignedDefinition::start (rvalue reference)
Definition: ast.cpp:8852
nmodl::ast::Include
Represents an INCLUDE statement in NMODL.
Definition: include.hpp:39
nmodl::ast::Useion::Useion
Useion(Name *name, const ReadIonVarVector &readlist, const WriteIonVarVector &writelist, Valence *valence, String *ontology_id)
Definition: ast.cpp:11440
nmodl::visitor::Visitor::visit_function_block
virtual void visit_function_block(ast::FunctionBlock &node)=0
visit node of type ast::FunctionBlock
nmodl::ast::Range::variables
RangeVarVector variables
Vector of range variables.
Definition: range.hpp:42
nmodl::ast::EigenLinearSolverBlock::set_finalize_block
void set_finalize_block(std::shared_ptr< StatementBlock > &&finalize_block)
Setter for member variable EigenLinearSolverBlock::finalize_block (rvalue reference)
Definition: ast.cpp:13594
nmodl::ast::Unit
TODO.
Definition: unit.hpp:38
nmodl::ast::Ast::is_double_unit
virtual bool is_double_unit() const noexcept
Check if the ast node is an instance of ast::DoubleUnit.
Definition: ast.cpp:170
nmodl::ast::ElectrodeCurVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: electrode_cur_var.hpp:43
nmodl::ast::ConstantVar::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ConstantVar::unit (rvalue reference)
Definition: ast.cpp:6216
nmodl::ast::AssignedDefinition::set_to
void set_to(std::shared_ptr< Number > &&to)
Setter for member variable AssignedDefinition::to (rvalue reference)
Definition: ast.cpp:8835
nmodl::ast::Ast::is_kinetic_block
virtual bool is_kinetic_block() const noexcept
Check if the ast node is an instance of ast::KineticBlock.
Definition: ast.cpp:160
nmodl::ast::NrnStateBlock::NrnStateBlock
NrnStateBlock(const StatementVector &solve_statements)
Definition: ast.cpp:13017
nmodl::ast::Model::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8071
nmodl::ast::NumberRange::min
std::shared_ptr< Number > min
TODO.
Definition: number_range.hpp:41
nmodl::visitor::ConstVisitor::visit_expression
virtual void visit_expression(const ast::Expression &node)=0
visit node of type ast::Expression
nmodl::ast::Watch::set_value
void set_value(std::shared_ptr< Expression > &&value)
Setter for member variable Watch::value (rvalue reference)
Definition: ast.cpp:7284
nmodl::ast::WatchStatement::set_statements
void set_statements(WatchVector &&statements)
Setter for member variable WatchStatement::statements (rvalue reference)
Definition: ast.cpp:10088
nmodl::visitor::Visitor::visit_binary_operator
virtual void visit_binary_operator(ast::BinaryOperator &node)=0
visit node of type ast::BinaryOperator
nmodl::visitor::ConstVisitor::visit_expression_statement
virtual void visit_expression_statement(const ast::ExpressionStatement &node)=0
visit node of type ast::ExpressionStatement
nmodl::ast::Ast::is_local_list_statement
virtual bool is_local_list_statement() const noexcept
Check if the ast node is an instance of ast::LocalListStatement.
Definition: ast.cpp:212
nmodl::ast::UnaryOp
UnaryOp
enum type for unary operators
Definition: ast_common.hpp:74
nmodl::ast::LonDiffuse::index_name
std::shared_ptr< Name > index_name
Index variable name.
Definition: lon_diffuse.hpp:42
nmodl::ast::CvodeBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13631
nmodl::ast::Boolean::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:738
nmodl::ast::ParamBlock::ParamBlock
ParamBlock(const ParamAssignVector &statements)
Definition: ast.cpp:2421
nmodl::ast::Double::token
std::shared_ptr< ModToken > token
token with location information
Definition: double.hpp:58
nmodl::ast::ExternVar::ExternVar
ExternVar(Name *name)
Definition: ast.cpp:2333
nmodl::ast::Node
Base class for all AST node.
Definition: node.hpp:40
nmodl::ast::ProcedureBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ProcedureBlock::statement_block (rvalue reference)
Definition: ast.cpp:4337
nmodl::ast::Range::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11825
nmodl::ast::ReactionStatement::expression1
std::shared_ptr< Expression > expression1
TODO.
Definition: reaction_statement.hpp:48
nmodl::ast::BinaryOperator::value
BinaryOp value
Operator.
Definition: binary_operator.hpp:41
nmodl::ast::BABlock
Represents a block to be executed before or after another block.
Definition: ba_block.hpp:40
nmodl::visitor::Visitor::visit_table_statement
virtual void visit_table_statement(ast::TableStatement &node)=0
visit node of type ast::TableStatement
nmodl::ast::Verbatim
Represents a C code block.
Definition: verbatim.hpp:38
nmodl::ast::NeuronBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5470
nmodl::ast::ForNetcon::set_parameters
void set_parameters(ArgumentVector &&parameters)
Setter for member variable ForNetcon::parameters (rvalue reference)
Definition: ast.cpp:5096
nmodl::ast::Include::token
std::shared_ptr< ModToken > token
token with location information
Definition: include.hpp:46
nmodl::ast::LongitudinalDiffusionBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable LongitudinalDiffusionBlock::name (rvalue reference)
Definition: ast.cpp:13902
nmodl::ast::FunctionTableBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3846
nmodl::visitor::Visitor::visit_eigen_linear_solver_block
virtual void visit_eigen_linear_solver_block(ast::EigenLinearSolverBlock &node)=0
visit node of type ast::EigenLinearSolverBlock
nmodl::visitor::ConstVisitor::visit_assigned_definition
virtual void visit_assigned_definition(const ast::AssignedDefinition &node)=0
visit node of type ast::AssignedDefinition
nmodl::ast::ConstructorBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ConstructorBlock::statement_block (rvalue reference)
Definition: ast.cpp:2967
nmodl::ast::ReactionStatement::set_op
void set_op(ReactionOperator &&op)
Setter for member variable ReactionStatement::op (rvalue reference)
Definition: ast.cpp:10744
nmodl::ast::InitialBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: initial_block.hpp:54
nmodl::ast::BinaryOperator::BinaryOperator
BinaryOperator()=default
nmodl::ast::Ast::is_statement
virtual bool is_statement() const noexcept
Check if the ast node is an instance of ast::Statement.
Definition: ast.cpp:64
nmodl::ast::IndependentBlock::set_variables
void set_variables(NameVector &&variables)
Setter for member variable IndependentBlock::variables (rvalue reference)
Definition: ast.cpp:2542
nmodl::ast::Watch::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable Watch::expression (rvalue reference)
Definition: ast.cpp:7267
nmodl::ast::NumberRange::max
std::shared_ptr< Number > max
TODO.
Definition: number_range.hpp:43
nmodl::ast::ProcedureBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: procedure_block.hpp:50
nmodl::ast::Double::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:685
nmodl::ast::Ast::is_block
virtual bool is_block() const noexcept
Check if the ast node is an instance of ast::Block.
Definition: ast.cpp:68
nmodl::ast::FunctionBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable FunctionBlock::statement_block (rvalue reference)
Definition: ast.cpp:4140
nmodl::visitor::ConstVisitor::visit_else_if_statement
virtual void visit_else_if_statement(const ast::ElseIfStatement &node)=0
visit node of type ast::ElseIfStatement
nmodl::ast::DoubleUnit::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5643
nmodl::visitor::ConstVisitor::visit_after_block
virtual void visit_after_block(const ast::AfterBlock &node)=0
visit node of type ast::AfterBlock
nmodl::ast::LocalListStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8033
nmodl::ast::Suffix::type
std::shared_ptr< Name > type
type of channel
Definition: suffix.hpp:41
nmodl::ast::Ast::is_unit_block
virtual bool is_unit_block() const noexcept
Check if the ast node is an instance of ast::UnitBlock.
Definition: ast.cpp:162
nmodl::ast::Name::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:799
nmodl::ast::FunctionTableBlock::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable FunctionTableBlock::unit (rvalue reference)
Definition: ast.cpp:3943
nmodl::ast::Identifier::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:414
nmodl::ast::LinEquation::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6952
nmodl::ast::Boolean::Boolean
Boolean(int value)
Definition: ast.cpp:753
nmodl::visitor::Visitor::visit_argument
virtual void visit_argument(ast::Argument &node)=0
visit node of type ast::Argument
nmodl::ast::CvodeBlock::n_odes
std::shared_ptr< Integer > n_odes
number of ODEs to solve
Definition: cvode_block.hpp:43
nmodl::ast::External::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12393
nmodl::ast::FromStatement::statement_block
std::shared_ptr< StatementBlock > statement_block
TODO.
Definition: from_statement.hpp:49
nmodl::ast::BreakpointBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable BreakpointBlock::statement_block (rvalue reference)
Definition: ast.cpp:4704
nmodl::ast::Useion::valence
std::shared_ptr< Valence > valence
(TODO)
Definition: useion.hpp:49
nmodl::visitor::Visitor::visit_mutex_unlock
virtual void visit_mutex_unlock(ast::MutexUnlock &node)=0
visit node of type ast::MutexUnlock
nmodl::ast::LocalListStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8001
nmodl::ast::Identifier
Base class for all identifiers.
Definition: identifier.hpp:41
nmodl::ast::Ast::is_range
virtual bool is_range() const noexcept
Check if the ast node is an instance of ast::Range.
Definition: ast.cpp:268
nmodl::ast::Ast::is_net_receive_block
virtual bool is_net_receive_block() const noexcept
Check if the ast node is an instance of ast::NetReceiveBlock.
Definition: ast.cpp:146
nmodl::ast::External::set_variables
void set_variables(ExternVarVector &&variables)
Setter for member variable External::variables (rvalue reference)
Definition: ast.cpp:12437
nmodl::ast::LinearBlock::LinearBlock
LinearBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:3413
nmodl::visitor::Visitor::visit_node
virtual void visit_node(ast::Node &node)=0
visit node of type ast::Node
nmodl::ast::CvodeBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13661
nmodl::visitor::ConstVisitor::visit_watch_statement
virtual void visit_watch_statement(const ast::WatchStatement &node)=0
visit node of type ast::WatchStatement
nmodl::ast::LinEquation::set_rhs
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable LinEquation::rhs (rvalue reference)
Definition: ast.cpp:7041
nmodl::ast::OntologyStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: ontology_statement.hpp:43
nmodl::ast::ParamAssign::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable ParamAssign::name (rvalue reference)
Definition: ast.cpp:8521
nmodl::ast::FunctionTableBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: function_table_block.hpp:48
nmodl::ast::Argument::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable Argument::name (rvalue reference)
Definition: ast.cpp:1369
nmodl::ast::Boolean::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:744
nmodl::ast::AssignedBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2669
nmodl::ast::IndependentBlock::IndependentBlock
IndependentBlock(const NameVector &variables)
Definition: ast.cpp:2507
nmodl::ast::FactorDef::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7487
nmodl::visitor::ConstVisitor::visit_range
virtual void visit_range(const ast::Range &node)=0
visit node of type ast::Range
nmodl::ast::NeuronBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5482
nmodl::visitor::Visitor::visit_useion
virtual void visit_useion(ast::Useion &node)=0
visit node of type ast::Useion
nmodl::visitor::ConstVisitor::visit_eigen_newton_solver_block
virtual void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node)=0
visit node of type ast::EigenNewtonSolverBlock
nmodl::ast::ConductanceHint::conductance
std::shared_ptr< Name > conductance
Conductance variable.
Definition: conductance_hint.hpp:49
nmodl::ast::EigenLinearSolverBlock::set_update_states_block
void set_update_states_block(std::shared_ptr< StatementBlock > &&update_states_block)
Setter for member variable EigenLinearSolverBlock::update_states_block (rvalue reference)
Definition: ast.cpp:13577
nmodl::ast::ReactionStatement::expression2
std::shared_ptr< Expression > expression2
TODO.
Definition: reaction_statement.hpp:50
nmodl::ast::DiffEqExpression
Represents differential equation in DERIVATIVE block.
Definition: diff_eq_expression.hpp:38
nmodl::ast::Integer::value
int value
Value of integer.
Definition: integer.hpp:52
nmodl::ast::LinEquation::lhs
std::shared_ptr< Expression > lhs
Left-hand-side of the equation.
Definition: lin_equation.hpp:41
nmodl::ast::DoubleUnit::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable DoubleUnit::unit (rvalue reference)
Definition: ast.cpp:5736
nmodl::ast::LocalListStatement::erase_local_var
LocalVarVector::const_iterator erase_local_var(LocalVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:7919
nmodl::ast::Ast
Base class for all Abstract Syntax Tree node types.
Definition: ast.hpp:69
nmodl::visitor::Visitor::visit_constant_block
virtual void visit_constant_block(ast::ConstantBlock &node)=0
visit node of type ast::ConstantBlock
nmodl::ast::ElseStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9871
nmodl::ast::FactorDef::gt
std::shared_ptr< Boolean > gt
Todo: Michael : rename variable gt as well.
Definition: factor_def.hpp:47
nmodl::visitor::Visitor::visit_pointer
virtual void visit_pointer(ast::Pointer &node)=0
visit node of type ast::Pointer
nmodl::ast::DiscreteBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3684
nmodl::ast::Integer::Integer
Integer()=default
nmodl::ast::AssignedDefinition
Represents a statement in ASSIGNED or STATE block.
Definition: assigned_definition.hpp:38
nmodl::ast::Useion::readlist
ReadIonVarVector readlist
Variables being read.
Definition: useion.hpp:45
nmodl::ast::DiscreteBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DiscreteBlock::statement_block (rvalue reference)
Definition: ast.cpp:3780
nmodl::ast::ParamAssign::name
std::shared_ptr< Identifier > name
TODO.
Definition: param_assign.hpp:41
nmodl::visitor::Visitor::visit_watch_statement
virtual void visit_watch_statement(ast::WatchStatement &node)=0
visit node of type ast::WatchStatement
nmodl::visitor::Visitor::visit_boolean
virtual void visit_boolean(ast::Boolean &node)=0
visit node of type ast::Boolean
nmodl::ast::EigenNewtonSolverBlock::set_finalize_block
void set_finalize_block(std::shared_ptr< StatementBlock > &&finalize_block)
Setter for member variable EigenNewtonSolverBlock::finalize_block (rvalue reference)
Definition: ast.cpp:13340
nmodl::visitor::Visitor::visit_electrode_current
virtual void visit_electrode_current(ast::ElectrodeCurrent &node)=0
visit node of type ast::ElectrodeCurrent
nmodl::ast::BAType
BAType
enum type to distinguish BEFORE or AFTER blocks
Definition: ast_common.hpp:80
nmodl::ast::GlobalVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: global_var.hpp:43
nmodl::ast::WriteIonVar::name
std::shared_ptr< Name > name
TODO.
Definition: write_ion_var.hpp:41
nmodl::visitor::Visitor::visit_non_linear_block
virtual void visit_non_linear_block(ast::NonLinearBlock &node)=0
visit node of type ast::NonLinearBlock
nmodl::visitor::Visitor::visit_define
virtual void visit_define(ast::Define &node)=0
visit node of type ast::Define
nmodl::ast::KineticBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5218
nmodl::ast::IndependentBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2482
nmodl::ast::FactorDef
TODO.
Definition: factor_def.hpp:38
nmodl::ast::ForNetcon::ForNetcon
ForNetcon(const ArgumentVector &parameters, StatementBlock *statement_block)
Definition: ast.cpp:5050
nmodl::ast::NonspecificCurVar::name
std::shared_ptr< Name > name
TODO.
Definition: nonspecific_cur_var.hpp:41
nmodl::ast::FromStatement::to
std::shared_ptr< Expression > to
TODO.
Definition: from_statement.hpp:45
nmodl::visitor::ConstVisitor::visit_paren_expression
virtual void visit_paren_expression(const ast::ParenExpression &node)=0
visit node of type ast::ParenExpression
nmodl::ast::ProtectStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: protect_statement.hpp:43
nmodl::ast::ReactionStatement::reaction2
std::shared_ptr< Expression > reaction2
TODO.
Definition: reaction_statement.hpp:46
nmodl::ast::FactorDef::FactorDef
FactorDef()=default
nmodl::ast::UnaryExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: unary_expression.hpp:46
nmodl::ast::Ast::is_paren_expression
virtual bool is_paren_expression() const noexcept
Check if the ast node is an instance of ast::ParenExpression.
Definition: ast.cpp:186
nmodl::ast::UnaryOperator::UnaryOperator
UnaryOperator()=default
nmodl::ast::VarName::token
std::shared_ptr< ModToken > token
token with location information
Definition: var_name.hpp:52
nmodl::ast::Ast::is_string
virtual bool is_string() const noexcept
Check if the ast node is an instance of ast::String.
Definition: ast.cpp:74
nmodl::ast::BbcorePointer::token
std::shared_ptr< ModToken > token
token with location information
Definition: bbcore_pointer.hpp:52
nmodl::ast::NeuronBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: neuron_block.hpp:58
nmodl::ast::Watch
TODO.
Definition: watch.hpp:38
nmodl::ast::ProtectStatement::expression
std::shared_ptr< Expression > expression
TODO.
Definition: protect_statement.hpp:41
nmodl::ast::Ast::is_non_linear_block
virtual bool is_non_linear_block() const noexcept
Check if the ast node is an instance of ast::NonLinearBlock.
Definition: ast.cpp:136
nmodl::visitor::Visitor::visit_assigned_block
virtual void visit_assigned_block(ast::AssignedBlock &node)=0
visit node of type ast::AssignedBlock
nmodl::ast::ElectrodeCurrent::set_currents
void set_currents(ElectrodeCurVarVector &&currents)
Setter for member variable ElectrodeCurrent::currents (rvalue reference)
Definition: ast.cpp:11751
nmodl::ast::Conserve::token
std::shared_ptr< ModToken > token
token with location information
Definition: conserve.hpp:45
nmodl::ast::OntologyStatement::set_ontology_id
void set_ontology_id(std::shared_ptr< String > &&ontology_id)
Setter for member variable OntologyStatement::ontology_id (rvalue reference)
Definition: ast.cpp:12795
nmodl::ast::Double
Represents a double variable.
Definition: double.hpp:53
nmodl::ast::FunctionBlock
TODO.
Definition: function_block.hpp:39
nmodl::ast::Ast::is_eigen_newton_solver_block
virtual bool is_eigen_newton_solver_block() const noexcept
Check if the ast node is an instance of ast::EigenNewtonSolverBlock.
Definition: ast.cpp:294
nmodl::ast::Range
Represents RANGE variables statement in NMODL.
Definition: range.hpp:39
nmodl::visitor::Visitor::visit_statement
virtual void visit_statement(ast::Statement &node)=0
visit node of type ast::Statement
nmodl::ast::PointerVar
TODO.
Definition: pointer_var.hpp:38
nmodl::ast::StateBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2755
nmodl::ast::LongitudinalDiffusionBlock::longitudinal_diffusion_statements
std::shared_ptr< StatementBlock > longitudinal_diffusion_statements
All LONGITUDINAL_DIFFUSION statements in the KINETIC block.
Definition: longitudinal_diffusion_block.hpp:43
nmodl::ast::Ast::is_local_var
virtual bool is_local_var() const noexcept
Check if the ast node is an instance of ast::LocalVar.
Definition: ast.cpp:172
nmodl::ast::OntologyStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12749
nmodl::ast::VarName::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1209
nmodl::visitor::Visitor::visit_verbatim
virtual void visit_verbatim(ast::Verbatim &node)=0
visit node of type ast::Verbatim
nmodl::visitor::Visitor::visit_non_lin_equation
virtual void visit_non_lin_equation(ast::NonLinEquation &node)=0
visit node of type ast::NonLinEquation
nmodl::ast::PrimeName::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:909
nmodl::ast::TableStatement::table_vars
NameVector table_vars
Variables in the table.
Definition: table_statement.hpp:42
nmodl::ast::PrimeName::order
std::shared_ptr< Integer > order
order of ODE
Definition: prime_name.hpp:53
nmodl::ast::NonLinEquation
One equation in a system of equations that collectively make a NONLINEAR block.
Definition: non_lin_equation.hpp:38
nmodl::ast::RandomVarList
Represents RANDOM statement in NMODL.
Definition: random_var_list.hpp:47
nmodl::ast::Pointer::Pointer
Pointer(const PointerVarVector &variables)
Definition: ast.cpp:12230
nmodl::ast::EigenNewtonSolverBlock::set_update_states_block
void set_update_states_block(std::shared_ptr< StatementBlock > &&update_states_block)
Setter for member variable EigenNewtonSolverBlock::update_states_block (rvalue reference)
Definition: ast.cpp:13323
nmodl::ast::UnitDef::token
std::shared_ptr< ModToken > token
token with location information
Definition: unit_def.hpp:45
nmodl::ast::DerivimplicitCallback::set_node_to_solve
void set_node_to_solve(std::shared_ptr< Block > &&node_to_solve)
Setter for member variable DerivimplicitCallback::node_to_solve (rvalue reference)
Definition: ast.cpp:14104
nmodl::ast::EigenLinearSolverBlock::set_n_state_vars
void set_n_state_vars(std::shared_ptr< Integer > &&n_state_vars)
Setter for member variable EigenLinearSolverBlock::n_state_vars (rvalue reference)
Definition: ast.cpp:13509
nmodl::ast::FromStatement::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable FromStatement::statement_block (rvalue reference)
Definition: ast.cpp:9402
nmodl::ast::ProtectStatement::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ProtectStatement::expression (rvalue reference)
Definition: ast.cpp:9176
nmodl::ast::AssignedBlock::AssignedBlock
AssignedBlock(const AssignedDefinitionVector &definitions)
Definition: ast.cpp:2678
nmodl::ast::External::variables
ExternVarVector variables
Vector of external variables.
Definition: external.hpp:42
nmodl::ast::BbcorePointerVar
Represent a single variable of type BBCOREPOINTER.
Definition: bbcore_pointer_var.hpp:39
nmodl::ast::ElectrodeCurrent::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11691
nmodl::ast::LongitudinalDiffusionBlock::LongitudinalDiffusionBlock
LongitudinalDiffusionBlock(Name *name, StatementBlock *longitudinal_diffusion_statements, StatementBlock *compartment_statements)
Definition: ast.cpp:13849
nmodl::ast::TableStatement::with
std::shared_ptr< Integer > with
an increment factor
Definition: table_statement.hpp:50
nmodl::ast::Argument::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1286
nmodl::visitor::ConstVisitor::visit_statement
virtual void visit_statement(const ast::Statement &node)=0
visit node of type ast::Statement
nmodl::ast::ParenExpression::ParenExpression
ParenExpression(Expression *expression)
Definition: ast.cpp:6440
nmodl::ast::ReactVarName::value
std::shared_ptr< Integer > value
TODO.
Definition: react_var_name.hpp:41
nmodl::ast::ReactVarName::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1439
nmodl::ast::PointerVarVector
std::vector< std::shared_ptr< PointerVar > > PointerVarVector
Definition: ast_decl.hpp:324
nmodl::ast::IndexedName::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1068
nmodl::visitor::ConstVisitor::visit_conductance_hint
virtual void visit_conductance_hint(const ast::ConductanceHint &node)=0
visit node of type ast::ConductanceHint
nmodl::ast::LongitudinalDiffusionBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: longitudinal_diffusion_block.hpp:47
nmodl::ast::Verbatim::Verbatim
Verbatim(String *statement)
Definition: ast.cpp:12506
nmodl::ast::ReactionStatement::set_expression2
void set_expression2(std::shared_ptr< Expression > &&expression2)
Setter for member variable ReactionStatement::expression2 (rvalue reference)
Definition: ast.cpp:10787
nmodl::ast::EigenNewtonSolverBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: eigen_newton_solver_block.hpp:55
nmodl::visitor::Visitor::visit_expression_statement
virtual void visit_expression_statement(ast::ExpressionStatement &node)=0
visit node of type ast::ExpressionStatement
nmodl::ast::Valence::token
std::shared_ptr< ModToken > token
token with location information
Definition: valence.hpp:45
nmodl::ast::ReactionOperator::set_value
void set_value(ReactionOp value)
Setter for member variable ReactionOperator::value.
Definition: ast.cpp:6403
nmodl::visitor::Visitor::visit_local_var
virtual void visit_local_var(ast::LocalVar &node)=0
visit node of type ast::LocalVar
nmodl::ast::ForNetcon::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ForNetcon::statement_block (rvalue reference)
Definition: ast.cpp:5113
nmodl::ast::ElseIfStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9762
nmodl::ast::StateBlock::set_definitions
void set_definitions(AssignedDefinitionVector &&definitions)
Setter for member variable StateBlock::definitions (rvalue reference)
Definition: ast.cpp:2799
nmodl::ast::TableStatement::set_to
void set_to(std::shared_ptr< Expression > &&to)
Setter for member variable TableStatement::to (rvalue reference)
Definition: ast.cpp:11202
nmodl::ast::PointerVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2101
nmodl::ast::Integer::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:539
nmodl::ast::NetReceiveBlock
TODO.
Definition: net_receive_block.hpp:39
nmodl::ast::External::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12425
nmodl::visitor::ConstVisitor::visit_reaction_statement
virtual void visit_reaction_statement(const ast::ReactionStatement &node)=0
visit node of type ast::ReactionStatement
nmodl::ast::Ast::is_ontology_statement
virtual bool is_ontology_statement() const noexcept
Check if the ast node is an instance of ast::OntologyStatement.
Definition: ast.cpp:288
nmodl::ast::ConstructorBlock::ConstructorBlock
ConstructorBlock(StatementBlock *statement_block)
Definition: ast.cpp:2930
nmodl::ast::KineticBlock::KineticBlock
KineticBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:5184
nmodl::ast::UpdateDt::set_value
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable UpdateDt::value (rvalue reference)
Definition: ast.cpp:14306
nmodl::ast::DiscreteBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: discrete_block.hpp:45
nmodl::ast::LinEquation::token
std::shared_ptr< ModToken > token
token with location information
Definition: lin_equation.hpp:45
nmodl::visitor::ConstVisitor::visit_suffix
virtual void visit_suffix(const ast::Suffix &node)=0
visit node of type ast::Suffix
nmodl::ast::TableStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11122
nmodl::ast::ThreadSafe::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12466
nmodl::ast::NetReceiveBlock::parameters
ArgumentVector parameters
Parameters to the net receive block.
Definition: net_receive_block.hpp:42
nmodl::ast::FunctionTableBlock
TODO.
Definition: function_table_block.hpp:39
nmodl::ast::Ast::is_global
virtual bool is_global() const noexcept
Check if the ast node is an instance of ast::Global.
Definition: ast.cpp:270
nmodl::ast::DiscreteBlock::name
std::shared_ptr< Name > name
Name of the discrete block.
Definition: discrete_block.hpp:41
nmodl::ast::IndexedName::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1004
nmodl::ast::StatementBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3162
nmodl::ast::Conserve
Represent CONSERVE statement in NMODL.
Definition: conserve.hpp:38
nmodl::ast::PointerVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2066
nmodl::ast::Limits::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5908
nmodl::ast::Ast::is_conserve
virtual bool is_conserve() const noexcept
Check if the ast node is an instance of ast::Conserve.
Definition: ast.cpp:246
nmodl::ast::Model::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8083
nmodl::ast::StateBlock::StateBlock
StateBlock(const AssignedDefinitionVector &definitions)
Definition: ast.cpp:2764
nmodl::ast::Ast::is_destructor_block
virtual bool is_destructor_block() const noexcept
Check if the ast node is an instance of ast::DestructorBlock.
Definition: ast.cpp:128
nmodl::ast::Ast::is_conductance_hint
virtual bool is_conductance_hint() const noexcept
Check if the ast node is an instance of ast::ConductanceHint.
Definition: ast.cpp:224
nmodl::ast::IfStatement::set_elses
void set_elses(std::shared_ptr< ElseStatement > &&elses)
Setter for member variable IfStatement::elses (rvalue reference)
Definition: ast.cpp:9715
nmodl::ast::BbcorePointerVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2226
nmodl::ast::AssignedBlock::insert_assigned_definition
AssignedDefinitionVector::const_iterator insert_assigned_definition(AssignedDefinitionVector::const_iterator position, const std::shared_ptr< AssignedDefinition > &n)
Insert member to definitions.
Definition: ast.cpp:2625
nmodl::ast::VarName::VarName
VarName(Identifier *name, Integer *at, Expression *index)
Definition: ast.cpp:1175
nmodl::ast::RandomVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2140
nmodl::ast::ConstructorBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: constructor_block.hpp:54
nmodl::ast::DerivimplicitCallback::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14093
nmodl::ast::ElseIfStatement::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ElseIfStatement::statement_block (rvalue reference)
Definition: ast.cpp:9833
nmodl::ast::EigenNewtonSolverBlock::update_states_block
std::shared_ptr< StatementBlock > update_states_block
update back states from X
Definition: eigen_newton_solver_block.hpp:51
nmodl::ast::Model::title
std::shared_ptr< String > title
TODO.
Definition: model.hpp:41
nmodl::ast::StatementVector
std::vector< std::shared_ptr< Statement > > StatementVector
Definition: ast_decl.hpp:302
nmodl::ast::DoubleUnit
TODO.
Definition: double_unit.hpp:38
nmodl::ast::ReactionStatement::op
ReactionOperator op
TODO.
Definition: reaction_statement.hpp:44
nmodl::ast::FunctionBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: function_block.hpp:48
nmodl::ast::UnitBlock
TODO.
Definition: unit_block.hpp:39
nmodl::visitor::ConstVisitor::visit_destructor_block
virtual void visit_destructor_block(const ast::DestructorBlock &node)=0
visit node of type ast::DestructorBlock
nmodl::ast::BlockComment
Represents a multi-line comment in NMODL.
Definition: block_comment.hpp:38
nmodl::ast::Ast::is_function_call
virtual bool is_function_call() const noexcept
Check if the ast node is an instance of ast::FunctionCall.
Definition: ast.cpp:198
nmodl::ast::LinearBlock::solvefor
NameVector solvefor
TODO.
Definition: linear_block.hpp:58
nmodl::ast::External::token
std::shared_ptr< ModToken > token
token with location information
Definition: external.hpp:44
nmodl::ast::ConductanceHint::ConductanceHint
ConductanceHint(Name *conductance, Name *ion)
Definition: ast.cpp:8946
nmodl::visitor::Visitor::visit_mutex_lock
virtual void visit_mutex_lock(ast::MutexLock &node)=0
visit node of type ast::MutexLock
nmodl::visitor::Visitor::visit_breakpoint_block
virtual void visit_breakpoint_block(ast::BreakpointBlock &node)=0
visit node of type ast::BreakpointBlock
nmodl::ast::CvodeBlock::CvodeBlock
CvodeBlock(Name *name, Integer *n_odes, StatementBlock *non_stiff_block, StatementBlock *stiff_block)
Definition: ast.cpp:13670
nmodl::ast::NonLinearBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3525
nmodl::ast::GlobalVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1980
nmodl::visitor::ConstVisitor::visit_global
virtual void visit_global(const ast::Global &node)=0
visit node of type ast::Global
nmodl::ast::AssignedBlock::erase_assigned_definition
AssignedDefinitionVector::const_iterator erase_assigned_definition(AssignedDefinitionVector::const_iterator first)
Erase member to definitions.
Definition: ast.cpp:2587
nmodl::visitor::ConstVisitor::visit_number_range
virtual void visit_number_range(const ast::NumberRange &node)=0
visit node of type ast::NumberRange
nmodl::ast::ConductanceHint
Represents CONDUCTANCE statement in NMODL.
Definition: conductance_hint.hpp:46
nmodl::ast::LinearBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: linear_block.hpp:62
nmodl::visitor::Visitor::visit_else_statement
virtual void visit_else_statement(ast::ElseStatement &node)=0
visit node of type ast::ElseStatement
nmodl::visitor::Visitor::visit_ba_block
virtual void visit_ba_block(ast::BABlock &node)=0
visit node of type ast::BABlock
nmodl::ast::ReadIonVar::ReadIonVar
ReadIonVar(Name *name)
Definition: ast.cpp:1559
nmodl::ast::Ast::is_suffix
virtual bool is_suffix() const noexcept
Check if the ast node is an instance of ast::Suffix.
Definition: ast.cpp:260
nmodl::ast::DoubleUnit::DoubleUnit
DoubleUnit(Double *value, Unit *unit)
Definition: ast.cpp:5674
nmodl::ast::BeforeBlock::bablock
std::shared_ptr< BABlock > bablock
Block to be called before.
Definition: before_block.hpp:41
nmodl::ast::ParamAssignVector
std::vector< std::shared_ptr< ParamAssign > > ParamAssignVector
Definition: ast_decl.hpp:380
nmodl::ast::RangeVarVector
std::vector< std::shared_ptr< RangeVar > > RangeVarVector
Definition: ast_decl.hpp:322
nmodl::ast::Integer::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:576
nmodl::ast::UnitBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5346
nmodl::ast::IfStatement::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable IfStatement::statement_block (rvalue reference)
Definition: ast.cpp:9681
nmodl::ast::Pointer::erase_pointer_var
PointerVarVector::const_iterator erase_pointer_var(PointerVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:12139
nmodl::ast::EigenNewtonSolverBlock::set_initialize_block
void set_initialize_block(std::shared_ptr< StatementBlock > &&initialize_block)
Setter for member variable EigenNewtonSolverBlock::initialize_block (rvalue reference)
Definition: ast.cpp:13272
nmodl::ast::SolveBlock::set_method
void set_method(std::shared_ptr< Name > &&method)
Setter for member variable SolveBlock::method (rvalue reference)
Definition: ast.cpp:4603
nmodl::ast::Pointer::variables
PointerVarVector variables
Vector of pointer variables.
Definition: pointer.hpp:42
nmodl::ast::Pointer::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12205
nmodl::ast::FactorDef::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7503
nmodl::ast::ReadIonVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1585
nmodl::visitor::Visitor::visit_ontology_statement
virtual void visit_ontology_statement(ast::OntologyStatement &node)=0
visit node of type ast::OntologyStatement
nmodl::visitor::Visitor::visit_conductance_hint
virtual void visit_conductance_hint(ast::ConductanceHint &node)=0
visit node of type ast::ConductanceHint
nmodl::ast::UnaryOperator::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6337
nmodl::ast::LineComment::token
std::shared_ptr< ModToken > token
token with location information
Definition: line_comment.hpp:43
nmodl::visitor::ConstVisitor::visit_function_call
virtual void visit_function_call(const ast::FunctionCall &node)=0
visit node of type ast::FunctionCall
nmodl::ast::LinearBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: linear_block.hpp:60
nmodl::visitor::Visitor::visit_lag_statement
virtual void visit_lag_statement(ast::LagStatement &node)=0
visit node of type ast::LagStatement
nmodl::ast::WatchStatement::WatchStatement
WatchStatement(const WatchVector &statements)
Definition: ast.cpp:10053
nmodl::ast::CvodeBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13708
nmodl::visitor::ConstVisitor::visit_linear_block
virtual void visit_linear_block(const ast::LinearBlock &node)=0
visit node of type ast::LinearBlock
nmodl::visitor::Visitor::visit_block
virtual void visit_block(ast::Block &node)=0
visit node of type ast::Block
nmodl::ast::FunctionTableBlock::unit
std::shared_ptr< Unit > unit
Unit if specified.
Definition: function_table_block.hpp:46
nmodl::ast::Model::token
std::shared_ptr< ModToken > token
token with location information
Definition: model.hpp:43
nmodl::ast::UnitDef::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7374
nmodl::ast::DestructorBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3005
nmodl::ast::SolutionExpression::node_to_solve
std::shared_ptr< Expression > node_to_solve
Block to be solved (callback node or solution node itself)
Definition: solution_expression.hpp:43
nmodl::ast::UnitState::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7847
nmodl::ast::StatementBlock::set_statements
void set_statements(StatementVector &&statements)
Setter for member variable StatementBlock::statements (rvalue reference)
Definition: ast.cpp:3222
nmodl::visitor::Visitor::visit_string
virtual void visit_string(ast::String &node)=0
visit node of type ast::String
nmodl::visitor::ConstVisitor::visit_unit_block
virtual void visit_unit_block(const ast::UnitBlock &node)=0
visit node of type ast::UnitBlock
nmodl::ast::AssignedDefinition::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable AssignedDefinition::unit (rvalue reference)
Definition: ast.cpp:8869
nmodl::ast::ReactVarName::ReactVarName
ReactVarName(Integer *value, VarName *name)
Definition: ast.cpp:1448
nmodl::ast::NodeVector
std::vector< std::shared_ptr< Node > > NodeVector
Definition: ast_decl.hpp:301
nmodl::ast::ExpressionStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: expression_statement.hpp:43
nmodl::ast::ProcedureBlock::ProcedureBlock
ProcedureBlock(Name *name, const ArgumentVector &parameters, Unit *unit, StatementBlock *statement_block)
Definition: ast.cpp:4224
nmodl::ast::External::External
External(const ExternVarVector &variables)
Definition: ast.cpp:12402
nmodl::ast::CvodeBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable CvodeBlock::name (rvalue reference)
Definition: ast.cpp:13731
nmodl::ast::IfStatement::elses
std::shared_ptr< ElseStatement > elses
TODO.
Definition: if_statement.hpp:48
nmodl::ast::ParamBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2444
nmodl::ast::ProcedureBlock::set_parameters
void set_parameters(ArgumentVector &&parameters)
Setter for member variable ProcedureBlock::parameters (rvalue reference)
Definition: ast.cpp:4303
nmodl::ast::BbcorePointer::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12307
nmodl::visitor::ConstVisitor::visit_for_netcon
virtual void visit_for_netcon(const ast::ForNetcon &node)=0
visit node of type ast::ForNetcon
nmodl::ast::IfStatement::statement_block
std::shared_ptr< StatementBlock > statement_block
TODO.
Definition: if_statement.hpp:44
nmodl::ast::ReactionOp
ReactionOp
enum type used for Reaction statement
Definition: ast_common.hpp:92
nmodl::ast::FromStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9216
nmodl::ast::IndexedName::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable IndexedName::name (rvalue reference)
Definition: ast.cpp:1083
nmodl::ast::Model
TODO.
Definition: model.hpp:38
nmodl::visitor::Visitor::visit_diff_eq_expression
virtual void visit_diff_eq_expression(ast::DiffEqExpression &node)=0
visit node of type ast::DiffEqExpression
nmodl::ast::Global::erase_global_var
GlobalVarVector::const_iterator erase_global_var(GlobalVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:11882
nmodl::ast::ReactVarName
TODO.
Definition: react_var_name.hpp:38
nmodl::ast::Number::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:436
nmodl::ast::FunctionTableBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionTableBlock::name (rvalue reference)
Definition: ast.cpp:3909
nmodl::ast::Define::value
std::shared_ptr< Integer > value
Value of the macro.
Definition: define.hpp:43
nmodl::ast::SolutionExpression::SolutionExpression
SolutionExpression(SolveBlock *solve_block, Expression *node_to_solve)
Definition: ast.cpp:14160
nmodl::ast::WhileStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9449
nmodl::visitor::ConstVisitor::visit_mutex_unlock
virtual void visit_mutex_unlock(const ast::MutexUnlock &node)=0
visit node of type ast::MutexUnlock
nmodl::ast::Define
Represents a DEFINE statement in NMODL.
Definition: define.hpp:38
nmodl::ast::ExternVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ExternVar::name (rvalue reference)
Definition: ast.cpp:2370
nmodl::ast::ForNetcon::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: for_netcon.hpp:44
nmodl::ast::CvodeBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:13618
nmodl::visitor::Visitor::visit_cvode_block
virtual void visit_cvode_block(ast::CvodeBlock &node)=0
visit node of type ast::CvodeBlock
nmodl::ast::Watch::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7252
nmodl::ast::Watch::Watch
Watch(Expression *expression, Expression *value)
Definition: ast.cpp:7222
nmodl::ast::Include::blocks
NodeVector blocks
AST of the included file.
Definition: include.hpp:44
nmodl::ast::ConstructorBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2956
nmodl::ast::LinEquation::rhs
std::shared_ptr< Expression > rhs
Right-hand-side of the equation.
Definition: lin_equation.hpp:43
nmodl::ast::CvodeBlock
Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks.
Definition: cvode_block.hpp:38
nmodl::ast::ExternVar::name
std::shared_ptr< Name > name
TODO.
Definition: extern_var.hpp:41
nmodl::ast::ConstantBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: constant_block.hpp:55
symbol_table.hpp
Implement classes for representing symbol table at block and file scope.
nmodl::visitor::Visitor::visit_discrete_block
virtual void visit_discrete_block(ast::DiscreteBlock &node)=0
visit node of type ast::DiscreteBlock
nmodl::ast::NeuronBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: neuron_block.hpp:56
nmodl::ast::FactorDef::set_unit2
void set_unit2(std::shared_ptr< Unit > &&unit2)
Setter for member variable FactorDef::unit2 (rvalue reference)
Definition: ast.cpp:7697
nmodl::ast::Ast::is_assigned_block
virtual bool is_assigned_block() const noexcept
Check if the ast node is an instance of ast::AssignedBlock.
Definition: ast.cpp:120
nmodl::visitor::Visitor::visit_random_var
virtual void visit_random_var(ast::RandomVar &node)=0
visit node of type ast::RandomVar
nmodl::visitor::Visitor::visit_react_var_name
virtual void visit_react_var_name(ast::ReactVarName &node)=0
visit node of type ast::ReactVarName
nmodl::visitor::ConstVisitor::visit_non_linear_block
virtual void visit_non_linear_block(const ast::NonLinearBlock &node)=0
visit node of type ast::NonLinearBlock
nmodl::ast::KineticBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable KineticBlock::statement_block (rvalue reference)
Definition: ast.cpp:5272
nmodl::ast::AssignedDefinition::set_abstol
void set_abstol(std::shared_ptr< Double > &&abstol)
Setter for member variable AssignedDefinition::abstol (rvalue reference)
Definition: ast.cpp:8886
nmodl::visitor::Visitor::visit_derivative_block
virtual void visit_derivative_block(ast::DerivativeBlock &node)=0
visit node of type ast::DerivativeBlock
nmodl::visitor::ConstVisitor::visit_conserve
virtual void visit_conserve(const ast::Conserve &node)=0
visit node of type ast::Conserve
nmodl::ast::ProcedureBlock::unit
std::shared_ptr< Unit > unit
Unit if specified.
Definition: procedure_block.hpp:46
nmodl::ast::UnitDef::set_unit2
void set_unit2(std::shared_ptr< Unit > &&unit2)
Setter for member variable UnitDef::unit2 (rvalue reference)
Definition: ast.cpp:7463
nmodl::visitor::Visitor::visit_valence
virtual void visit_valence(ast::Valence &node)=0
visit node of type ast::Valence
nmodl::visitor::ConstVisitor::visit_unit
virtual void visit_unit(const ast::Unit &node)=0
visit node of type ast::Unit
nmodl::ast::Program::erase_node
NodeVector::const_iterator erase_node(NodeVector::const_iterator first)
Erase member to blocks.
Definition: ast.cpp:12840
nmodl::ast::AfterBlock::AfterBlock
AfterBlock(BABlock *bablock)
Definition: ast.cpp:4835
nmodl::visitor::Visitor::visit_param_block
virtual void visit_param_block(ast::ParamBlock &node)=0
visit node of type ast::ParamBlock
nmodl::ast::LagStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10873
nmodl::ast::Include::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8339
nmodl::ast::RandomVarList::variables
RandomVarVector variables
Vector of random variables.
Definition: random_var_list.hpp:50
nmodl::visitor::Visitor::visit_nrn_state_block
virtual void visit_nrn_state_block(ast::NrnStateBlock &node)=0
visit node of type ast::NrnStateBlock
nmodl::visitor::Visitor::visit_indexed_name
virtual void visit_indexed_name(ast::IndexedName &node)=0
visit node of type ast::IndexedName
nmodl::ast::StatementBlock::insert_statement
StatementVector::const_iterator insert_statement(StatementVector::const_iterator position, const std::shared_ptr< Statement > &n)
Insert member to statements.
Definition: ast.cpp:3134
nmodl::visitor::ConstVisitor::visit_local_var
virtual void visit_local_var(const ast::LocalVar &node)=0
visit node of type ast::LocalVar
nmodl::ast::LocalVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: local_var.hpp:43
nmodl::ast::ReadIonVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ReadIonVar::name (rvalue reference)
Definition: ast.cpp:1596
nmodl::ast::WriteIonVar
TODO.
Definition: write_ion_var.hpp:38
nmodl::ast::PrimeName::token
std::shared_ptr< ModToken > token
token with location information
Definition: prime_name.hpp:55
nmodl::ast::EigenNewtonSolverBlock::set_variable_block
void set_variable_block(std::shared_ptr< StatementBlock > &&variable_block)
Setter for member variable EigenNewtonSolverBlock::variable_block (rvalue reference)
Definition: ast.cpp:13255
nmodl::visitor::Visitor::visit_nonspecific_cur_var
virtual void visit_nonspecific_cur_var(ast::NonspecificCurVar &node)=0
visit node of type ast::NonspecificCurVar
nmodl::ast::Nonspecific::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11653
nmodl::ast::Ast::is_integer
virtual bool is_integer() const noexcept
Check if the ast node is an instance of ast::Integer.
Definition: ast.cpp:76
nmodl::ast::RandomVarVector
std::vector< std::shared_ptr< RandomVar > > RandomVarVector
Definition: ast_decl.hpp:325
nmodl::ast::AfterBlock::set_bablock
void set_bablock(std::shared_ptr< BABlock > &&bablock)
Setter for member variable AfterBlock::bablock (rvalue reference)
Definition: ast.cpp:4872
nmodl::ast::Watch::expression
std::shared_ptr< Expression > expression
TODO.
Definition: watch.hpp:41
nmodl::ast::Ast::is_bbcore_pointer
virtual bool is_bbcore_pointer() const noexcept
Check if the ast node is an instance of ast::BbcorePointer.
Definition: ast.cpp:276
nmodl::ast::TableStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: table_statement.hpp:52
nmodl::visitor::ConstVisitor::visit_random_var_list
virtual void visit_random_var_list(const ast::RandomVarList &node)=0
visit node of type ast::RandomVarList
nmodl::ast::BeforeBlock::set_bablock
void set_bablock(std::shared_ptr< BABlock > &&bablock)
Setter for member variable BeforeBlock::bablock (rvalue reference)
Definition: ast.cpp:4788
nmodl::ast::WhileStatement
TODO.
Definition: while_statement.hpp:38
nmodl::ast::NonspecificCurVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1710
nmodl::ast::Ast::is_pointer
virtual bool is_pointer() const noexcept
Check if the ast node is an instance of ast::Pointer.
Definition: ast.cpp:274
nmodl::visitor::Visitor::visit_write_ion_var
virtual void visit_write_ion_var(ast::WriteIonVar &node)=0
visit node of type ast::WriteIonVar
nmodl::visitor::Visitor::visit_state_block
virtual void visit_state_block(ast::StateBlock &node)=0
visit node of type ast::StateBlock
nmodl::ast::Valence
TODO.
Definition: valence.hpp:38
nmodl::visitor::ConstVisitor::visit_ba_block_type
virtual void visit_ba_block_type(const ast::BABlockType &node)=0
visit node of type ast::BABlockType
nmodl::ast::Ast::is_procedure_block
virtual bool is_procedure_block() const noexcept
Check if the ast node is an instance of ast::ProcedureBlock.
Definition: ast.cpp:144
nmodl::ast::BeforeBlock::BeforeBlock
BeforeBlock(BABlock *bablock)
Definition: ast.cpp:4751
nmodl::ast::UnitState::token
std::shared_ptr< ModToken > token
token with location information
Definition: unit_state.hpp:43
nmodl::ast::Useion::set_writelist
void set_writelist(WriteIonVarVector &&writelist)
Setter for member variable Useion::writelist (rvalue reference)
Definition: ast.cpp:11545
nmodl::visitor::ConstVisitor::visit_function_table_block
virtual void visit_function_table_block(const ast::FunctionTableBlock &node)=0
visit node of type ast::FunctionTableBlock
nmodl::ast::TableStatement
Represents TABLE statement in NMODL.
Definition: table_statement.hpp:39
nmodl::ast::NonLinEquation::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6852
nmodl::ast::EigenNewtonSolverBlock::n_state_vars
std::shared_ptr< Integer > n_state_vars
number of state vars used in solve
Definition: eigen_newton_solver_block.hpp:41
nmodl::ast::ProtectStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9165
nmodl::visitor::ConstVisitor::visit_model
virtual void visit_model(const ast::Model &node)=0
visit node of type ast::Model
nmodl::ast::ElectrodeCurVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1843
nmodl::ast::BABlockType::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7310
nmodl::ast::AssignedDefinition::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8596
nmodl::ast::Ast::is_protect_statement
virtual bool is_protect_statement() const noexcept
Check if the ast node is an instance of ast::ProtectStatement.
Definition: ast.cpp:228
nmodl::ast::Ast::is_var_name
virtual bool is_var_name() const noexcept
Check if the ast node is an instance of ast::VarName.
Definition: ast.cpp:90
nmodl::ast::VarName
Represents a variable.
Definition: var_name.hpp:43
nmodl::visitor::ConstVisitor::visit_assigned_block
virtual void visit_assigned_block(const ast::AssignedBlock &node)=0
visit node of type ast::AssignedBlock
nmodl::ast::Verbatim::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12532
nmodl::ast::ExternVar
TODO.
Definition: extern_var.hpp:38
nmodl::visitor::Visitor::visit_number
virtual void visit_number(ast::Number &node)=0
visit node of type ast::Number
nmodl::visitor::ConstVisitor::visit_unit_state
virtual void visit_unit_state(const ast::UnitState &node)=0
visit node of type ast::UnitState
nmodl::visitor::Visitor::visit_wrapped_expression
virtual void visit_wrapped_expression(ast::WrappedExpression &node)=0
visit node of type ast::WrappedExpression
nmodl::ast::Integer
Represents an integer variable.
Definition: integer.hpp:49
nmodl::ast::BbcorePointerVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2238
nmodl::ast::BinaryExpression::set_op
void set_op(BinaryOperator &&op)
Setter for member variable BinaryExpression::op (rvalue reference)
Definition: ast.cpp:6607
nmodl::visitor::Visitor::visit_float
virtual void visit_float(ast::Float &node)=0
visit node of type ast::Float
nmodl::ast::EigenNewtonSolverBlock::set_setup_x_block
void set_setup_x_block(std::shared_ptr< StatementBlock > &&setup_x_block)
Setter for member variable EigenNewtonSolverBlock::setup_x_block (rvalue reference)
Definition: ast.cpp:13289
nmodl::ast::Suffix
Represents SUFFIX statement in NMODL.
Definition: suffix.hpp:38
nmodl::ast::SolveBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: solve_block.hpp:47
nmodl::ast::KineticBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable KineticBlock::name (rvalue reference)
Definition: ast.cpp:5238
nmodl::ast::FunctionCall::arguments
ExpressionVector arguments
TODO.
Definition: function_call.hpp:43
nmodl::ast::Unit::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5603
nmodl::ast::DestructorBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: destructor_block.hpp:58
nmodl::ast::DiscreteBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable DiscreteBlock::name (rvalue reference)
Definition: ast.cpp:3763
nmodl::ast::ElseStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9906
nmodl::ast::ElseIfStatement
TODO.
Definition: else_if_statement.hpp:38
nmodl::ast
Abstract Syntax Tree (AST) related implementations.
Definition: ast_common.hpp:29
nmodl::ast::AssignedBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2701
nmodl::ast::StatementBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: statement_block.hpp:58
nmodl::visitor::Visitor::visit_bbcore_pointer
virtual void visit_bbcore_pointer(ast::BbcorePointer &node)=0
visit node of type ast::BbcorePointer
nmodl::ast::Ast::is_expression_statement
virtual bool is_expression_statement() const noexcept
Check if the ast node is an instance of ast::ExpressionStatement.
Definition: ast.cpp:226
nmodl::ast::RandomVar
Single variable of type RANDOM.
Definition: random_var.hpp:38
nmodl::ast::RandomVarList::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12082
nmodl::ast::BABlockType::BABlockType
BABlockType(BAType value)
Definition: ast.cpp:7325
nmodl::ast::ReactionOperator::value
ReactionOp value
TODO.
Definition: reaction_operator.hpp:41
nmodl::ast::CvodeBlock::set_n_odes
void set_n_odes(std::shared_ptr< Integer > &&n_odes)
Setter for member variable CvodeBlock::n_odes (rvalue reference)
Definition: ast.cpp:13748
nmodl::ast::LagStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10834
nmodl::ast::FromStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9307
nmodl::visitor::Visitor::visit_double
virtual void visit_double(ast::Double &node)=0
visit node of type ast::Double
nmodl::ast::NonLinEquation::set_lhs
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable NonLinEquation::lhs (rvalue reference)
Definition: ast.cpp:6906
nmodl::ast::IfStatement::IfStatement
IfStatement(Expression *condition, StatementBlock *statement_block, const ElseIfStatementVector &elseifs, ElseStatement *elses)
Definition: ast.cpp:9602
nmodl::ast::ExpressionStatement::expression
std::shared_ptr< Expression > expression
TODO.
Definition: expression_statement.hpp:41
nmodl::visitor::Visitor::visit_electrode_cur_var
virtual void visit_electrode_cur_var(ast::ElectrodeCurVar &node)=0
visit node of type ast::ElectrodeCurVar
nmodl::ast::ConstantVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:6082
nmodl::ast::Statement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:348
nmodl::ast::Program::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12922
nmodl::visitor::ConstVisitor::visit_derivative_block
virtual void visit_derivative_block(const ast::DerivativeBlock &node)=0
visit node of type ast::DerivativeBlock
nmodl::ast::TableStatement::depend_vars
NameVector depend_vars
dependent variables
Definition: table_statement.hpp:44
nmodl::ast::Ast::is_extern_var
virtual bool is_extern_var() const noexcept
Check if the ast node is an instance of ast::ExternVar.
Definition: ast.cpp:114
nmodl::ast::NonspecificCurVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable NonspecificCurVar::name (rvalue reference)
Definition: ast.cpp:1768
nmodl::visitor::Visitor::visit_eigen_newton_solver_block
virtual void visit_eigen_newton_solver_block(ast::EigenNewtonSolverBlock &node)=0
visit node of type ast::EigenNewtonSolverBlock
nmodl::ast::EigenNewtonSolverBlock::setup_x_block
std::shared_ptr< StatementBlock > setup_x_block
update X from states
Definition: eigen_newton_solver_block.hpp:47
nmodl::ast::ForNetcon::parameters
ArgumentVector parameters
Arguments to the for netcon block.
Definition: for_netcon.hpp:42
nmodl::ast::RandomVarList::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12034
nmodl::ast::Double::set_value
void set_value(std::string value)
Setter for member variable Double::value.
Definition: ast.cpp:722
nmodl::ast::StateBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: state_block.hpp:57
nmodl::ast::Double::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:679
nmodl::ast::WatchStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10028
nmodl::ast::FunctionBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3980
nmodl::ast::Limits::max
std::shared_ptr< Number > max
TODO.
Definition: limits.hpp:43
nmodl::visitor::Visitor::visit_else_if_statement
virtual void visit_else_if_statement(ast::ElseIfStatement &node)=0
visit node of type ast::ElseIfStatement
nmodl::ast::ConstantVar::ConstantVar
ConstantVar(Name *name, Number *value, Unit *unit)
Definition: ast.cpp:6129
nmodl::ast::FunctionBlock::unit
std::shared_ptr< Unit > unit
Unit if specified.
Definition: function_block.hpp:46
nmodl::ast::AssignedDefinition::unit
std::shared_ptr< Unit > unit
TODO.
Definition: assigned_definition.hpp:51
nmodl::ast::KineticBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: kinetic_block.hpp:48
nmodl::ast::DestructorBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: destructor_block.hpp:56
nmodl::ast::EigenNewtonSolverBlock::set_n_state_vars
void set_n_state_vars(std::shared_ptr< Integer > &&n_state_vars)
Setter for member variable EigenNewtonSolverBlock::n_state_vars (rvalue reference)
Definition: ast.cpp:13238
nmodl::ast::ProcedureBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4177
nmodl::ast::UnaryExpression::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable UnaryExpression::expression (rvalue reference)
Definition: ast.cpp:6805
nmodl::ast::Ast::is_function_block
virtual bool is_function_block() const noexcept
Check if the ast node is an instance of ast::FunctionBlock.
Definition: ast.cpp:142
nmodl::ast::KineticBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5137
nmodl::ast::AssignedBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2653
nmodl::ast::ParamAssign::unit
std::shared_ptr< Unit > unit
TODO.
Definition: param_assign.hpp:45
nmodl::ast::TableStatement::set_depend_vars
void set_depend_vars(NameVector &&depend_vars)
Setter for member variable TableStatement::depend_vars (rvalue reference)
Definition: ast.cpp:11168
nmodl::ast::Name::set_value
void set_value(std::shared_ptr< String > &&value)
Setter for member variable Name::value (rvalue reference)
Definition: ast.cpp:860
nmodl::ast::Global::reset_global_var
void reset_global_var(GlobalVarVector::const_iterator position, GlobalVar *n)
Reset member to variables.
Definition: ast.cpp:11928
nmodl::ast::ElseStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9859
nmodl::visitor::Visitor::visit_expression
virtual void visit_expression(ast::Expression &node)=0
visit node of type ast::Expression
nmodl::visitor::Visitor::visit_statement_block
virtual void visit_statement_block(ast::StatementBlock &node)=0
visit node of type ast::StatementBlock
nmodl::ast::EigenLinearSolverBlock::initialize_block
std::shared_ptr< StatementBlock > initialize_block
Statement block to be executed before calling linear solver.
Definition: eigen_linear_solver_block.hpp:45
nmodl::ast::FromStatement::from
std::shared_ptr< Expression > from
TODO.
Definition: from_statement.hpp:43
nmodl::ast::EigenNewtonSolverBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13203
nmodl::ast::Conserve::set_expr
void set_expr(std::shared_ptr< Expression > &&expr)
Setter for member variable Conserve::expr (rvalue reference)
Definition: ast.cpp:10250
nmodl::ast::ProcedureBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ProcedureBlock::name (rvalue reference)
Definition: ast.cpp:4286
nmodl::ast::BreakpointBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4658
nmodl::ast::AfterBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4814
nmodl::ast::RandomVar::RandomVar
RandomVar(Name *name)
Definition: ast.cpp:2161
nmodl::ast::UnitState::set_value
void set_value(UnitStateType value)
Setter for member variable UnitState::value.
Definition: ast.cpp:7884
nmodl::ast::Statement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:354
nmodl::ast::StatementBlock::StatementBlock
StatementBlock(const StatementVector &statements)
Definition: ast.cpp:3187
nmodl::ast::DiffEqExpression::DiffEqExpression
DiffEqExpression(BinaryExpression *expression)
Definition: ast.cpp:6663
nmodl::ast::ForNetcon::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5041
nmodl::visitor::ConstVisitor::visit_double
virtual void visit_double(const ast::Double &node)=0
visit node of type ast::Double
nmodl::ast::RandomVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: random_var.hpp:43
nmodl::ast::ParamAssign::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8409
nmodl::visitor::ConstVisitor::visit_block
virtual void visit_block(const ast::Block &node)=0
visit node of type ast::Block
nmodl::ast::Suffix::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11250
nmodl::ast::String::set_value
void set_value(std::string value)
Setter for member variable String::value.
Definition: ast.cpp:504
nmodl::ast::CvodeBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: cvode_block.hpp:49
nmodl::visitor::ConstVisitor::visit_external
virtual void visit_external(const ast::External &node)=0
visit node of type ast::External
nmodl::ast::NumberRange::NumberRange
NumberRange(Number *min, Number *max)
Definition: ast.cpp:5996
nmodl::ast::AssignedBlock
Represents a ASSIGNED block in the NMODL.
Definition: assigned_block.hpp:54
nmodl::ast::Limits::min
std::shared_ptr< Number > min
TODO.
Definition: limits.hpp:41
nmodl::ast::UnitBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5314
nmodl::ast::WrappedExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14009
nmodl::ast::SolveBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4567
nmodl::ast::LongitudinalDiffusionBlock::name
std::shared_ptr< Name > name
Name of the longitudinal diffusion block.
Definition: longitudinal_diffusion_block.hpp:41
nmodl::ast::RangeVar
TODO.
Definition: range_var.hpp:38
nmodl::ast::Define::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8153
nmodl::ast::BreakpointBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: breakpoint_block.hpp:58
nmodl::ast::Watch::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7195
nmodl::ast::FunctionCall::set_arguments
void set_arguments(ExpressionVector &&arguments)
Setter for member variable FunctionCall::arguments (rvalue reference)
Definition: ast.cpp:7166
nmodl::ast::EigenNewtonSolverBlock::functor_block
std::shared_ptr< StatementBlock > functor_block
odes as functor for eigen
Definition: eigen_newton_solver_block.hpp:49
nmodl::ast::KineticBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5147
nmodl::ast::StateBlock::definitions
AssignedDefinitionVector definitions
Vector of state variables.
Definition: state_block.hpp:55
nmodl::ast::TableStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11071
nmodl::ast::IndependentBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2498
nmodl::ast::RandomVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2136
nmodl::visitor::ConstVisitor::visit_name
virtual void visit_name(const ast::Name &node)=0
visit node of type ast::Name
nmodl::ast::ParamAssign::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8498
nmodl::ast::Ast::is_constant_var
virtual bool is_constant_var() const noexcept
Check if the ast node is an instance of ast::ConstantVar.
Definition: ast.cpp:178
nmodl::ast::WrappedExpression::expression
std::shared_ptr< Expression > expression
Expression that is being wrapped.
Definition: wrapped_expression.hpp:41
nmodl::ast::PrimeName::value
std::shared_ptr< String > value
Name of prime variable.
Definition: prime_name.hpp:51
nmodl::ast::LineComment::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12581
nmodl::ast::NrnStateBlock::solve_statements
StatementVector solve_statements
solve blocks to be called or generated
Definition: nrn_state_block.hpp:42
nmodl::ast::Ast::is_reaction_statement
virtual bool is_reaction_statement() const noexcept
Check if the ast node is an instance of ast::ReactionStatement.
Definition: ast.cpp:252
nmodl::visitor::Visitor::visit_assigned_definition
virtual void visit_assigned_definition(ast::AssignedDefinition &node)=0
visit node of type ast::AssignedDefinition
nmodl::ast::WhileStatement::set_condition
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable WhileStatement::condition (rvalue reference)
Definition: ast.cpp:9503
nmodl::ast::RandomVarList::RandomVarList
RandomVarList(const RandomVarVector &variables)
Definition: ast.cpp:12059
nmodl::ast::EigenNewtonSolverBlock
Represent newton solver solution block based on Eigen.
Definition: eigen_newton_solver_block.hpp:38
nmodl::ast::Ast::is_global_var
virtual bool is_global_var() const noexcept
Check if the ast node is an instance of ast::GlobalVar.
Definition: ast.cpp:106
nmodl::visitor::ConstVisitor::visit_protect_statement
virtual void visit_protect_statement(const ast::ProtectStatement &node)=0
visit node of type ast::ProtectStatement
nmodl::ast::LagStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10816
nmodl::ast::LocalVarVector
std::vector< std::shared_ptr< LocalVar > > LocalVarVector
Definition: ast_decl.hpp:356
nmodl::ast::GlobalVarVector
std::vector< std::shared_ptr< GlobalVar > > GlobalVarVector
Definition: ast_decl.hpp:323
nmodl::ast::FactorDef::unit2
std::shared_ptr< Unit > unit2
TODO.
Definition: factor_def.hpp:49
nmodl::ast::ParamAssign::set_value
void set_value(std::shared_ptr< Number > &&value)
Setter for member variable ParamAssign::value (rvalue reference)
Definition: ast.cpp:8538
nmodl::visitor::ConstVisitor::visit_read_ion_var
virtual void visit_read_ion_var(const ast::ReadIonVar &node)=0
visit node of type ast::ReadIonVar
nmodl::ast::OntologyStatement::ontology_id
std::shared_ptr< String > ontology_id
Ontology name.
Definition: ontology_statement.hpp:41
nmodl::ast::ElseStatement::ElseStatement
ElseStatement(StatementBlock *statement_block)
Definition: ast.cpp:9880
nmodl::ast::Argument::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1354
nmodl::ast::LinearBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3376
nmodl::ast::ProtectStatement::ProtectStatement
ProtectStatement(Expression *expression)
Definition: ast.cpp:9139
nmodl::visitor::ConstVisitor::visit_param_block
virtual void visit_param_block(const ast::ParamBlock &node)=0
visit node of type ast::ParamBlock
nmodl::ast::NeuronBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5517
nmodl::visitor::ConstVisitor::visit_line_comment
virtual void visit_line_comment(const ast::LineComment &node)=0
visit node of type ast::LineComment
nmodl::ast::NonLinearBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: non_linear_block.hpp:57
nmodl::ast::Define::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8160
nmodl::visitor::ConstVisitor::visit_thread_safe
virtual void visit_thread_safe(const ast::ThreadSafe &node)=0
visit node of type ast::ThreadSafe
nmodl::ast::Define::name
std::shared_ptr< Name > name
Name of the macro.
Definition: define.hpp:41
nmodl::ast::MutexLock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10111
nmodl::ast::BbcorePointerVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable BbcorePointerVar::name (rvalue reference)
Definition: ast.cpp:2284
nmodl::visitor::ConstVisitor::visit_bbcore_pointer_var
virtual void visit_bbcore_pointer_var(const ast::BbcorePointerVar &node)=0
visit node of type ast::BbcorePointerVar
nmodl::visitor::Visitor::visit_if_statement
virtual void visit_if_statement(ast::IfStatement &node)=0
visit node of type ast::IfStatement
nmodl::visitor::ConstVisitor::visit_binary_operator
virtual void visit_binary_operator(const ast::BinaryOperator &node)=0
visit node of type ast::BinaryOperator
nmodl::ast::ElectrodeCurrent::token
std::shared_ptr< ModToken > token
token with location information
Definition: electrode_current.hpp:44
nmodl::ast::UnitDef::set_unit1
void set_unit1(std::shared_ptr< Unit > &&unit1)
Setter for member variable UnitDef::unit1 (rvalue reference)
Definition: ast.cpp:7446
nmodl::ast::LinearBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable LinearBlock::name (rvalue reference)
Definition: ast.cpp:3467
nmodl::ast::CvodeBlock::stiff_block
std::shared_ptr< StatementBlock > stiff_block
Block with statements of the form Dvar = Dvar / (1 - dt * J(f)), used for updating stiff systems.
Definition: cvode_block.hpp:47
nmodl::ast::AssignedDefinition::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8618
nmodl::ast::Ast::is_nrn_state_block
virtual bool is_nrn_state_block() const noexcept
Check if the ast node is an instance of ast::NrnStateBlock.
Definition: ast.cpp:292
nmodl::visitor::ConstVisitor::visit_double_unit
virtual void visit_double_unit(const ast::DoubleUnit &node)=0
visit node of type ast::DoubleUnit
nmodl::ast::VarName::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable VarName::name (rvalue reference)
Definition: ast.cpp:1228
nmodl::ast::UnaryExpression::op
UnaryOperator op
TODO.
Definition: unary_expression.hpp:42
nmodl::ast::AssignedDefinition::set_length
void set_length(std::shared_ptr< Integer > &&length)
Setter for member variable AssignedDefinition::length (rvalue reference)
Definition: ast.cpp:8801
nmodl::ast::LineComment::LineComment
LineComment(String *statement)
Definition: ast.cpp:12590
nmodl::ast::Integer::token
std::shared_ptr< ModToken > token
token with location information
Definition: integer.hpp:56
nmodl::ast::Compartment::species
NameVector species
The names of the species that reside in this compartment.
Definition: compartment.hpp:46
nmodl::ast::Suffix::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11307
nmodl::ast::Ast::is_assigned_definition
virtual bool is_assigned_definition() const noexcept
Check if the ast node is an instance of ast::AssignedDefinition.
Definition: ast.cpp:222
nmodl::ast::FunctionTableBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3804
nmodl::ast::PrimeName::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:891
nmodl::ast::PointerVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2054
nmodl::ast::ConstantVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: constant_var.hpp:47
nmodl::ast::LongitudinalDiffusionBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13840
nmodl::ast::Suffix::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:11246
nmodl::ast::BABlockType::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7316
nmodl::ast::IndependentBlock::variables
NameVector variables
List of variable that should be independent.
Definition: independent_block.hpp:49
nmodl::ast::Global::token
std::shared_ptr< ModToken > token
token with location information
Definition: global.hpp:44
nmodl::ast::TableStatement::set_with
void set_with(std::shared_ptr< Integer > &&with)
Setter for member variable TableStatement::with (rvalue reference)
Definition: ast.cpp:11219
nmodl::ast::ParamAssign::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8396
nmodl::ast::Boolean::value
int value
Value of boolean.
Definition: boolean.hpp:45
nmodl::ast::LonDiffuse::species
NameVector species
Names of the diffusing species.
Definition: lon_diffuse.hpp:46
nmodl::ast::Pointer::insert_pointer_var
PointerVarVector::const_iterator insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr< PointerVar > &n)
Insert member to variables.
Definition: ast.cpp:12177
nmodl::visitor::ConstVisitor::visit_write_ion_var
virtual void visit_write_ion_var(const ast::WriteIonVar &node)=0
visit node of type ast::WriteIonVar
nmodl::ast::GlobalVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1968
nmodl::ast::ReadIonVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: read_ion_var.hpp:43
nmodl::ast::IfStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9593
nmodl::ast::NumberRange::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5987
nmodl::ast::ReactionOperator
TODO.
Definition: reaction_operator.hpp:38
nmodl::ast::ConductanceHint::ion
std::shared_ptr< Name > ion
Ion name.
Definition: conductance_hint.hpp:51
nmodl::visitor::ConstVisitor::visit_diff_eq_expression
virtual void visit_diff_eq_expression(const ast::DiffEqExpression &node)=0
visit node of type ast::DiffEqExpression
nmodl::ast::ConductanceHint::token
std::shared_ptr< ModToken > token
token with location information
Definition: conductance_hint.hpp:53
nmodl::ast::ExpressionStatement
TODO.
Definition: expression_statement.hpp:38
nmodl::visitor::ConstVisitor::visit_initial_block
virtual void visit_initial_block(const ast::InitialBlock &node)=0
visit node of type ast::InitialBlock
nmodl::ast::ElectrodeCurVar::name
std::shared_ptr< Name > name
TODO.
Definition: electrode_cur_var.hpp:41
nmodl::ast::LonDiffuse::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10443
nmodl::visitor::Visitor::visit_identifier
virtual void visit_identifier(ast::Identifier &node)=0
visit node of type ast::Identifier
nmodl::ast::ElseIfStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9801
nmodl::ast::ParamAssign::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8451
nmodl::ast::ProcedureBlock::parameters
ArgumentVector parameters
Vector of the parameters.
Definition: procedure_block.hpp:44
nmodl::ast::Block
Base class for all block scoped nodes.
Definition: block.hpp:41
nmodl::ast::LonDiffuse::set_species
void set_species(NameVector &&species)
Setter for member variable LonDiffuse::species (rvalue reference)
Definition: ast.cpp:10572
nmodl::ast::RandomVarList::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12050
nmodl::visitor::ConstVisitor::visit_function_block
virtual void visit_function_block(const ast::FunctionBlock &node)=0
visit node of type ast::FunctionBlock
nmodl::ast::ElseIfStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9744
nmodl::visitor::Visitor::visit_binary_expression
virtual void visit_binary_expression(ast::BinaryExpression &node)=0
visit node of type ast::BinaryExpression
nmodl::ast::InitialBlock
Represents a INITIAL block in the NMODL.
Definition: initial_block.hpp:49
nmodl::ast::FunctionCall::FunctionCall
FunctionCall(Name *name, const ExpressionVector &arguments)
Definition: ast.cpp:7103
nmodl::ast::ConductanceHint::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8937
nmodl::ast::DiffEqExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: diff_eq_expression.hpp:43
nmodl::ast::LonDiffuse::set_rate
void set_rate(std::shared_ptr< Expression > &&rate)
Setter for member variable LonDiffuse::rate (rvalue reference)
Definition: ast.cpp:10555
nmodl::ast::UnitState::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7841
nmodl::ast::WatchStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: watch_statement.hpp:44
nmodl::ast::MutexUnlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10139
nmodl::ast::Ast::set_parent
virtual void set_parent(Ast *p)
Parent setter.
Definition: ast.cpp:315
nmodl::ast::NonLinearBlock::set_solvefor
void set_solvefor(NameVector &&solvefor)
Setter for member variable NonLinearBlock::solvefor (rvalue reference)
Definition: ast.cpp:3643
nmodl::ast::ConstantVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6163
nmodl::ast::ReadIonVarVector
std::vector< std::shared_ptr< ReadIonVar > > ReadIonVarVector
Definition: ast_decl.hpp:318
nmodl::visitor::Visitor::visit_independent_block
virtual void visit_independent_block(ast::IndependentBlock &node)=0
visit node of type ast::IndependentBlock
nmodl::ast::EigenLinearSolverBlock::finalize_block
std::shared_ptr< StatementBlock > finalize_block
Statement block to be executed after calling linear solver.
Definition: eigen_linear_solver_block.hpp:51
nmodl::ast::Ast::is_random_var_list
virtual bool is_random_var_list() const noexcept
Check if the ast node is an instance of ast::RandomVarList.
Definition: ast.cpp:272
nmodl::ast::DerivativeBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3246
nmodl::ast::UpdateDt::value
std::shared_ptr< Double > value
Value of new timestep.
Definition: update_dt.hpp:41
nmodl::ast::DiscreteBlock
TODO.
Definition: discrete_block.hpp:38
nmodl::ast::Compartment::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10314
nmodl::ast::LocalListStatement::reset_local_var
void reset_local_var(LocalVarVector::const_iterator position, LocalVar *n)
Reset member to variables.
Definition: ast.cpp:7965
nmodl::ast::ConstantBlock::ConstantBlock
ConstantBlock(const ConstantStatementVector &statements)
Definition: ast.cpp:5409
nmodl::ast::GlobalVar
TODO.
Definition: global_var.hpp:38
nmodl::ast::Ast::is_function_table_block
virtual bool is_function_table_block() const noexcept
Check if the ast node is an instance of ast::FunctionTableBlock.
Definition: ast.cpp:140
nmodl::ast::WhileStatement::condition
std::shared_ptr< Expression > condition
TODO.
Definition: while_statement.hpp:41
nmodl::ast::ElseIfStatementVector
std::vector< std::shared_ptr< ElseIfStatement > > ElseIfStatementVector
Definition: ast_decl.hpp:388
nmodl::ast::Watch::value
std::shared_ptr< Expression > value
TODO.
Definition: watch.hpp:43
nmodl::ast::Ast::is_mutex_lock
virtual bool is_mutex_lock() const noexcept
Check if the ast node is an instance of ast::MutexLock.
Definition: ast.cpp:242
nmodl::ast::Name::token
std::shared_ptr< ModToken > token
token with location information
Definition: name.hpp:49
nmodl::ast::EigenLinearSolverBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13423
nmodl::ast::NeuronBlock::NeuronBlock
NeuronBlock(StatementBlock *statement_block)
Definition: ast.cpp:5491
nmodl::ast::WhileStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: while_statement.hpp:45
nmodl::visitor::Visitor::visit_unit_block
virtual void visit_unit_block(ast::UnitBlock &node)=0
visit node of type ast::UnitBlock
nmodl::ast::Conserve::expr
std::shared_ptr< Expression > expr
TODO.
Definition: conserve.hpp:43
nmodl::visitor::Visitor::visit_conserve
virtual void visit_conserve(ast::Conserve &node)=0
visit node of type ast::Conserve
nmodl::ast::Ast::is_lag_statement
virtual bool is_lag_statement() const noexcept
Check if the ast node is an instance of ast::LagStatement.
Definition: ast.cpp:254
nmodl::ast::AfterBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: after_block.hpp:56
nmodl::visitor::ConstVisitor::visit_pointer
virtual void visit_pointer(const ast::Pointer &node)=0
visit node of type ast::Pointer
nmodl::ast::String::value
std::string value
Value of string.
Definition: string.hpp:55
nmodl::ast::LocalListStatement
TODO.
Definition: local_list_statement.hpp:39
nmodl::visitor::ConstVisitor::visit_include
virtual void visit_include(const ast::Include &node)=0
visit node of type ast::Include
nmodl::ast::Ast::is_ba_block_type
virtual bool is_ba_block_type() const noexcept
Check if the ast node is an instance of ast::BABlockType.
Definition: ast.cpp:202
nmodl::ast::StatementBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3178
nmodl::ast::Ast::is_if_statement
virtual bool is_if_statement() const noexcept
Check if the ast node is an instance of ast::IfStatement.
Definition: ast.cpp:234
nmodl::ast::ParenExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6419
nmodl::ast::NrnStateBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: nrn_state_block.hpp:44
nmodl::ast::LocalVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5764
nmodl::ast::NameVector
std::vector< std::shared_ptr< Name > > NameVector
Definition: ast_decl.hpp:312
nmodl::ast::AssignedDefinition::from
std::shared_ptr< Number > from
TODO.
Definition: assigned_definition.hpp:45
nmodl::ast::Ast::set_name
virtual void set_name(const std::string &name)
Set name for the AST node.
Definition: ast.cpp:46
nmodl::visitor::ConstVisitor::visit_independent_block
virtual void visit_independent_block(const ast::IndependentBlock &node)=0
visit node of type ast::IndependentBlock
nmodl::ast::Ast::is_diff_eq_expression
virtual bool is_diff_eq_expression() const noexcept
Check if the ast node is an instance of ast::DiffEqExpression.
Definition: ast.cpp:190
nmodl::visitor::ConstVisitor::visit_integer
virtual void visit_integer(const ast::Integer &node)=0
visit node of type ast::Integer
nmodl::ast::LagStatement::name
std::shared_ptr< Identifier > name
Name of the variable (TODO)
Definition: lag_statement.hpp:50
nmodl::ast::TableStatement::set_from
void set_from(std::shared_ptr< Expression > &&from)
Setter for member variable TableStatement::from (rvalue reference)
Definition: ast.cpp:11185
nmodl::ast::UnitDef
TODO.
Definition: unit_def.hpp:38
nmodl::ast::Watch::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7213
nmodl::ast::Useion::set_readlist
void set_readlist(ReadIonVarVector &&readlist)
Setter for member variable Useion::readlist (rvalue reference)
Definition: ast.cpp:11528
nmodl::ast::BbcorePointer::variables
BbcorePointerVarVector variables
Vector of bbcore pointer variables.
Definition: bbcore_pointer.hpp:50
nmodl::ast::NrnStateBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13040
nmodl::ast::BinaryExpression::set_rhs
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable BinaryExpression::rhs (rvalue reference)
Definition: ast.cpp:6616
nmodl::ast::FunctionCall::name
std::shared_ptr< Name > name
TODO.
Definition: function_call.hpp:41
nmodl::ast::AfterBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4861
nmodl::ast::BlockComment::statement
std::shared_ptr< String > statement
comment text
Definition: block_comment.hpp:41
nmodl::visitor::Visitor::visit_for_netcon
virtual void visit_for_netcon(ast::ForNetcon &node)=0
visit node of type ast::ForNetcon
nmodl::ast::WatchStatement
Represent WATCH statement in NMODL.
Definition: watch_statement.hpp:39
nmodl::visitor::ConstVisitor::visit_statement_block
virtual void visit_statement_block(const ast::StatementBlock &node)=0
visit node of type ast::StatementBlock
nmodl::ast::Name::set_name
void set_name(const std::string &name) override
Set name for the current ast node.
Definition: ast.cpp:844
nmodl::ast::Ast::is_discrete_block
virtual bool is_discrete_block() const noexcept
Check if the ast node is an instance of ast::DiscreteBlock.
Definition: ast.cpp:138
nmodl::visitor::ConstVisitor::visit_constant_block
virtual void visit_constant_block(const ast::ConstantBlock &node)=0
visit node of type ast::ConstantBlock
nmodl::visitor::ConstVisitor::visit_program
virtual void visit_program(const ast::Program &node)=0
visit node of type ast::Program
nmodl::ast::SolveBlock::steadystate
std::shared_ptr< Name > steadystate
Name of the integration method.
Definition: solve_block.hpp:45
nmodl::ast::LineComment
Represents a one line comment in NMODL.
Definition: line_comment.hpp:38
nmodl::ast::ReadIonVar
TODO.
Definition: read_ion_var.hpp:38
nmodl::ast::Include::Include
Include(String *filename, const NodeVector &blocks)
Definition: ast.cpp:8309
nmodl::ast::BABlockType::set_value
void set_value(BAType value)
Setter for member variable BABlockType::value.
Definition: ast.cpp:7353
nmodl::visitor::ConstVisitor::visit_verbatim
virtual void visit_verbatim(const ast::Verbatim &node)=0
visit node of type ast::Verbatim
nmodl::ast::Global::Global
Global(const GlobalVarVector &variables)
Definition: ast.cpp:11973
nmodl::ast::IfStatement::set_condition
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable IfStatement::condition (rvalue reference)
Definition: ast.cpp:9664
nmodl::ast::AssignedDefinition::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8690
nmodl::ast::Float
Represents a float variable.
Definition: float.hpp:44
nmodl::ast::EigenNewtonSolverBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13144
nmodl::ast::BreakpointBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: breakpoint_block.hpp:56
nmodl::ast::BreakpointBlock
Represents a BREAKPOINT block in NMODL.
Definition: breakpoint_block.hpp:53
nmodl::ast::DerivativeBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3253
nmodl::visitor::ConstVisitor::visit_breakpoint_block
virtual void visit_breakpoint_block(const ast::BreakpointBlock &node)=0
visit node of type ast::BreakpointBlock
nmodl::ast::Ast::is_name
virtual bool is_name() const noexcept
Check if the ast node is an instance of ast::Name.
Definition: ast.cpp:84
nmodl::ast::ExternVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2308
nmodl::ast::Ast::is_verbatim
virtual bool is_verbatim() const noexcept
Check if the ast node is an instance of ast::Verbatim.
Definition: ast.cpp:282
nmodl::ast::Useion::token
std::shared_ptr< ModToken > token
token with location information
Definition: useion.hpp:53
nmodl::ast::UnitState
TODO.
Definition: unit_state.hpp:38
nmodl::ast::Suffix::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Suffix::name (rvalue reference)
Definition: ast.cpp:11339
nmodl::visitor::ConstVisitor::visit_before_block
virtual void visit_before_block(const ast::BeforeBlock &node)=0
visit node of type ast::BeforeBlock
nmodl::visitor::Visitor::visit_while_statement
virtual void visit_while_statement(ast::WhileStatement &node)=0
visit node of type ast::WhileStatement
nmodl::visitor::ConstVisitor::visit_electrode_cur_var
virtual void visit_electrode_cur_var(const ast::ElectrodeCurVar &node)=0
visit node of type ast::ElectrodeCurVar
nmodl::ast::CvodeBlock::name
std::shared_ptr< Name > name
Name of the block.
Definition: cvode_block.hpp:41
nmodl::ast::DoubleUnit::unit
std::shared_ptr< Unit > unit
TODO.
Definition: double_unit.hpp:43
nmodl::ast::AssignedDefinition::name
std::shared_ptr< Identifier > name
Name of the variable.
Definition: assigned_definition.hpp:41
nmodl::ast::BABlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4901
nmodl::ast::IndexedName
Represents specific element of an array variable.
Definition: indexed_name.hpp:48
nmodl::ast::ConstantBlock::set_statements
void set_statements(ConstantStatementVector &&statements)
Setter for member variable ConstantBlock::statements (rvalue reference)
Definition: ast.cpp:5444
nmodl::ast::ArgumentVector
std::vector< std::shared_ptr< Argument > > ArgumentVector
Definition: ast_decl.hpp:316
nmodl::ast::Unit::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5556
nmodl::visitor::Visitor::visit_net_receive_block
virtual void visit_net_receive_block(ast::NetReceiveBlock &node)=0
visit node of type ast::NetReceiveBlock
nmodl::ast::BABlockType::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7346
nmodl::ast::RandomVar::name
std::shared_ptr< Name > name
Name of the a RANDOM variable.
Definition: random_var.hpp:41
nmodl::ast::LinearBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3404
nmodl::ast::BeforeBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4730
nmodl::ast::Ast::get_symbol_table
virtual symtab::SymbolTable * get_symbol_table() const
Return associated symbol table for the AST node.
Definition: ast.cpp:38
nmodl::ast::AfterBlock::bablock
std::shared_ptr< BABlock > bablock
Block to be called after.
Definition: after_block.hpp:54
nmodl::ast::WrappedExpression::WrappedExpression
WrappedExpression(Expression *expression)
Definition: ast.cpp:13983
nmodl::ast::InitialBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: initial_block.hpp:52
nmodl::visitor::Visitor::visit_solution_expression
virtual void visit_solution_expression(ast::SolutionExpression &node)=0
visit node of type ast::SolutionExpression
nmodl::ast::EigenNewtonSolverBlock::set_functor_block
void set_functor_block(std::shared_ptr< StatementBlock > &&functor_block)
Setter for member variable EigenNewtonSolverBlock::functor_block (rvalue reference)
Definition: ast.cpp:13306
nmodl::visitor::Visitor::visit_derivimplicit_callback
virtual void visit_derivimplicit_callback(ast::DerivimplicitCallback &node)=0
visit node of type ast::DerivimplicitCallback
nmodl::ast::String::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:497
nmodl::visitor::ConstVisitor::visit_valence
virtual void visit_valence(const ast::Valence &node)=0
visit node of type ast::Valence
nmodl::ast::FunctionBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4018
nmodl::ast::LocalListStatement::emplace_back_local_var
void emplace_back_local_var(LocalVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:7900
nmodl::ast::StatementBlock::erase_statement
StatementVector::const_iterator erase_statement(StatementVector::const_iterator first)
Erase member to statements.
Definition: ast.cpp:3096
nmodl::ast::LinearBlock::name
std::shared_ptr< Name > name
Name of the linear block.
Definition: linear_block.hpp:56
nmodl::ast::AssignedDefinition::set_from
void set_from(std::shared_ptr< Number > &&from)
Setter for member variable AssignedDefinition::from (rvalue reference)
Definition: ast.cpp:8818
nmodl::visitor::Visitor::visit_solve_block
virtual void visit_solve_block(ast::SolveBlock &node)=0
visit node of type ast::SolveBlock
nmodl::ast::UnaryExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6747
nmodl::ast::Ast::is_update_dt
virtual bool is_update_dt() const noexcept
Check if the ast node is an instance of ast::UpdateDt.
Definition: ast.cpp:308
nmodl::ast::FunctionCall
TODO.
Definition: function_call.hpp:38
nmodl::ast::BbcorePointerVarVector
std::vector< std::shared_ptr< BbcorePointerVar > > BbcorePointerVarVector
Definition: ast_decl.hpp:326
nmodl::ast::ProcedureBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4215
nmodl::ast::DestructorBlock
Represents a DESTRUCTOR block in the NMODL.
Definition: destructor_block.hpp:53
nmodl::ast::DerivimplicitCallback::DerivimplicitCallback
DerivimplicitCallback(Block *node_to_solve)
Definition: ast.cpp:14067
nmodl::ast::BinaryExpression::set_lhs
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable BinaryExpression::lhs (rvalue reference)
Definition: ast.cpp:6590
nmodl::visitor::Visitor
Abstract base class for all visitors implementation.
Definition: visitor.hpp:39
nmodl::ast::Ast::is_pointer_var
virtual bool is_pointer_var() const noexcept
Check if the ast node is an instance of ast::PointerVar.
Definition: ast.cpp:108
nmodl::ast::BinaryExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6574
nmodl::ast::FromStatement::FromStatement
FromStatement(Name *name, Expression *from, Expression *to, Expression *increment, StatementBlock *statement_block)
Definition: ast.cpp:9265
nmodl::ast::AssignedDefinition::token
std::shared_ptr< ModToken > token
token with location information
Definition: assigned_definition.hpp:55
nmodl::ast::BABlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4958
nmodl::ast::ExternVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2324
nmodl::ast::Conserve::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10179
nmodl::ast::DiffEqExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6642
nmodl::ast::Ast::is_valence
virtual bool is_valence() const noexcept
Check if the ast node is an instance of ast::Valence.
Definition: ast.cpp:208
nmodl::ast::Node::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:326
nmodl::ast::TableStatement::TableStatement
TableStatement(const NameVector &table_vars, const NameVector &depend_vars, Expression *from, Expression *to, Integer *with)
Definition: ast.cpp:11080
nmodl::ast::Conserve::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10161
nmodl::ast::UnaryExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6729
nmodl::ast::BABlock::BABlock
BABlock(BABlockType *type, StatementBlock *statement_block)
Definition: ast.cpp:4928
nmodl::ast::LocalListStatement::insert_local_var
LocalVarVector::const_iterator insert_local_var(LocalVarVector::const_iterator position, const std::shared_ptr< LocalVar > &n)
Insert member to variables.
Definition: ast.cpp:7957
nmodl::ast::Ast::is_else_if_statement
virtual bool is_else_if_statement() const noexcept
Check if the ast node is an instance of ast::ElseIfStatement.
Definition: ast.cpp:236
nmodl::visitor::ConstVisitor::visit_var_name
virtual void visit_var_name(const ast::VarName &node)=0
visit node of type ast::VarName
nmodl::ast::LonDiffuse::set_index_name
void set_index_name(std::shared_ptr< Name > &&index_name)
Setter for member variable LonDiffuse::index_name (rvalue reference)
Definition: ast.cpp:10538
nmodl::ast::VarName::set_index
void set_index(std::shared_ptr< Expression > &&index)
Setter for member variable VarName::index (rvalue reference)
Definition: ast.cpp:1262
nmodl::ast::WriteIonVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1636
nmodl::ast::FactorDef::set_gt
void set_gt(std::shared_ptr< Boolean > &&gt)
Setter for member variable FactorDef::gt (rvalue reference)
Definition: ast.cpp:7680
nmodl::ast::Ast::is_table_statement
virtual bool is_table_statement() const noexcept
Check if the ast node is an instance of ast::TableStatement.
Definition: ast.cpp:258
nmodl::ast::SolveBlock::set_block_name
void set_block_name(std::shared_ptr< Name > &&block_name)
Setter for member variable SolveBlock::block_name (rvalue reference)
Definition: ast.cpp:4586
nmodl::visitor::ConstVisitor::visit_param_assign
virtual void visit_param_assign(const ast::ParamAssign &node)=0
visit node of type ast::ParamAssign
nmodl::ast::Ast::is_unit
virtual bool is_unit() const noexcept
Check if the ast node is an instance of ast::Unit.
Definition: ast.cpp:168
nmodl::ast::ProtectStatement
TODO.
Definition: protect_statement.hpp:38
nmodl::ast::ConstructorBlock
Represents a CONSTRUCTOR block in the NMODL.
Definition: constructor_block.hpp:51
nmodl::ast::Ast::is_thread_safe
virtual bool is_thread_safe() const noexcept
Check if the ast node is an instance of ast::ThreadSafe.
Definition: ast.cpp:280
nmodl::ast::IfStatement::elseifs
ElseIfStatementVector elseifs
TODO.
Definition: if_statement.hpp:46
nmodl::visitor::Visitor::visit_line_comment
virtual void visit_line_comment(ast::LineComment &node)=0
visit node of type ast::LineComment
nmodl::ast::BABlockType::value
BAType value
block type
Definition: ba_block_type.hpp:45
nmodl::ast::IndependentBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2530
nmodl::visitor::ConstVisitor::visit_table_statement
virtual void visit_table_statement(const ast::TableStatement &node)=0
visit node of type ast::TableStatement
nmodl::ast::StateBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2787
nmodl::ast::ParamAssign::set_limit
void set_limit(std::shared_ptr< Limits > &&limit)
Setter for member variable ParamAssign::limit (rvalue reference)
Definition: ast.cpp:8572
nmodl::visitor::ConstVisitor::visit_lin_equation
virtual void visit_lin_equation(const ast::LinEquation &node)=0
visit node of type ast::LinEquation
nmodl::ast::NonLinEquation::NonLinEquation
NonLinEquation(Expression *lhs, Expression *rhs)
Definition: ast.cpp:6861
nmodl::ast::NumberRange::set_min
void set_min(std::shared_ptr< Number > &&min)
Setter for member variable NumberRange::min (rvalue reference)
Definition: ast.cpp:6041
nmodl::ast::ReadIonVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1538
nmodl::ast::LongitudinalDiffusionBlock
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
Definition: longitudinal_diffusion_block.hpp:38
nmodl::visitor::Visitor::visit_unit_def
virtual void visit_unit_def(ast::UnitDef &node)=0
visit node of type ast::UnitDef
nmodl::ast::UnitState::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7877
nmodl::ast::ConstantVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6120
nmodl::ast::Ast::is_longitudinal_diffusion_block
virtual bool is_longitudinal_diffusion_block() const noexcept
Check if the ast node is an instance of ast::LongitudinalDiffusionBlock.
Definition: ast.cpp:300
nmodl::ast::AssignedBlock::emplace_back_assigned_definition
void emplace_back_assigned_definition(AssignedDefinition *n)
Add member to definitions by raw pointer.
Definition: ast.cpp:2568
nmodl::visitor::ConstVisitor::visit_lag_statement
virtual void visit_lag_statement(const ast::LagStatement &node)=0
visit node of type ast::LagStatement
nmodl::ast::ParenExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6431
nmodl::visitor::ConstVisitor::visit_factor_def
virtual void visit_factor_def(const ast::FactorDef &node)=0
visit node of type ast::FactorDef
nmodl::ast::CvodeBlock::set_non_stiff_block
void set_non_stiff_block(std::shared_ptr< StatementBlock > &&non_stiff_block)
Setter for member variable CvodeBlock::non_stiff_block (rvalue reference)
Definition: ast.cpp:13765
nmodl::ast::Argument::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable Argument::unit (rvalue reference)
Definition: ast.cpp:1386
nmodl::ast::ExternVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2312
nmodl::ast::Ast::is_double
virtual bool is_double() const noexcept
Check if the ast node is an instance of ast::Double.
Definition: ast.cpp:80
nmodl::ast::Ast::clone
virtual Ast * clone() const
Create a copy of the current node.
Definition: ast.cpp:26
nmodl::ast::RangeVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1878
nmodl::ast::EigenLinearSolverBlock::variable_block
std::shared_ptr< StatementBlock > variable_block
Statements to be declared in the functor.
Definition: eigen_linear_solver_block.hpp:43
nmodl::ast::ElseStatement::statement_block
std::shared_ptr< StatementBlock > statement_block
TODO.
Definition: else_statement.hpp:41
nmodl::ast::Pointer::token
std::shared_ptr< ModToken > token
token with location information
Definition: pointer.hpp:44
nmodl::ast::LongitudinalDiffusionBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:13806
nmodl::ast::Unit::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5552
nmodl::ast::KineticBlock::solvefor
NameVector solvefor
Solve for specification (TODO)
Definition: kinetic_block.hpp:44
nmodl::ast::MutexUnlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10133
nmodl::visitor::Visitor::visit_read_ion_var
virtual void visit_read_ion_var(ast::ReadIonVar &node)=0
visit node of type ast::ReadIonVar
nmodl::ast::UpdateDt::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14260
nmodl::visitor::ConstVisitor::visit_unary_operator
virtual void visit_unary_operator(const ast::UnaryOperator &node)=0
visit node of type ast::UnaryOperator
nmodl::ast::KineticBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: kinetic_block.hpp:46
nmodl::ast::Suffix::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11268
nmodl::visitor::Visitor::visit_factor_def
virtual void visit_factor_def(ast::FactorDef &node)=0
visit node of type ast::FactorDef
nmodl::ast::Identifier::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:420
nmodl::visitor::Visitor::visit_bbcore_pointer_var
virtual void visit_bbcore_pointer_var(ast::BbcorePointerVar &node)=0
visit node of type ast::BbcorePointerVar
nmodl::ast::UnitBlock::set_definitions
void set_definitions(ExpressionVector &&definitions)
Setter for member variable UnitBlock::definitions (rvalue reference)
Definition: ast.cpp:5358
nmodl::ast::LinearBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3366
nmodl::ast::ProcedureBlock::name
std::shared_ptr< Name > name
Name of the procedure.
Definition: procedure_block.hpp:42
nmodl::ast::BinaryOperator::token
std::shared_ptr< ModToken > token
token with location information
Definition: binary_operator.hpp:43
nmodl::ast::Argument::unit
std::shared_ptr< Unit > unit
Unit of the argument.
Definition: argument.hpp:53
nmodl::ast::Ast::is_number
virtual bool is_number() const noexcept
Check if the ast node is an instance of ast::Number.
Definition: ast.cpp:72
nmodl::ast::Ast::is_model
virtual bool is_model() const noexcept
Check if the ast node is an instance of ast::Model.
Definition: ast.cpp:214
nmodl::ast::Useion
Represents USEION statement in NMODL.
Definition: useion.hpp:40
nmodl::ast::EigenNewtonSolverBlock::variable_block
std::shared_ptr< StatementBlock > variable_block
Statements to be declared in the functor.
Definition: eigen_newton_solver_block.hpp:43
nmodl::ast::EigenLinearSolverBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13381
nmodl::ast::ElseIfStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: else_if_statement.hpp:45
nmodl::ast::VarName::set_at
void set_at(std::shared_ptr< Integer > &&at)
Setter for member variable VarName::at (rvalue reference)
Definition: ast.cpp:1245
nmodl::ast::EigenLinearSolverBlock::EigenLinearSolverBlock
EigenLinearSolverBlock(Integer *n_state_vars, StatementBlock *variable_block, StatementBlock *initialize_block, StatementBlock *setup_x_block, StatementBlock *update_states_block, StatementBlock *finalize_block)
Definition: ast.cpp:13432
nmodl::ast::IndexedName::name
std::shared_ptr< Identifier > name
Name of array variable.
Definition: indexed_name.hpp:51
nmodl::visitor::ConstVisitor::visit_global_var
virtual void visit_global_var(const ast::GlobalVar &node)=0
visit node of type ast::GlobalVar
nmodl::visitor::Visitor::visit_unary_expression
virtual void visit_unary_expression(ast::UnaryExpression &node)=0
visit node of type ast::UnaryExpression
nmodl::ast::Ast::negate
virtual void negate()
Negate the value of AST node.
Definition: ast.cpp:50
nmodl::visitor::ConstVisitor::visit_pointer_var
virtual void visit_pointer_var(const ast::PointerVar &node)=0
visit node of type ast::PointerVar
nmodl::ast::Range::token
std::shared_ptr< ModToken > token
token with location information
Definition: range.hpp:44
nmodl::visitor::Visitor::visit_destructor_block
virtual void visit_destructor_block(ast::DestructorBlock &node)=0
visit node of type ast::DestructorBlock
nmodl::ast::WriteIonVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable WriteIonVar::name (rvalue reference)
Definition: ast.cpp:1682
nmodl::ast::VarName::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1134
nmodl::ast::Program::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12954
nmodl::ast::Ast::is_ast
virtual bool is_ast() const noexcept
Check if the ast node is an instance of ast::Ast.
Definition: ast.cpp:60
nmodl::ast::Include::set_blocks
void set_blocks(NodeVector &&blocks)
Setter for member variable Include::blocks (rvalue reference)
Definition: ast.cpp:8372
nmodl::ast::LinearBlock::set_solvefor
void set_solvefor(NameVector &&solvefor)
Setter for member variable LinearBlock::solvefor (rvalue reference)
Definition: ast.cpp:3484
nmodl::ast::Float::Float
Float(const std::string &value)
Definition: ast.cpp:635
nmodl::ast::RangeVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1929
nmodl::ast::UnitDef::unit2
std::shared_ptr< Unit > unit2
TODO.
Definition: unit_def.hpp:43
nmodl::visitor::ConstVisitor::visit_random_var
virtual void visit_random_var(const ast::RandomVar &node)=0
visit node of type ast::RandomVar
nmodl::ast::RandomVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2187
nmodl::ast::Program::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12906
nmodl::ast::FactorDef::token
std::shared_ptr< ModToken > token
token with location information
Definition: factor_def.hpp:51
nmodl::ast::Ast::is_block_comment
virtual bool is_block_comment() const noexcept
Check if the ast node is an instance of ast::BlockComment.
Definition: ast.cpp:286
nmodl::ast::Nonspecific::Nonspecific
Nonspecific(const NonspecificCurVarVector &currents)
Definition: ast.cpp:11630
nmodl::ast::ThreadSafe::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12460
nmodl::visitor::Visitor::visit_reaction_operator
virtual void visit_reaction_operator(ast::ReactionOperator &node)=0
visit node of type ast::ReactionOperator
nmodl::ast::Ast::is_initial_block
virtual bool is_initial_block() const noexcept
Check if the ast node is an instance of ast::InitialBlock.
Definition: ast.cpp:124
nmodl::ast::Compartment::token
std::shared_ptr< ModToken > token
token with location information
Definition: compartment.hpp:48
nmodl::visitor::ConstVisitor::visit_identifier
virtual void visit_identifier(const ast::Identifier &node)=0
visit node of type ast::Identifier
nmodl::ast::Pointer::emplace_back_pointer_var
void emplace_back_pointer_var(PointerVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:12120
nmodl::ast::VarName::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1166
nmodl::visitor::ConstVisitor::visit_electrode_current
virtual void visit_electrode_current(const ast::ElectrodeCurrent &node)=0
visit node of type ast::ElectrodeCurrent
nmodl::ast::BABlock::set_type
void set_type(std::shared_ptr< BABlockType > &&type)
Setter for member variable BABlock::type (rvalue reference)
Definition: ast.cpp:4973
nmodl::ast::BinaryOperator::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6248
nmodl::ast::Valence::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7726
nmodl::ast::FunctionBlock::name
std::shared_ptr< Name > name
Name of the function.
Definition: function_block.hpp:42
nmodl::ast::BABlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: ba_block.hpp:47
nmodl::ast::Useion::name
std::shared_ptr< Name > name
Name of ion.
Definition: useion.hpp:43
nmodl::ast::Suffix::token
std::shared_ptr< ModToken > token
token with location information
Definition: suffix.hpp:45
nmodl::ast::Valence::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7783
nmodl::visitor::Visitor::visit_include
virtual void visit_include(ast::Include &node)=0
visit node of type ast::Include
nmodl::ast::UnaryExpression
TODO.
Definition: unary_expression.hpp:39
nmodl::ast::ReactionStatement::ReactionStatement
ReactionStatement(Expression *reaction1, const ReactionOperator &op, Expression *reaction2, Expression *expression1, Expression *expression2)
Definition: ast.cpp:10663
nmodl::ast::Ast::is_write_ion_var
virtual bool is_write_ion_var() const noexcept
Check if the ast node is an instance of ast::WriteIonVar.
Definition: ast.cpp:98
nmodl::ast::PrimeName::set_value
void set_value(std::shared_ptr< String > &&value)
Setter for member variable PrimeName::value (rvalue reference)
Definition: ast.cpp:963
nmodl::visitor::ConstVisitor::visit_while_statement
virtual void visit_while_statement(const ast::WhileStatement &node)=0
visit node of type ast::WhileStatement
nmodl::visitor::ConstVisitor::visit_solve_block
virtual void visit_solve_block(const ast::SolveBlock &node)=0
visit node of type ast::SolveBlock
nmodl::ast::BlockComment::BlockComment
BlockComment(String *statement)
Definition: ast.cpp:12674
nmodl::ast::TableStatement::to
std::shared_ptr< Expression > to
to values
Definition: table_statement.hpp:48
nmodl::ast::Ast::is_bbcore_pointer_var
virtual bool is_bbcore_pointer_var() const noexcept
Check if the ast node is an instance of ast::BbcorePointerVar.
Definition: ast.cpp:112
nmodl::ast::String::String
String()=default
nmodl::ast::Integer::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:523
nmodl::ast::SolveBlock::method
std::shared_ptr< Name > method
Name of the integration method.
Definition: solve_block.hpp:43
nmodl::visitor::ConstVisitor::visit_net_receive_block
virtual void visit_net_receive_block(const ast::NetReceiveBlock &node)=0
visit node of type ast::NetReceiveBlock
nmodl::ast::LocalListStatement::LocalListStatement
LocalListStatement(const LocalVarVector &variables)
Definition: ast.cpp:8010
nmodl::ast::ElectrodeCurVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ElectrodeCurVar::name (rvalue reference)
Definition: ast.cpp:1854
nmodl::ast::LineComment::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12569
nmodl::ast::Float::token
std::shared_ptr< ModToken > token
token with location information
Definition: float.hpp:49
nmodl::ast::Unit::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5568
nmodl::ast::AssignedDefinition::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable AssignedDefinition::name (rvalue reference)
Definition: ast.cpp:8784
nmodl::ast::LinEquation::set_lhs
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable LinEquation::lhs (rvalue reference)
Definition: ast.cpp:7024
nmodl::visitor::Visitor::visit_extern_var
virtual void visit_extern_var(ast::ExternVar &node)=0
visit node of type ast::ExternVar
nmodl::ast::Useion::writelist
WriteIonVarVector writelist
Variables being written.
Definition: useion.hpp:47
nmodl::ast::IndexedName::token
std::shared_ptr< ModToken > token
token with location information
Definition: indexed_name.hpp:55
nmodl::ast::RangeVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: range_var.hpp:43
nmodl::ast::StateBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2739
nmodl::ast::UnaryOperator::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6301
nmodl::visitor::ConstVisitor::visit_compartment
virtual void visit_compartment(const ast::Compartment &node)=0
visit node of type ast::Compartment
nmodl::ast::ForNetcon::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5080
nmodl::ast::Pointer::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12253
nmodl::ast::NonspecificCurVar::NonspecificCurVar
NonspecificCurVar(Name *name)
Definition: ast.cpp:1731
nmodl::ast::ProcedureBlock::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ProcedureBlock::unit (rvalue reference)
Definition: ast.cpp:4320
nmodl::ast::SolveBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4492
nmodl::ast::ParamAssign::value
std::shared_ptr< Number > value
TODO.
Definition: param_assign.hpp:43
nmodl::visitor::Visitor::visit_limits
virtual void visit_limits(ast::Limits &node)=0
visit node of type ast::Limits
nmodl::ast::FromStatement::set_increment
void set_increment(std::shared_ptr< Expression > &&increment)
Setter for member variable FromStatement::increment (rvalue reference)
Definition: ast.cpp:9385
nmodl::ast::WhileStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9488
nmodl::ast::LongitudinalDiffusionBlock::set_longitudinal_diffusion_statements
void set_longitudinal_diffusion_statements(std::shared_ptr< StatementBlock > &&longitudinal_diffusion_statements)
Setter for member variable LongitudinalDiffusionBlock::longitudinal_diffusion_statements (rvalue refe...
Definition: ast.cpp:13919
nmodl::ast::SolveBlock::block_name
std::shared_ptr< Name > block_name
Name of the block to solve.
Definition: solve_block.hpp:41
nmodl::ast::Global
Represents GLOBAL statement in NMODL.
Definition: global.hpp:39
nmodl::visitor::Visitor::visit_name
virtual void visit_name(ast::Name &node)=0
visit node of type ast::Name
nmodl::ast::DoubleUnit::value
std::shared_ptr< Double > value
TODO.
Definition: double_unit.hpp:41
nmodl::ast::Useion::set_ontology_id
void set_ontology_id(std::shared_ptr< String > &&ontology_id)
Setter for member variable Useion::ontology_id (rvalue reference)
Definition: ast.cpp:11579
nmodl::ast::ElectrodeCurVar::ElectrodeCurVar
ElectrodeCurVar(Name *name)
Definition: ast.cpp:1817
nmodl::ast::WrappedExpression::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable WrappedExpression::expression (rvalue reference)
Definition: ast.cpp:14020
nmodl::ast::Ast::is_electrode_cur_var
virtual bool is_electrode_cur_var() const noexcept
Check if the ast node is an instance of ast::ElectrodeCurVar.
Definition: ast.cpp:102
nmodl::visitor::ConstVisitor::visit_argument
virtual void visit_argument(const ast::Argument &node)=0
visit node of type ast::Argument
nmodl::ast::WatchStatement::insert_watch
WatchVector::const_iterator insert_watch(WatchVector::const_iterator position, const std::shared_ptr< Watch > &n)
Insert member to statements.
Definition: ast.cpp:10000
nmodl::ast::Ast::is_watch_statement
virtual bool is_watch_statement() const noexcept
Check if the ast node is an instance of ast::WatchStatement.
Definition: ast.cpp:240
nmodl::ast::NonLinEquation::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6834
nmodl::ast::FunctionCall::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7094
nmodl::ast::NonLinEquation::rhs
std::shared_ptr< Expression > rhs
Right-hand-side of the equation.
Definition: non_lin_equation.hpp:43
nmodl::ast::ExternVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2359
nmodl::ast::Ast::is_random_var
virtual bool is_random_var() const noexcept
Check if the ast node is an instance of ast::RandomVar.
Definition: ast.cpp:110
nmodl::ast::BeforeBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4777
nmodl::visitor::ConstVisitor::visit_watch
virtual void visit_watch(const ast::Watch &node)=0
visit node of type ast::Watch
nmodl::ast::EigenLinearSolverBlock::set_variable_block
void set_variable_block(std::shared_ptr< StatementBlock > &&variable_block)
Setter for member variable EigenLinearSolverBlock::variable_block (rvalue reference)
Definition: ast.cpp:13526
nmodl::ast::ExpressionStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9046
nmodl::ast::AfterBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4826
nmodl::ast::Range::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11777
nmodl::ast::LocalVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5776
nmodl::ast::Program::token
std::shared_ptr< ModToken > token
token with location information
Definition: program.hpp:44
nmodl::ast::ElectrodeCurrent::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11707
nmodl::visitor::ConstVisitor::visit_limits
virtual void visit_limits(const ast::Limits &node)=0
visit node of type ast::Limits
nmodl::ast::Ast::is_constant_statement
virtual bool is_constant_statement() const noexcept
Check if the ast node is an instance of ast::ConstantStatement.
Definition: ast.cpp:256
nmodl::ast::NetReceiveBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4388
nmodl::ast::Include::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8278
nmodl::ast::Ast::is_from_statement
virtual bool is_from_statement() const noexcept
Check if the ast node is an instance of ast::FromStatement.
Definition: ast.cpp:230
nmodl::ast::NumberRange::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5969
nmodl::visitor::Visitor::visit_program
virtual void visit_program(ast::Program &node)=0
visit node of type ast::Program
nmodl::ast::Verbatim::token
std::shared_ptr< ModToken > token
token with location information
Definition: verbatim.hpp:43
nmodl::ast::ConstantBlock
Represent CONSTANT block in the mod file.
Definition: constant_block.hpp:50
nmodl::ast::Useion::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:11363
nmodl::ast::BABlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: ba_block.hpp:45
nmodl::ast::SolutionExpression::solve_block
std::shared_ptr< SolveBlock > solve_block
Definition: solution_expression.hpp:41
nmodl::ast::Float::value
std::string value
Value of float.
Definition: float.hpp:47
nmodl::ast::DerivimplicitCallback::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14046
nmodl::ast::EigenNewtonSolverBlock::finalize_block
std::shared_ptr< StatementBlock > finalize_block
Statement block to be executed after calling newton solver.
Definition: eigen_newton_solver_block.hpp:53
nmodl::visitor::Visitor::visit_unit_state
virtual void visit_unit_state(ast::UnitState &node)=0
visit node of type ast::UnitState
nmodl::ast::PrimeName
Represents a prime variable (for ODE)
Definition: prime_name.hpp:48
nmodl::ast::ElectrodeCurVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1796
nmodl::ast::StatementBlock::emplace_back_statement
void emplace_back_statement(Statement *n)
Add member to statements by raw pointer.
Definition: ast.cpp:3077
nmodl::ast::Global::variables
GlobalVarVector variables
Vector of global variables.
Definition: global.hpp:42
nmodl::ast::Expression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:376
nmodl::ast::WriteIonVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1624
nmodl::ast::Ast::is_state_block
virtual bool is_state_block() const noexcept
Check if the ast node is an instance of ast::StateBlock.
Definition: ast.cpp:122
nmodl::visitor::ConstVisitor::visit_procedure_block
virtual void visit_procedure_block(const ast::ProcedureBlock &node)=0
visit node of type ast::ProcedureBlock
nmodl::ast::DerivativeBlock
Represents DERIVATIVE block in the NMODL.
Definition: derivative_block.hpp:49
nmodl::ast::Ast::get_token
virtual const ModToken * get_token() const
Return associated token for the AST node.
Definition: ast.cpp:36
nmodl::ast::UnaryOperator::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6307
nmodl::ast::RandomVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable RandomVar::name (rvalue reference)
Definition: ast.cpp:2198
nmodl::ast::DiffEqExpression::expression
std::shared_ptr< BinaryExpression > expression
Differential Expression.
Definition: diff_eq_expression.hpp:41
nmodl::ast::DoubleUnit::set_value
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable DoubleUnit::value (rvalue reference)
Definition: ast.cpp:5719
nmodl::visitor::ConstVisitor::visit_constant_statement
virtual void visit_constant_statement(const ast::ConstantStatement &node)=0
visit node of type ast::ConstantStatement
nmodl::ast::String::token
std::shared_ptr< ModToken > token
token with location information
Definition: string.hpp:57
nmodl::visitor::Visitor::visit_from_statement
virtual void visit_from_statement(ast::FromStatement &node)=0
visit node of type ast::FromStatement
nmodl::ast::VarName::at
std::shared_ptr< Integer > at
Value specified with @
Definition: var_name.hpp:48
nmodl::ast::FactorDef::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7551
nmodl::ast::Ast::is_neuron_block
virtual bool is_neuron_block() const noexcept
Check if the ast node is an instance of ast::NeuronBlock.
Definition: ast.cpp:166
nmodl::ast::Compartment::index_name
std::shared_ptr< Name > index_name
Name of the index variable in volume expression.
Definition: compartment.hpp:42
nmodl::ast::DerivativeBlock::DerivativeBlock
DerivativeBlock(Name *name, StatementBlock *statement_block)
Definition: ast.cpp:3280
nmodl::ast::Nonspecific::currents
NonspecificCurVarVector currents
Vector of non specific variables.
Definition: nonspecific.hpp:42
nmodl::visitor::ConstVisitor::visit_non_lin_equation
virtual void visit_non_lin_equation(const ast::NonLinEquation &node)=0
visit node of type ast::NonLinEquation
nmodl::ast::LinearBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3447
nmodl::ast::IndexedName::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1029
nmodl::ast::IfStatement
TODO.
Definition: if_statement.hpp:39
nmodl::ast::BeforeBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: before_block.hpp:43
nmodl::ast::Boolean
Represents a boolean variable.
Definition: boolean.hpp:42
nmodl::ast::EigenLinearSolverBlock::set_setup_x_block
void set_setup_x_block(std::shared_ptr< StatementBlock > &&setup_x_block)
Setter for member variable EigenLinearSolverBlock::setup_x_block (rvalue reference)
Definition: ast.cpp:13560
nmodl::visitor::ConstVisitor::visit_node
virtual void visit_node(const ast::Node &node)=0
visit node of type ast::Node
nmodl::ast::Limits::Limits
Limits(Number *min, Number *max)
Definition: ast.cpp:5878
nmodl::ast::UnitBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: unit_block.hpp:44
nmodl::ast::UnaryOperator::value
UnaryOp value
TODO.
Definition: unary_operator.hpp:41
nmodl::visitor::ConstVisitor::visit_nonspecific
virtual void visit_nonspecific(const ast::Nonspecific &node)=0
visit node of type ast::Nonspecific
nmodl::ast::Ast::is_watch
virtual bool is_watch() const noexcept
Check if the ast node is an instance of ast::Watch.
Definition: ast.cpp:200
nmodl::ast::ReactionStatement::reaction1
std::shared_ptr< Expression > reaction1
TODO.
Definition: reaction_statement.hpp:42
nmodl::symtab::SymbolTable
Represent symbol table for a NMODL block.
Definition: symbol_table.hpp:57
nmodl::ast::ElectrodeCurVarVector
std::vector< std::shared_ptr< ElectrodeCurVar > > ElectrodeCurVarVector
Definition: ast_decl.hpp:321
nmodl::ast::ConstantVar::value
std::shared_ptr< Number > value
Value of the constant.
Definition: constant_var.hpp:43
nmodl::ast::Compartment::set_index_name
void set_index_name(std::shared_ptr< Name > &&index_name)
Setter for member variable Compartment::index_name (rvalue reference)
Definition: ast.cpp:10377
nmodl::ast::LineComment::set_statement
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable LineComment::statement (rvalue reference)
Definition: ast.cpp:12627
nmodl::ast::RandomVarList::set_variables
void set_variables(RandomVarVector &&variables)
Setter for member variable RandomVarList::variables (rvalue reference)
Definition: ast.cpp:12094
nmodl::ast::Verbatim::set_statement
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable Verbatim::statement (rvalue reference)
Definition: ast.cpp:12543
nmodl::ast::Conserve::Conserve
Conserve(Expression *react, Expression *expr)
Definition: ast.cpp:10188
nmodl::ast::Ast::is_mutex_unlock
virtual bool is_mutex_unlock() const noexcept
Check if the ast node is an instance of ast::MutexUnlock.
Definition: ast.cpp:244
nmodl::visitor::Visitor::visit_compartment
virtual void visit_compartment(ast::Compartment &node)=0
visit node of type ast::Compartment
nmodl::ast::ReactionOperator::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6396
nmodl::visitor::ConstVisitor::visit_mutex_lock
virtual void visit_mutex_lock(const ast::MutexLock &node)=0
visit node of type ast::MutexLock
nmodl::ast::ConductanceHint::set_conductance
void set_conductance(std::shared_ptr< Name > &&conductance)
Setter for member variable ConductanceHint::conductance (rvalue reference)
Definition: ast.cpp:8991
nmodl::ast::LongitudinalDiffusionBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13883
nmodl::ast::Argument::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1315
nmodl::ast::BinaryExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6533
nmodl::ast::IndexedName::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1011
nmodl::visitor::Visitor::visit_block_comment
virtual void visit_block_comment(ast::BlockComment &node)=0
visit node of type ast::BlockComment
nmodl::ast::KineticBlock
TODO.
Definition: kinetic_block.hpp:39
nmodl::visitor::ConstVisitor::visit_derivimplicit_callback
virtual void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node)=0
visit node of type ast::DerivimplicitCallback
nmodl::visitor::Visitor::visit_suffix
virtual void visit_suffix(ast::Suffix &node)=0
visit node of type ast::Suffix
nmodl::visitor::Visitor::visit_neuron_block
virtual void visit_neuron_block(ast::NeuronBlock &node)=0
visit node of type ast::NeuronBlock
nmodl::ast::NonLinearBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable NonLinearBlock::name (rvalue reference)
Definition: ast.cpp:3626
nmodl::ast::LagStatement::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable LagStatement::name (rvalue reference)
Definition: ast.cpp:10888
nmodl::ast::ConstructorBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2909
nmodl::ast::EigenLinearSolverBlock
Represent linear solver solution block based on Eigen.
Definition: eigen_linear_solver_block.hpp:38
nmodl::ast::EigenNewtonSolverBlock::initialize_block
std::shared_ptr< StatementBlock > initialize_block
Statement block to be executed before calling newton solver.
Definition: eigen_newton_solver_block.hpp:45
nmodl::ast::CvodeBlock::set_stiff_block
void set_stiff_block(std::shared_ptr< StatementBlock > &&stiff_block)
Setter for member variable CvodeBlock::stiff_block (rvalue reference)
Definition: ast.cpp:13782
nmodl::ast::Ast::is_breakpoint_block
virtual bool is_breakpoint_block() const noexcept
Check if the ast node is an instance of ast::BreakpointBlock.
Definition: ast.cpp:150
nmodl::ast::DoubleUnit::token
std::shared_ptr< ModToken > token
token with location information
Definition: double_unit.hpp:45
nmodl::ast::IfStatement::condition
std::shared_ptr< Expression > condition
TODO.
Definition: if_statement.hpp:42
nmodl::visitor::Visitor::visit_global_var
virtual void visit_global_var(ast::GlobalVar &node)=0
visit node of type ast::GlobalVar
nmodl::ast::Ast::is_wrapped_expression
virtual bool is_wrapped_expression() const noexcept
Check if the ast node is an instance of ast::WrappedExpression.
Definition: ast.cpp:302
nmodl::ast::Ast::is_binary_expression
virtual bool is_binary_expression() const noexcept
Check if the ast node is an instance of ast::BinaryExpression.
Definition: ast.cpp:188
nmodl::ast::Ast::is_expression
virtual bool is_expression() const noexcept
Check if the ast node is an instance of ast::Expression.
Definition: ast.cpp:66
nmodl::ast::ReactionOperator::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6360
nmodl::ast::LocalVar
TODO.
Definition: local_var.hpp:38
nmodl::ast::ForNetcon::token
std::shared_ptr< ModToken > token
token with location information
Definition: for_netcon.hpp:46
nmodl::ast::NrnStateBlock::set_solve_statements
void set_solve_statements(StatementVector &&solve_statements)
Setter for member variable NrnStateBlock::solve_statements (rvalue reference)
Definition: ast.cpp:13052
nmodl::ast::Compartment::set_volume
void set_volume(std::shared_ptr< Expression > &&volume)
Setter for member variable Compartment::volume (rvalue reference)
Definition: ast.cpp:10394
nmodl::ast::Define::Define
Define(Name *name, Integer *value)
Definition: ast.cpp:8187
nmodl::ast::ElectrodeCurVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1792
nmodl::ast::InitialBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2837
nmodl::ast::LagStatement
Represents a LAG statement in the mod file.
Definition: lag_statement.hpp:47
nmodl::ast::ElectrodeCurVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1808
nmodl::ast::Compartment
Represent COMPARTMENT statement in NMODL.
Definition: compartment.hpp:39
nmodl::ast::Include::filename
std::shared_ptr< String > filename
path to the file to include
Definition: include.hpp:42
nmodl::visitor::Visitor::visit_number_range
virtual void visit_number_range(ast::NumberRange &node)=0
visit node of type ast::NumberRange
nmodl::visitor::Visitor::visit_constant_var
virtual void visit_constant_var(ast::ConstantVar &node)=0
visit node of type ast::ConstantVar
nmodl::ast::DiscreteBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3691
nmodl::ast::FunctionBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3967
nmodl::ast::Model::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8118
nmodl::ast::UpdateDt
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
nmodl::ast::FunctionBlock::parameters
ArgumentVector parameters
Vector of the parameters.
Definition: function_block.hpp:44
nmodl::ast::WrappedExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: wrapped_expression.hpp:43
nmodl::ast::LocalListStatement::variables
LocalVarVector variables
TODO.
Definition: local_list_statement.hpp:42
nmodl::visitor::Visitor::visit_param_assign
virtual void visit_param_assign(ast::ParamAssign &node)=0
visit node of type ast::ParamAssign
nmodl::ast::BinaryExpression::lhs
std::shared_ptr< Expression > lhs
LHS of the binary expression.
Definition: binary_expression.hpp:55
nmodl::visitor::ConstVisitor::visit_neuron_block
virtual void visit_neuron_block(const ast::NeuronBlock &node)=0
visit node of type ast::NeuronBlock
nmodl::ast::UnitBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5298
nmodl::visitor::ConstVisitor::visit_bbcore_pointer
virtual void visit_bbcore_pointer(const ast::BbcorePointer &node)=0
visit node of type ast::BbcorePointer
nmodl::ast::LongitudinalDiffusionBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13816
nmodl::visitor::Visitor::visit_prime_name
virtual void visit_prime_name(ast::PrimeName &node)=0
visit node of type ast::PrimeName
nmodl::ast::Ast::is_react_var_name
virtual bool is_react_var_name() const noexcept
Check if the ast node is an instance of ast::ReactVarName.
Definition: ast.cpp:94
nmodl::ast::DerivimplicitCallback::node_to_solve
std::shared_ptr< Block > node_to_solve
Block to be solved (typically derivative)
Definition: derivimplicit_callback.hpp:41
nmodl::ast::FunctionBlock::FunctionBlock
FunctionBlock(Name *name, const ArgumentVector &parameters, Unit *unit, StatementBlock *statement_block)
Definition: ast.cpp:4027
nmodl::ast::NonLinearBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: non_linear_block.hpp:59
nmodl::ast::LinEquation::LinEquation
LinEquation(Expression *lhs, Expression *rhs)
Definition: ast.cpp:6979
nmodl::ast::UnaryExpression::set_op
void set_op(UnaryOperator &&op)
Setter for member variable UnaryExpression::op (rvalue reference)
Definition: ast.cpp:6796
nmodl::visitor::ConstVisitor::visit_constructor_block
virtual void visit_constructor_block(const ast::ConstructorBlock &node)=0
visit node of type ast::ConstructorBlock
nmodl::ast::Float::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:656
nmodl::ast::Statement
TODO.
Definition: statement.hpp:38
nmodl::ast::Limits::token
std::shared_ptr< ModToken > token
token with location information
Definition: limits.hpp:45
nmodl::ast::LonDiffuse
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Definition: lon_diffuse.hpp:39
nmodl::ast::Compartment::volume
std::shared_ptr< Expression > volume
The volume of the compartment.
Definition: compartment.hpp:44
nmodl::ast::Argument::name
std::shared_ptr< Identifier > name
Name of the argument.
Definition: argument.hpp:51
nmodl::ast::NumberRange
TODO.
Definition: number_range.hpp:38
nmodl::ast::RangeVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable RangeVar::name (rvalue reference)
Definition: ast.cpp:1940
nmodl::ast::Ast::is_compartment
virtual bool is_compartment() const noexcept
Check if the ast node is an instance of ast::Compartment.
Definition: ast.cpp:248
nmodl::ast::Ast::is_factor_def
virtual bool is_factor_def() const noexcept
Check if the ast node is an instance of ast::FactorDef.
Definition: ast.cpp:206
nmodl::ast::FactorDef::value
std::shared_ptr< Double > value
TODO.
Definition: factor_def.hpp:43
nmodl::ast::RangeVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1894
nmodl::ast::Compartment::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10282
nmodl::visitor::Visitor::visit_function_table_block
virtual void visit_function_table_block(ast::FunctionTableBlock &node)=0
visit node of type ast::FunctionTableBlock
nmodl::ast::SolveBlock::SolveBlock
SolveBlock(Name *block_name, Name *method, Name *steadystate)
Definition: ast.cpp:4533
nmodl::visitor::ConstVisitor::visit_lon_diffuse
virtual void visit_lon_diffuse(const ast::LonDiffuse &node)=0
visit node of type ast::LonDiffuse
nmodl::ast::ElectrodeCurrent::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11739
nmodl::ast::AssignedBlock::reset_assigned_definition
void reset_assigned_definition(AssignedDefinitionVector::const_iterator position, AssignedDefinition *n)
Reset member to definitions.
Definition: ast.cpp:2633
nmodl::visitor::ConstVisitor::visit_solution_expression
virtual void visit_solution_expression(const ast::SolutionExpression &node)=0
visit node of type ast::SolutionExpression
nmodl::ast::StateBlock
Represents a STATE block in the NMODL.
Definition: state_block.hpp:52
nmodl::ast::BlockComment::set_statement
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable BlockComment::statement (rvalue reference)
Definition: ast.cpp:12711
nmodl::ast::DiffEqExpression::set_expression
void set_expression(std::shared_ptr< BinaryExpression > &&expression)
Setter for member variable DiffEqExpression::expression (rvalue reference)
Definition: ast.cpp:6700
nmodl::ast::Integer::set_macro
void set_macro(std::shared_ptr< Name > &&macro)
Setter for member variable Integer::macro (rvalue reference)
Definition: ast.cpp:594
nmodl::ast::ExpressionStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9081
nmodl::ast::Unit::set_name
void set_name(std::shared_ptr< String > &&name)
Setter for member variable Unit::name (rvalue reference)
Definition: ast.cpp:5614
nmodl::ast::BinaryExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: binary_expression.hpp:61
nmodl::ast::NonspecificCurVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1706
nmodl::visitor::Visitor::visit_local_list_statement
virtual void visit_local_list_statement(ast::LocalListStatement &node)=0
visit node of type ast::LocalListStatement
nmodl::ast::AssignedDefinition::start
std::shared_ptr< Number > start
TODO.
Definition: assigned_definition.hpp:49
nmodl::visitor::Visitor::visit_watch
virtual void visit_watch(ast::Watch &node)=0
visit node of type ast::Watch
nmodl::ast::NonLinearBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3535
nmodl::ast::Ast::is_reaction_operator
virtual bool is_reaction_operator() const noexcept
Check if the ast node is an instance of ast::ReactionOperator.
Definition: ast.cpp:184
nmodl::ast::ReactionStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10610
nmodl::ast::Ast::set_symbol_table
virtual void set_symbol_table(symtab::SymbolTable *symtab)
Set symbol table for the AST node.
Definition: ast.cpp:42
nmodl::ast::ElseStatement::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ElseStatement::statement_block (rvalue reference)
Definition: ast.cpp:9917
nmodl::ast::Useion::set_valence
void set_valence(std::shared_ptr< Valence > &&valence)
Setter for member variable Useion::valence (rvalue reference)
Definition: ast.cpp:11562
nmodl::ast::IfStatement::set_elseifs
void set_elseifs(ElseIfStatementVector &&elseifs)
Setter for member variable IfStatement::elseifs (rvalue reference)
Definition: ast.cpp:9698
nmodl::ast::UnaryOperator::set_value
void set_value(UnaryOp value)
Setter for member variable UnaryOperator::value.
Definition: ast.cpp:6344
nmodl::ast::Global::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11996
nmodl::ast::FactorDef::unit1
std::shared_ptr< Unit > unit1
TODO.
Definition: factor_def.hpp:45
nmodl::ast::ReadIonVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1534
nmodl::ast::Ast::is_lin_equation
virtual bool is_lin_equation() const noexcept
Check if the ast node is an instance of ast::LinEquation.
Definition: ast.cpp:196
nmodl::visitor::ConstVisitor::visit_unary_expression
virtual void visit_unary_expression(const ast::UnaryExpression &node)=0
visit node of type ast::UnaryExpression
nmodl::ast::FunctionBlock::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable FunctionBlock::unit (rvalue reference)
Definition: ast.cpp:4123
nmodl::visitor::ConstVisitor::visit_binary_expression
virtual void visit_binary_expression(const ast::BinaryExpression &node)=0
visit node of type ast::BinaryExpression
nmodl::ast::Ast::is_define
virtual bool is_define() const noexcept
Check if the ast node is an instance of ast::Define.
Definition: ast.cpp:216
nmodl::ast::WatchStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10076
nmodl::ast::Limits::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5869
nmodl::ast::Ast::is_statement_block
virtual bool is_statement_block() const noexcept
Check if the ast node is an instance of ast::StatementBlock.
Definition: ast.cpp:130
nmodl::ast::UnitState::UnitState
UnitState(UnitStateType value)
Definition: ast.cpp:7856
nmodl::ast::BinaryExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6509
nmodl::visitor::Visitor::visit_model
virtual void visit_model(ast::Model &node)=0
visit node of type ast::Model
nmodl::ast::ExpressionStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9034
nmodl::ast::Nonspecific::token
std::shared_ptr< ModToken > token
token with location information
Definition: nonspecific.hpp:44
nmodl::ast::NonspecificCurVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1722
nmodl::ast::IndexedName::length
std::shared_ptr< Expression > length
length of an array or index position
Definition: indexed_name.hpp:53
nmodl::ast::NrnStateBlock
Represents the coreneuron nrn_state callback function.
Definition: nrn_state_block.hpp:39
nmodl::ast::ElectrodeCurrent::currents
ElectrodeCurVarVector currents
Vector of electrode current variables.
Definition: electrode_current.hpp:42
nmodl::ast::Argument::Argument
Argument(Identifier *name, Unit *unit)
Definition: ast.cpp:1324
nmodl::ast::PrimeName::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:948
nmodl::ast::Ast::is_non_lin_equation
virtual bool is_non_lin_equation() const noexcept
Check if the ast node is an instance of ast::NonLinEquation.
Definition: ast.cpp:194
nmodl::ast::Ast::is_indexed_name
virtual bool is_indexed_name() const noexcept
Check if the ast node is an instance of ast::IndexedName.
Definition: ast.cpp:88
nmodl::ast::Unit::Unit
Unit(String *name)
Definition: ast.cpp:5577
nmodl::ast::StatementBlock
Represents block encapsulating list of statements.
Definition: statement_block.hpp:53
nmodl::ast::Ast::get_shared_ptr
virtual std::shared_ptr< Ast > get_shared_ptr()
get std::shared_ptr from this pointer of the AST node
Definition: ast.cpp:52
nmodl::ast::LinearBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable LinearBlock::statement_block (rvalue reference)
Definition: ast.cpp:3501
nmodl::ast::UnaryOperator::token
std::shared_ptr< ModToken > token
token with location information
Definition: unary_operator.hpp:43
nmodl::ast::SolutionExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14151
nmodl::ast::Global::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11948
nmodl::visitor::ConstVisitor::visit_float
virtual void visit_float(const ast::Float &node)=0
visit node of type ast::Float
nmodl::ast::WatchStatement::statements
WatchVector statements
Vector of watch statements.
Definition: watch_statement.hpp:42
nmodl::ast::AssignedDefinition::length
std::shared_ptr< Integer > length
Length in case of array.
Definition: assigned_definition.hpp:43
nmodl::ast::NetReceiveBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: net_receive_block.hpp:46
nmodl::ast::SolutionExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: solution_expression.hpp:45
nmodl::ast::Conserve::set_react
void set_react(std::shared_ptr< Expression > &&react)
Setter for member variable Conserve::react (rvalue reference)
Definition: ast.cpp:10233
nmodl::ast::Valence::set_type
void set_type(std::shared_ptr< Name > &&type)
Setter for member variable Valence::type (rvalue reference)
Definition: ast.cpp:7798
nmodl::visitor::Visitor::visit_range_var
virtual void visit_range_var(ast::RangeVar &node)=0
visit node of type ast::RangeVar
nmodl::ast::ConstantBlock::statements
ConstantStatementVector statements
Vector of constant statements.
Definition: constant_block.hpp:53
nmodl::ast::ExpressionVector
std::vector< std::shared_ptr< Expression > > ExpressionVector
Definition: ast_decl.hpp:303
nmodl::ast::DerivativeBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3271
nmodl::ast::Ast::is_unit_state
virtual bool is_unit_state() const noexcept
Check if the ast node is an instance of ast::UnitState.
Definition: ast.cpp:210
nmodl::visitor::ConstVisitor::visit_nonspecific_cur_var
virtual void visit_nonspecific_cur_var(const ast::NonspecificCurVar &node)=0
visit node of type ast::NonspecificCurVar
nmodl::ast::OntologyStatement
Represents CURIE information in NMODL.
Definition: ontology_statement.hpp:38
nmodl::ast::External
This construct is deprecated and no longer supported in the NMODL.
Definition: external.hpp:39
nmodl::ast::Name::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:811
nmodl::ast::ForNetcon
TODO.
Definition: for_netcon.hpp:39
nmodl::ast::Argument
Represents an argument to functions and procedures.
Definition: argument.hpp:48
nmodl::ast::ParenExpression::expression
std::shared_ptr< Expression > expression
TODO.
Definition: paren_expression.hpp:41
nmodl::ast::Include::set_filename
void set_filename(std::shared_ptr< String > &&filename)
Setter for member variable Include::filename (rvalue reference)
Definition: ast.cpp:8355
nmodl::visitor::ConstVisitor::visit_ontology_statement
virtual void visit_ontology_statement(const ast::OntologyStatement &node)=0
visit node of type ast::OntologyStatement
nmodl::ast::DerivativeBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: derivative_block.hpp:54
nmodl::ast::AssignedDefinitionVector
std::vector< std::shared_ptr< AssignedDefinition > > AssignedDefinitionVector
Definition: ast_decl.hpp:381
nmodl::ast::NonspecificCurVarVector
std::vector< std::shared_ptr< NonspecificCurVar > > NonspecificCurVarVector
Definition: ast_decl.hpp:320
nmodl::ast::FunctionCall::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionCall::name (rvalue reference)
Definition: ast.cpp:7149
nmodl::ast::NonspecificCurVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: nonspecific_cur_var.hpp:43
nmodl::ast::FromStatement::name
std::shared_ptr< Name > name
TODO.
Definition: from_statement.hpp:41
nmodl::ast::ReactionStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10703
nmodl::ast::NetReceiveBlock::NetReceiveBlock
NetReceiveBlock(const ArgumentVector &parameters, StatementBlock *statement_block)
Definition: ast.cpp:4397
nmodl::ast::NumberRange::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6026
nmodl::ast::Ast::is_include
virtual bool is_include() const noexcept
Check if the ast node is an instance of ast::Include.
Definition: ast.cpp:218
nmodl::ast::DestructorBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DestructorBlock::statement_block (rvalue reference)
Definition: ast.cpp:3051
nmodl::ast::ProcedureBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4262
nmodl::ast::UnaryExpression::expression
std::shared_ptr< Expression > expression
TODO.
Definition: unary_expression.hpp:44
nmodl::ast::SolveBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4524
nmodl::ast::Unit::name
std::shared_ptr< String > name
TODO.
Definition: unit.hpp:41
nmodl::ast::BinaryExpression::BinaryExpression
BinaryExpression(Expression *lhs, const BinaryOperator &op, Expression *rhs)
Definition: ast.cpp:6542
nmodl::ast::Boolean::token
std::shared_ptr< ModToken > token
token with location information
Definition: boolean.hpp:47
nmodl::ast::BreakpointBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4646
nmodl::ast::ReactionStatement::set_reaction2
void set_reaction2(std::shared_ptr< Expression > &&reaction2)
Setter for member variable ReactionStatement::reaction2 (rvalue reference)
Definition: ast.cpp:10753
nmodl::ast::PointerVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2050
nmodl::ast::Program::reset_node
void reset_node(NodeVector::const_iterator position, Node *n)
Reset member to blocks.
Definition: ast.cpp:12886
nmodl::ast::RangeVar::name
std::shared_ptr< Name > name
TODO.
Definition: range_var.hpp:41
nmodl::ast::StatementBlock::reset_statement
void reset_statement(StatementVector::const_iterator position, Statement *n)
Reset member to statements.
Definition: ast.cpp:3142
nmodl::ast::ReactionOperator::ReactionOperator
ReactionOperator()=default
nmodl::ast::ParenExpression
TODO.
Definition: paren_expression.hpp:38
nmodl::ast::Ast::is_param_assign
virtual bool is_param_assign() const noexcept
Check if the ast node is an instance of ast::ParamAssign.
Definition: ast.cpp:220
nmodl::ast::LinEquation::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7009
nmodl::ast::LinearBlock
Represents LINEAR block in the NMODL.
Definition: linear_block.hpp:53
nmodl::ast::UnaryExpression::UnaryExpression
UnaryExpression(const UnaryOperator &op, Expression *expression)
Definition: ast.cpp:6756
nmodl::ast::ReactVarName::token
std::shared_ptr< ModToken > token
token with location information
Definition: react_var_name.hpp:45
nmodl::ast::FunctionCall::token
std::shared_ptr< ModToken > token
token with location information
Definition: function_call.hpp:45
nmodl::ast::ConstantStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10931
nmodl::visitor::Visitor::visit_pointer_var
virtual void visit_pointer_var(ast::PointerVar &node)=0
visit node of type ast::PointerVar
nmodl::visitor::Visitor::visit_protect_statement
virtual void visit_protect_statement(ast::ProtectStatement &node)=0
visit node of type ast::ProtectStatement
nmodl::ast::ReactionOperator::token
std::shared_ptr< ModToken > token
token with location information
Definition: reaction_operator.hpp:43
nmodl::visitor::ConstVisitor::visit_define
virtual void visit_define(const ast::Define &node)=0
visit node of type ast::Define
nmodl::ast::NonLinEquation::set_rhs
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable NonLinEquation::rhs (rvalue reference)
Definition: ast.cpp:6923
nmodl::ast::Ast::is_node
virtual bool is_node() const noexcept
Check if the ast node is an instance of ast::Node.
Definition: ast.cpp:62
nmodl::ast::DerivimplicitCallback
Represent a callback to NEURON's derivimplicit solver.
Definition: derivimplicit_callback.hpp:38
nmodl::ast::ReadIonVar::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1550
nmodl::ast::BbcorePointer::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12291
nmodl::ast::WhileStatement::statement_block
std::shared_ptr< StatementBlock > statement_block
TODO.
Definition: while_statement.hpp:43
nmodl::ast::ConductanceHint::set_ion
void set_ion(std::shared_ptr< Name > &&ion)
Setter for member variable ConductanceHint::ion (rvalue reference)
Definition: ast.cpp:9008
nmodl::ast::Unit::token
std::shared_ptr< ModToken > token
token with location information
Definition: unit.hpp:43
nmodl::ast::AssignedDefinition::to
std::shared_ptr< Number > to
TODO.
Definition: assigned_definition.hpp:47
nmodl::ast::ProcedureBlock
TODO.
Definition: procedure_block.hpp:39
nmodl::ast::Ast::parent
Ast * parent
Generic pointer to the parent.
Definition: ast.hpp:92
nmodl::ast::GlobalVar::name
std::shared_ptr< Name > name
TODO.
Definition: global_var.hpp:41
nmodl::ast::FromStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9256
nmodl::visitor::ConstVisitor::visit_string
virtual void visit_string(const ast::String &node)=0
visit node of type ast::String
nmodl::ast::Ast::is_lon_diffuse
virtual bool is_lon_diffuse() const noexcept
Check if the ast node is an instance of ast::LonDiffuse.
Definition: ast.cpp:250
nmodl::ast::NonLinearBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3606
nmodl::ast::Ast::is_ba_block
virtual bool is_ba_block() const noexcept
Check if the ast node is an instance of ast::BABlock.
Definition: ast.cpp:156
nmodl::ast::EigenLinearSolverBlock::set_initialize_block
void set_initialize_block(std::shared_ptr< StatementBlock > &&initialize_block)
Setter for member variable EigenLinearSolverBlock::initialize_block (rvalue reference)
Definition: ast.cpp:13543
nmodl::ast::FunctionTableBlock::FunctionTableBlock
FunctionTableBlock(Name *name, const ArgumentVector &parameters, Unit *unit)
Definition: ast.cpp:3855
nmodl::ast::ParamAssign::limit
std::shared_ptr< Limits > limit
TODO.
Definition: param_assign.hpp:47
nmodl::ast::AssignedBlock::set_definitions
void set_definitions(AssignedDefinitionVector &&definitions)
Setter for member variable AssignedBlock::definitions (rvalue reference)
Definition: ast.cpp:2713
nmodl::ast::WatchStatement::emplace_back_watch
void emplace_back_watch(Watch *n)
Add member to statements by raw pointer.
Definition: ast.cpp:9943
nmodl::ast::BbcorePointer::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12339
nmodl::ast::FactorDef::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7602
nmodl::ast::ConstructorBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: constructor_block.hpp:56
nmodl::ast::AssignedDefinition::abstol
std::shared_ptr< Double > abstol
TODO.
Definition: assigned_definition.hpp:53
nmodl::ast::Ast::is_number_range
virtual bool is_number_range() const noexcept
Check if the ast node is an instance of ast::NumberRange.
Definition: ast.cpp:176
nmodl::ast::EigenNewtonSolverBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13096
nmodl::ast::ProtectStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9118
nmodl::ast::WriteIonVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1620
nmodl::visitor::Visitor::visit_paren_expression
virtual void visit_paren_expression(ast::ParenExpression &node)=0
visit node of type ast::ParenExpression
nmodl::ast::Ast::is_unary_expression
virtual bool is_unary_expression() const noexcept
Check if the ast node is an instance of ast::UnaryExpression.
Definition: ast.cpp:192
nmodl::ast::UnitDef::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7431
nmodl::ast::PointerVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: pointer_var.hpp:43
nmodl::ast::PrimeName::PrimeName
PrimeName()=default
nmodl::ast::Ast::is_unit_def
virtual bool is_unit_def() const noexcept
Check if the ast node is an instance of ast::UnitDef.
Definition: ast.cpp:204
nmodl::ast::ReactionStatement
TODO.
Definition: reaction_statement.hpp:39
nmodl::ast::String::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:461
nmodl::ast::ConstantStatement
Represent statement in CONSTANT block of NMODL.
Definition: constant_statement.hpp:40
nmodl::ast::PrimeName::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:884
nmodl::ast::ParamBlock::set_statements
void set_statements(ParamAssignVector &&statements)
Setter for member variable ParamBlock::statements (rvalue reference)
Definition: ast.cpp:2456
nmodl::ast::BinaryOperator
Operator used in ast::BinaryExpression.
Definition: binary_operator.hpp:38
nmodl::ast::UnitDef::UnitDef
UnitDef(Unit *unit1, Unit *unit2)
Definition: ast.cpp:7401
nmodl::ast::FunctionCall::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7072
nmodl::ast::LonDiffuse::rate
std::shared_ptr< Expression > rate
Diffusion coefficient/rate.
Definition: lon_diffuse.hpp:44
nmodl::ast::BABlockType
Type to represent different block types for before/after block.
Definition: ba_block_type.hpp:42
nmodl::ast::Define::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8178
nmodl::ast::Name::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:795
nmodl::ast::ConstantBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5432
nmodl::visitor::Visitor::visit_kinetic_block
virtual void visit_kinetic_block(ast::KineticBlock &node)=0
visit node of type ast::KineticBlock
nmodl::ast::NonLinearBlock
Represents NONLINEAR block in the NMODL.
Definition: non_linear_block.hpp:50
nmodl::ast::Useion::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11482
nmodl::ast::BlockComment::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12653
nmodl::ast::ConstantVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ConstantVar::name (rvalue reference)
Definition: ast.cpp:6182
nmodl::ast::Conserve::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10218
nmodl::ast::BABlock::type
std::shared_ptr< BABlockType > type
Type of NMODL block.
Definition: ba_block.hpp:43
nmodl::ast::FunctionTableBlock::name
std::shared_ptr< Name > name
Name of the function table block.
Definition: function_table_block.hpp:42
nmodl::ast::ConstantVar::unit
std::shared_ptr< Unit > unit
Unit for the variable.
Definition: constant_var.hpp:45
nmodl::ast::FunctionCall::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7133
nmodl::ast::DerivimplicitCallback::token
std::shared_ptr< ModToken > token
token with location information
Definition: derivimplicit_callback.hpp:43
nmodl::ast::UpdateDt::token
std::shared_ptr< ModToken > token
token with location information
Definition: update_dt.hpp:43
nmodl::ast::Expression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:370
nmodl::ast::WatchVector
std::vector< std::shared_ptr< Watch > > WatchVector
Definition: ast_decl.hpp:370
nmodl::ast::NonspecificCurVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1757
nmodl::ast::ConstructorBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2921
nmodl::ast::ConstantStatement::set_constant
void set_constant(std::shared_ptr< ConstantVar > &&constant)
Setter for member variable ConstantStatement::constant (rvalue reference)
Definition: ast.cpp:10989
nmodl::ast::FunctionBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4065
nmodl::visitor::ConstVisitor::visit_boolean
virtual void visit_boolean(const ast::Boolean &node)=0
visit node of type ast::Boolean
nmodl::visitor::ConstVisitor::visit_kinetic_block
virtual void visit_kinetic_block(const ast::KineticBlock &node)=0
visit node of type ast::KineticBlock
nmodl::ast::LagStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: lag_statement.hpp:54
nmodl::ast::ParamBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2396
nmodl::ast::SolutionExpression
Represent solution of a block in the AST.
Definition: solution_expression.hpp:38
nmodl::ast::ReactVarName::set_value
void set_value(std::shared_ptr< Integer > &&value)
Setter for member variable ReactVarName::value (rvalue reference)
Definition: ast.cpp:1493
nmodl::ast::ElectrodeCurVar
TODO.
Definition: electrode_cur_var.hpp:38
nmodl::ast::RangeVar::RangeVar
RangeVar(Name *name)
Definition: ast.cpp:1903
nmodl::ast::FunctionBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionBlock::name (rvalue reference)
Definition: ast.cpp:4089
nmodl::ast::Program::insert_node
NodeVector::const_iterator insert_node(NodeVector::const_iterator position, const std::shared_ptr< Node > &n)
Insert member to blocks.
Definition: ast.cpp:12878
nmodl::ast::UpdateDt::UpdateDt
UpdateDt(Double *value)
Definition: ast.cpp:14269
nmodl::visitor::Visitor::visit_constructor_block
virtual void visit_constructor_block(ast::ConstructorBlock &node)=0
visit node of type ast::ConstructorBlock
nmodl::ast::Ast::is_linear_block
virtual bool is_linear_block() const noexcept
Check if the ast node is an instance of ast::LinearBlock.
Definition: ast.cpp:134
nmodl::visitor::Visitor::visit_reaction_statement
virtual void visit_reaction_statement(ast::ReactionStatement &node)=0
visit node of type ast::ReactionStatement
nmodl::ast::TableStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11027
nmodl::visitor::ConstVisitor::visit_discrete_block
virtual void visit_discrete_block(const ast::DiscreteBlock &node)=0
visit node of type ast::DiscreteBlock
nmodl::ast::DerivimplicitCallback::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14058
nmodl::visitor::Visitor::visit_procedure_block
virtual void visit_procedure_block(ast::ProcedureBlock &node)=0
visit node of type ast::ProcedureBlock
nmodl::ast::SolutionExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14133
nmodl::ast::Useion::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11379
nmodl::ast::Ast::is_param_block
virtual bool is_param_block() const noexcept
Check if the ast node is an instance of ast::ParamBlock.
Definition: ast.cpp:116
nmodl::ast::DiscreteBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: discrete_block.hpp:43
nmodl::visitor::ConstVisitor::visit_reaction_operator
virtual void visit_reaction_operator(const ast::ReactionOperator &node)=0
visit node of type ast::ReactionOperator
nmodl::ast::ReactVarName::name
std::shared_ptr< VarName > name
TODO.
Definition: react_var_name.hpp:43
nmodl::ast::FromStatement::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FromStatement::name (rvalue reference)
Definition: ast.cpp:9334
nmodl::ast::Valence::set_value
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable Valence::value (rvalue reference)
Definition: ast.cpp:7815
nmodl::ast::Verbatim::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12485
nmodl::ast::ParamAssign::token
std::shared_ptr< ModToken > token
token with location information
Definition: param_assign.hpp:49
nmodl::ast::InitialBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2872
nmodl::ast::LinEquation
One equation in a system of equations tha collectively form a LINEAR block.
Definition: lin_equation.hpp:38
nmodl::ast::Double::value
std::string value
Value of double.
Definition: double.hpp:56
nmodl::ast::LineComment::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12616
nmodl::ast::WhileStatement::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable WhileStatement::statement_block (rvalue reference)
Definition: ast.cpp:9520
nmodl::visitor::Visitor::visit_unary_operator
virtual void visit_unary_operator(ast::UnaryOperator &node)=0
visit node of type ast::UnaryOperator
nmodl::ast::EigenNewtonSolverBlock::EigenNewtonSolverBlock
EigenNewtonSolverBlock(Integer *n_state_vars, StatementBlock *variable_block, StatementBlock *initialize_block, StatementBlock *setup_x_block, StatementBlock *functor_block, StatementBlock *update_states_block, StatementBlock *finalize_block)
Definition: ast.cpp:13153
nmodl::ast::Valence::type
std::shared_ptr< Name > type
TODO.
Definition: valence.hpp:41
nmodl::ast::Ast::is_prime_name
virtual bool is_prime_name() const noexcept
Check if the ast node is an instance of ast::PrimeName.
Definition: ast.cpp:86
nmodl::ast::NonLinearBlock::name
std::shared_ptr< Name > name
Name of the non-linear block.
Definition: non_linear_block.hpp:53
nmodl::visitor::Visitor::visit_unit
virtual void visit_unit(ast::Unit &node)=0
visit node of type ast::Unit
nmodl::ast::UnitDef::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7367
nmodl::visitor::Visitor::visit_ba_block_type
virtual void visit_ba_block_type(ast::BABlockType &node)=0
visit node of type ast::BABlockType
nmodl::ast::Double::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:715
nmodl::ast::ElseIfStatement::set_condition
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable ElseIfStatement::condition (rvalue reference)
Definition: ast.cpp:9816
nmodl::ast::Ast::is_solution_expression
virtual bool is_solution_expression() const noexcept
Check if the ast node is an instance of ast::SolutionExpression.
Definition: ast.cpp:306
nmodl::visitor::Visitor::visit_before_block
virtual void visit_before_block(ast::BeforeBlock &node)=0
visit node of type ast::BeforeBlock
nmodl::ast::LocalVar::LocalVar
LocalVar(Identifier *name)
Definition: ast.cpp:5785
nmodl::ast::Ast::is_limits
virtual bool is_limits() const noexcept
Check if the ast node is an instance of ast::Limits.
Definition: ast.cpp:174
nmodl::ast::Ast::is_eigen_linear_solver_block
virtual bool is_eigen_linear_solver_block() const noexcept
Check if the ast node is an instance of ast::EigenLinearSolverBlock.
Definition: ast.cpp:296
nmodl::ast::IndependentBlock
Represents a INDEPENDENT block in the NMODL.
Definition: independent_block.hpp:46
nmodl::ast::FunctionTableBlock::parameters
ArgumentVector parameters
Vector of the parameters.
Definition: function_table_block.hpp:44
nmodl::ast::Ast::is_program
virtual bool is_program() const noexcept
Check if the ast node is an instance of ast::Program.
Definition: ast.cpp:290
nmodl::visitor::ConstVisitor::visit_block_comment
virtual void visit_block_comment(const ast::BlockComment &node)=0
visit node of type ast::BlockComment
nmodl::ast::BinaryOperator::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6278
nmodl::ast::SolutionExpression::set_node_to_solve
void set_node_to_solve(std::shared_ptr< Expression > &&node_to_solve)
Setter for member variable SolutionExpression::node_to_solve (rvalue reference)
Definition: ast.cpp:14222
nmodl::visitor::Visitor::visit_double_unit
virtual void visit_double_unit(ast::DoubleUnit &node)=0
visit node of type ast::DoubleUnit
nmodl::ast::Ast::is_cvode_block
virtual bool is_cvode_block() const noexcept
Check if the ast node is an instance of ast::CvodeBlock.
Definition: ast.cpp:298
nmodl::ast::LocalVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5811
nmodl::ast::Define::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Define::name (rvalue reference)
Definition: ast.cpp:8232
nmodl::visitor::Visitor::visit_constant_statement
virtual void visit_constant_statement(ast::ConstantStatement &node)=0
visit node of type ast::ConstantStatement
nmodl::ast::ParenExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6466
nmodl::ast::Boolean::set_value
void set_value(int value)
Setter for member variable Boolean::value.
Definition: ast.cpp:781
nmodl::ast::Ast::is_independent_block
virtual bool is_independent_block() const noexcept
Check if the ast node is an instance of ast::IndependentBlock.
Definition: ast.cpp:118
nmodl::ast::UnitBlock::definitions
ExpressionVector definitions
Vector of unit statements.
Definition: unit_block.hpp:42
nmodl::ast::ConductanceHint::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8915
nmodl::ast::Float::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:626
nmodl::ast::Ast::is_solve_block
virtual bool is_solve_block() const noexcept
Check if the ast node is an instance of ast::SolveBlock.
Definition: ast.cpp:148
nmodl::ast::Watch::token
std::shared_ptr< ModToken > token
token with location information
Definition: watch.hpp:45
nmodl::ast::UnitBlock::UnitBlock
UnitBlock(const ExpressionVector &definitions)
Definition: ast.cpp:5323
nmodl::ast::Program::Program
Program()=default
nmodl::visitor::ConstVisitor::visit_unit_def
virtual void visit_unit_def(const ast::UnitDef &node)=0
visit node of type ast::UnitDef
nmodl::ast::Node::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:332
nmodl::ast::VarName::index
std::shared_ptr< Expression > index
index value in case of array
Definition: var_name.hpp:50
nmodl::ast::OntologyStatement::OntologyStatement
OntologyStatement(String *ontology_id)
Definition: ast.cpp:12758
nmodl::ast::BbcorePointer
Represents BBCOREPOINTER statement in NMODL.
Definition: bbcore_pointer.hpp:47
nmodl::ast::Compartment::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10357
nmodl::ast::ExternVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: extern_var.hpp:43
nmodl::ast::Nonspecific
Represents NONSPECIFIC_CURRENT variables statement in NMODL.
Definition: nonspecific.hpp:39
nmodl::ast::ConstantStatement::constant
std::shared_ptr< ConstantVar > constant
single constant variable
Definition: constant_statement.hpp:43
nmodl::ast::UnitDef::unit1
std::shared_ptr< Unit > unit1
TODO.
Definition: unit_def.hpp:41
nmodl::ast::Ast::is_identifier
virtual bool is_identifier() const noexcept
Check if the ast node is an instance of ast::Identifier.
Definition: ast.cpp:70
nmodl::ast::Useion::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11431
nmodl::ast::Range::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11793
nmodl::ast::External::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12377
nmodl::ast::ParamBlock::statements
ParamAssignVector statements
Vector of parameters.
Definition: param_block.hpp:56
nmodl::ast::ElectrodeCurrent::ElectrodeCurrent
ElectrodeCurrent(const ElectrodeCurVarVector &currents)
Definition: ast.cpp:11716
nmodl::ast::OntologyStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12784
nmodl::ast::UpdateDt::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14295
nmodl::ast::BreakpointBlock::BreakpointBlock
BreakpointBlock(StatementBlock *statement_block)
Definition: ast.cpp:4667
nmodl::visitor::ConstVisitor::visit_useion
virtual void visit_useion(const ast::Useion &node)=0
visit node of type ast::Useion
nmodl::ast::Ast::is_line_comment
virtual bool is_line_comment() const noexcept
Check if the ast node is an instance of ast::LineComment.
Definition: ast.cpp:284
nmodl::ast::StatementBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3210
nmodl::ast::Valence::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7744
nmodl::ast::MutexLock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10117
nmodl::ast::Include::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8300
nmodl::ast::NonLinEquation::token
std::shared_ptr< ModToken > token
token with location information
Definition: non_lin_equation.hpp:45
nmodl::visitor::Visitor::visit_linear_block
virtual void visit_linear_block(ast::LinearBlock &node)=0
visit node of type ast::LinearBlock
nmodl::ast::BinaryOperator::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6242
nmodl::ast::Name
Represents a name.
Definition: name.hpp:44
nmodl::ast::Ast::is_while_statement
virtual bool is_while_statement() const noexcept
Check if the ast node is an instance of ast::WhileStatement.
Definition: ast.cpp:232
nmodl::ast::WriteIonVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1671
nmodl::ast::DerivativeBlock::name
std::shared_ptr< Name > name
Name of the derivative block.
Definition: derivative_block.hpp:52
nmodl::ast::BeforeBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4742
nmodl::ast::Verbatim::statement
std::shared_ptr< String > statement
C code as a string.
Definition: verbatim.hpp:41
nmodl::ast::Ast::get_statement_block
virtual std::shared_ptr< StatementBlock > get_statement_block() const
Return associated statement block for the AST node.
Definition: ast.cpp:32
nmodl::ast::AssignedDefinition::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8749
nmodl::ast::LocalListStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: local_list_statement.hpp:44
nmodl::ast::NonLinearBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3563
nmodl::ast::ReadIonVar::name
std::shared_ptr< Name > name
TODO.
Definition: read_ion_var.hpp:41
nmodl::ast::Ast::is_else_statement
virtual bool is_else_statement() const noexcept
Check if the ast node is an instance of ast::ElseStatement.
Definition: ast.cpp:238
nmodl::visitor::ConstVisitor::visit_update_dt
virtual void visit_update_dt(const ast::UpdateDt &node)=0
visit node of type ast::UpdateDt
nmodl::ast::VarName::name
std::shared_ptr< Identifier > name
Name of variable.
Definition: var_name.hpp:46
nmodl::ast::SolveBlock::set_steadystate
void set_steadystate(std::shared_ptr< Name > &&steadystate)
Setter for member variable SolveBlock::steadystate (rvalue reference)
Definition: ast.cpp:4620
nmodl::ast::NetReceiveBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4427
nmodl::ast::BbcorePointerVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: bbcore_pointer_var.hpp:44
nmodl::ast::Program
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
nmodl::visitor::ConstVisitor::visit_prime_name
virtual void visit_prime_name(const ast::PrimeName &node)=0
visit node of type ast::PrimeName
nmodl::ast::Block::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:392
nmodl::ast::FactorDef::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FactorDef::name (rvalue reference)
Definition: ast.cpp:7629
nmodl::ast::UnitDef::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7392
nmodl::ast::KineticBlock::name
std::shared_ptr< Name > name
Name of the kinetic block.
Definition: kinetic_block.hpp:42
nmodl::ast::ConductanceHint::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8976
nmodl::ast::WatchStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10044
nmodl::ast::EigenLinearSolverBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: eigen_linear_solver_block.hpp:53
nmodl::visitor::Visitor::visit_update_dt
virtual void visit_update_dt(ast::UpdateDt &node)=0
visit node of type ast::UpdateDt
nmodl::ast::ProcedureBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: procedure_block.hpp:48
nmodl::ast::ConstantVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6092
nmodl::ast::Ast::is_nonspecific_cur_var
virtual bool is_nonspecific_cur_var() const noexcept
Check if the ast node is an instance of ast::NonspecificCurVar.
Definition: ast.cpp:100
nmodl::ast::InitialBlock::InitialBlock
InitialBlock(StatementBlock *statement_block)
Definition: ast.cpp:2846
nmodl::ast::Number
Base class for all numbers.
Definition: number.hpp:39
nmodl::ast::AfterBlock
Represents a AFTER block in NMODL.
Definition: after_block.hpp:51
nmodl::ast::UnitStateType
UnitStateType
enum type used for UNIT_ON or UNIT_OFF state
Definition: ast_common.hpp:86
nmodl::ast::FunctionBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: function_block.hpp:50
nmodl::visitor::Visitor::visit_longitudinal_diffusion_block
virtual void visit_longitudinal_diffusion_block(ast::LongitudinalDiffusionBlock &node)=0
visit node of type ast::LongitudinalDiffusionBlock
nmodl::ast::ReactVarName::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1478
nmodl::ast::Ast::is_derivimplicit_callback
virtual bool is_derivimplicit_callback() const noexcept
Check if the ast node is an instance of ast::DerivimplicitCallback.
Definition: ast.cpp:304
nmodl::ast::Expression
Base class for all expressions in the NMODL.
Definition: expression.hpp:43
nmodl::ast::Ast::is_before_block
virtual bool is_before_block() const noexcept
Check if the ast node is an instance of ast::BeforeBlock.
Definition: ast.cpp:152
nmodl::ast::Pointer
Represents POINTER statement in NMODL.
Definition: pointer.hpp:39
nmodl::ast::DerivativeBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DerivativeBlock::statement_block (rvalue reference)
Definition: ast.cpp:3342
nmodl::ast::NonLinearBlock::NonLinearBlock
NonLinearBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:3572
nmodl::ast::NeuronBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NeuronBlock::statement_block (rvalue reference)
Definition: ast.cpp:5528
nmodl::ast::Name::Name
Name()=default
nmodl::ast::BABlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4919
nmodl::ast::LongitudinalDiffusionBlock::compartment_statements
std::shared_ptr< StatementBlock > compartment_statements
All (required) COMPARTMENT statements in the KINETIC block.
Definition: longitudinal_diffusion_block.hpp:45
nmodl::visitor::ConstVisitor::visit_state_block
virtual void visit_state_block(const ast::StateBlock &node)=0
visit node of type ast::StateBlock
nmodl::ast::Pointer::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12221
nmodl::ast::LonDiffuse::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10475
nmodl::ast::Float::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:620
nmodl::visitor::Visitor::visit_nonspecific
virtual void visit_nonspecific(ast::Nonspecific &node)=0
visit node of type ast::Nonspecific
nmodl::ast::CvodeBlock::non_stiff_block
std::shared_ptr< StatementBlock > non_stiff_block
Block with statements of the form Dvar = f(var), used for updating non-stiff systems.
Definition: cvode_block.hpp:45
nmodl::visitor::ConstVisitor::visit_from_statement
virtual void visit_from_statement(const ast::FromStatement &node)=0
visit node of type ast::FromStatement
nmodl::ast::DiscreteBlock::DiscreteBlock
DiscreteBlock(Name *name, StatementBlock *statement_block)
Definition: ast.cpp:3718
nmodl::ast::ConstantStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10978
nmodl::ast::LinEquation::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6970
nmodl::ast::DoubleUnit::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5665
nmodl::ast::EigenLinearSolverBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13478
nmodl::ast::ElseStatement
TODO.
Definition: else_statement.hpp:38
nmodl::ast::NonLinEquation::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6891
nmodl::ast::Limits::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5851
nmodl::ast::WrappedExpression::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13962
nmodl::ast::ElseIfStatement::condition
std::shared_ptr< Expression > condition
TODO.
Definition: else_if_statement.hpp:41
nmodl::ast::RangeVar::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1882
nmodl::ast::Boolean::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:774
nmodl::ast::Range::set_variables
void set_variables(RangeVarVector &&variables)
Setter for member variable Range::variables (rvalue reference)
Definition: ast.cpp:11837
nmodl::ast::BlockComment::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12665
nmodl::ast::NetReceiveBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NetReceiveBlock::statement_block (rvalue reference)
Definition: ast.cpp:4460
nmodl::ast::NrnStateBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13008
nmodl::ast::ElectrodeCurrent
Represents ELECTRODE_CURRENT variables statement in NMODL.
Definition: electrode_current.hpp:39
nmodl::ast::NeuronBlock
Represent NEURON block in the mod file.
Definition: neuron_block.hpp:53
nmodl::ast::FromStatement::increment
std::shared_ptr< Expression > increment
TODO.
Definition: from_statement.hpp:47
nmodl::ast::Range::Range
Range(const RangeVarVector &variables)
Definition: ast.cpp:11802
nmodl::ast::BbcorePointer::set_variables
void set_variables(BbcorePointerVarVector &&variables)
Setter for member variable BbcorePointer::variables (rvalue reference)
Definition: ast.cpp:12351
nmodl::ast::Integer::macro
std::shared_ptr< Name > macro
if integer is a macro then it's name
Definition: integer.hpp:54
nmodl::ast::DestructorBlock::DestructorBlock
DestructorBlock(StatementBlock *statement_block)
Definition: ast.cpp:3014
nmodl::ast::ConstantVar::name
std::shared_ptr< Name > name
Name of the variable.
Definition: constant_var.hpp:41
nmodl::ast::LocalVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5760
nmodl::ast::DestructorBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3040
nmodl::ast::GlobalVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1964
nmodl::ast::EigenLinearSolverBlock::update_states_block
std::shared_ptr< StatementBlock > update_states_block
update back states from X
Definition: eigen_linear_solver_block.hpp:49
nmodl::ast::ConstantStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: constant_statement.hpp:45
nmodl::visitor::ConstVisitor::visit_local_list_statement
virtual void visit_local_list_statement(const ast::LocalListStatement &node)=0
visit node of type ast::LocalListStatement
nmodl::ast::KineticBlock::set_solvefor
void set_solvefor(NameVector &&solvefor)
Setter for member variable KineticBlock::solvefor (rvalue reference)
Definition: ast.cpp:5255
nmodl::ast::AssignedDefinition::AssignedDefinition
AssignedDefinition(Identifier *name, Integer *length, Number *from, Number *to, Number *start, Unit *unit, Double *abstol)
Definition: ast.cpp:8699
nmodl::ast::Suffix::name
std::shared_ptr< Name > name
Name of the channel.
Definition: suffix.hpp:43
nmodl::visitor::Visitor::visit_initial_block
virtual void visit_initial_block(ast::InitialBlock &node)=0
visit node of type ast::InitialBlock
nmodl::ast::Ast::is_electrode_current
virtual bool is_electrode_current() const noexcept
Check if the ast node is an instance of ast::ElectrodeCurrent.
Definition: ast.cpp:266
nmodl::visitor::Visitor::visit_integer
virtual void visit_integer(ast::Integer &node)=0
visit node of type ast::Integer
nmodl::visitor::ConstVisitor::visit_indexed_name
virtual void visit_indexed_name(const ast::IndexedName &node)=0
visit node of type ast::IndexedName
nmodl::ast::ParenExpression::token
std::shared_ptr< ModToken > token
token with location information
Definition: paren_expression.hpp:43
nmodl::ast::Block::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:398
nmodl::ast::EigenLinearSolverBlock::setup_x_block
std::shared_ptr< StatementBlock > setup_x_block
update X from states
Definition: eigen_linear_solver_block.hpp:47
nmodl::ast::Program::emplace_back_node
void emplace_back_node(Node *n)
Add member to blocks by raw pointer.
Definition: ast.cpp:12821
nmodl::visitor::ConstVisitor::visit_range_var
virtual void visit_range_var(const ast::RangeVar &node)=0
visit node of type ast::RangeVar
nmodl::ast::ElseStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: else_statement.hpp:43
nmodl::ast::Valence::value
std::shared_ptr< Double > value
TODO.
Definition: valence.hpp:43
nmodl::ast::BinaryOperator::set_value
void set_value(BinaryOp value)
Setter for member variable BinaryOperator::value.
Definition: ast.cpp:6285
nmodl::ast::DoubleUnit::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5704
nmodl::ast::Ast::is_binary_operator
virtual bool is_binary_operator() const noexcept
Check if the ast node is an instance of ast::BinaryOperator.
Definition: ast.cpp:180
nmodl::ast::GlobalVar::GlobalVar
GlobalVar(Name *name)
Definition: ast.cpp:1989
nmodl::ast::Ast::is_constant_block
virtual bool is_constant_block() const noexcept
Check if the ast node is an instance of ast::ConstantBlock.
Definition: ast.cpp:164
nmodl::ast::Double::Double
Double()=default
nmodl::ast::Nonspecific::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11605
nmodl::ast::LongitudinalDiffusionBlock::set_compartment_statements
void set_compartment_statements(std::shared_ptr< StatementBlock > &&compartment_statements)
Setter for member variable LongitudinalDiffusionBlock::compartment_statements (rvalue reference)
Definition: ast.cpp:13936
nmodl::ast::UnaryExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6784
nmodl::ast::NonLinearBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NonLinearBlock::statement_block (rvalue reference)
Definition: ast.cpp:3660
nmodl::visitor::Visitor::visit_thread_safe
virtual void visit_thread_safe(ast::ThreadSafe &node)=0
visit node of type ast::ThreadSafe
nmodl::ast::Ast::is_nonspecific
virtual bool is_nonspecific() const noexcept
Check if the ast node is an instance of ast::Nonspecific.
Definition: ast.cpp:264
nmodl::ast::NonLinearBlock::solvefor
NameVector solvefor
Name of the integration method.
Definition: non_linear_block.hpp:55
nmodl::ast::BinaryExpression
Represents binary expression in the NMODL.
Definition: binary_expression.hpp:52
nmodl::ast::DerivativeBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3310
nmodl::ast::NonLinEquation::lhs
std::shared_ptr< Expression > lhs
Left-hand-side of the equation.
Definition: non_lin_equation.hpp:41
nmodl::ast::ParamBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2412
nmodl::ast::ParamBlock
Represents a PARAMETER block in the NMODL.
Definition: param_block.hpp:53
nmodl::ast::WriteIonVarVector
std::vector< std::shared_ptr< WriteIonVar > > WriteIonVarVector
Definition: ast_decl.hpp:319
nmodl::visitor::Visitor::visit_random_var_list
virtual void visit_random_var_list(ast::RandomVarList &node)=0
visit node of type ast::RandomVarList
nmodl::ast::BbcorePointerVar::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2222
nmodl::ast::Pointer::set_variables
void set_variables(PointerVarVector &&variables)
Setter for member variable Pointer::variables (rvalue reference)
Definition: ast.cpp:12265
nmodl::ast::UnitState::value
UnitStateType value
TODO.
Definition: unit_state.hpp:41
nmodl::ast::ReactVarName::set_name
void set_name(std::shared_ptr< VarName > &&name)
Setter for member variable ReactVarName::name (rvalue reference)
Definition: ast.cpp:1510
nmodl::ast::Pointer::reset_pointer_var
void reset_pointer_var(PointerVarVector::const_iterator position, PointerVar *n)
Reset member to variables.
Definition: ast.cpp:12185
nmodl::ast::ConstantStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10943
nmodl::ast::NonspecificCurVar
TODO.
Definition: nonspecific_cur_var.hpp:38
nmodl::ast::Nonspecific::set_currents
void set_currents(NonspecificCurVarVector &&currents)
Setter for member variable Nonspecific::currents (rvalue reference)
Definition: ast.cpp:11665
nmodl::ast::Conserve::react
std::shared_ptr< Expression > react
TODO.
Definition: conserve.hpp:41
nmodl::visitor::Visitor::visit_function_call
virtual void visit_function_call(ast::FunctionCall &node)=0
visit node of type ast::FunctionCall
nmodl::ast::WrappedExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13974
nmodl::ast::Compartment::Compartment
Compartment(Name *index_name, Expression *volume, const NameVector &species)
Definition: ast.cpp:10323
nmodl::ast::TableStatement::from
std::shared_ptr< Expression > from
from value
Definition: table_statement.hpp:46
nmodl::ast::EigenLinearSolverBlock::n_state_vars
std::shared_ptr< Integer > n_state_vars
number of state vars used in solve
Definition: eigen_linear_solver_block.hpp:41
nmodl::ast::Program::set_blocks
void set_blocks(NodeVector &&blocks)
Setter for member variable Program::blocks (rvalue reference)
Definition: ast.cpp:12966
nmodl::ast::Useion::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Useion::name (rvalue reference)
Definition: ast.cpp:11511
nmodl::visitor::Visitor::visit_global
virtual void visit_global(ast::Global &node)=0
visit node of type ast::Global
nmodl::visitor::ConstVisitor::visit_ba_block
virtual void visit_ba_block(const ast::BABlock &node)=0
visit node of type ast::BABlock
nmodl::visitor::ConstVisitor::visit_number
virtual void visit_number(const ast::Number &node)=0
visit node of type ast::Number
nmodl::ast::Ast::is_after_block
virtual bool is_after_block() const noexcept
Check if the ast node is an instance of ast::AfterBlock.
Definition: ast.cpp:154
nmodl::ast::InitialBlock::set_statement_block
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable InitialBlock::statement_block (rvalue reference)
Definition: ast.cpp:2883
nmodl::ast::ConstantBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5400
nmodl::ast::Program::blocks
NodeVector blocks
Vector of top level blocks in the mod file.
Definition: program.hpp:42
nmodl::ast::Global::set_variables
void set_variables(GlobalVarVector &&variables)
Setter for member variable Global::variables (rvalue reference)
Definition: ast.cpp:12008
nmodl::ast::BlockComment::token
std::shared_ptr< ModToken > token
token with location information
Definition: block_comment.hpp:43
nmodl::ast::FunctionTableBlock::set_parameters
void set_parameters(ArgumentVector &&parameters)
Setter for member variable FunctionTableBlock::parameters (rvalue reference)
Definition: ast.cpp:3926
nmodl::ast::PointerVar::PointerVar
PointerVar(Name *name)
Definition: ast.cpp:2075
nmodl::ast::NetReceiveBlock::statement_block
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: net_receive_block.hpp:44
nmodl::ast::Define::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8217
nmodl::ast::BbcorePointerVar::name
std::shared_ptr< Name > name
Variable name.
Definition: bbcore_pointer_var.hpp:42
nmodl::ast::Model::set_title
void set_title(std::shared_ptr< String > &&title)
Setter for member variable Model::title (rvalue reference)
Definition: ast.cpp:8129
nmodl::ast::GlobalVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable GlobalVar::name (rvalue reference)
Definition: ast.cpp:2026
nmodl::ast::ReactionStatement::set_reaction1
void set_reaction1(std::shared_ptr< Expression > &&reaction1)
Setter for member variable ReactionStatement::reaction1 (rvalue reference)
Definition: ast.cpp:10727
nmodl::ast::Global::emplace_back_global_var
void emplace_back_global_var(GlobalVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:11863
nmodl::ast::ReactVarName::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1413
nmodl::ast::Valence::Valence
Valence(Name *type, Double *value)
Definition: ast.cpp:7753
nmodl::ast::BbcorePointerVar::BbcorePointerVar
BbcorePointerVar(Name *name)
Definition: ast.cpp:2247
nmodl::ast::Ast::is_for_netcon
virtual bool is_for_netcon() const noexcept
Check if the ast node is an instance of ast::ForNetcon.
Definition: ast.cpp:158
nmodl::ast::BlockComment::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12700
nmodl::ast::WatchStatement::erase_watch
WatchVector::const_iterator erase_watch(WatchVector::const_iterator first)
Erase member to statements.
Definition: ast.cpp:9962
nmodl::ast::DiscreteBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3748
nmodl::ast::Ast::is_float
virtual bool is_float() const noexcept
Check if the ast node is an instance of ast::Float.
Definition: ast.cpp:78
nmodl::ast::ExternVarVector
std::vector< std::shared_ptr< ExternVar > > ExternVarVector
Definition: ast_decl.hpp:327
nmodl::ast::Nonspecific::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11621
nmodl::ast::ParamAssign::ParamAssign
ParamAssign(Identifier *name, Number *value, Unit *unit, Limits *limit)
Definition: ast.cpp:8460
nmodl::ast::DestructorBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2993
nmodl::ast::Suffix::set_type
void set_type(std::shared_ptr< Name > &&type)
Setter for member variable Suffix::type (rvalue reference)
Definition: ast.cpp:11322
nmodl::ast::ConstantVar::set_value
void set_value(std::shared_ptr< Number > &&value)
Setter for member variable ConstantVar::value (rvalue reference)
Definition: ast.cpp:6199
nmodl::ast::IndexedName::IndexedName
IndexedName(Identifier *name, Expression *length)
Definition: ast.cpp:1038
nmodl::visitor::ConstVisitor::visit_wrapped_expression
virtual void visit_wrapped_expression(const ast::WrappedExpression &node)=0
visit node of type ast::WrappedExpression
nmodl::ast::WhileStatement::WhileStatement
WhileStatement(Expression *condition, StatementBlock *statement_block)
Definition: ast.cpp:9458
nmodl::visitor::ConstVisitor::visit_else_statement
virtual void visit_else_statement(const ast::ElseStatement &node)=0
visit node of type ast::ElseStatement
nmodl::ast::String::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:467
nmodl::ast::DiffEqExpression::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6654
nmodl::ast::ReactionStatement::set_expression1
void set_expression1(std::shared_ptr< Expression > &&expression1)
Setter for member variable ReactionStatement::expression1 (rvalue reference)
Definition: ast.cpp:10770
nmodl::ast::FunctionTableBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3889
nmodl::ast::FromStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: from_statement.hpp:51
nmodl::ast::Name::value
std::shared_ptr< String > value
Value of name.
Definition: name.hpp:47
nmodl::ModToken
Represent token returned by scanner.
Definition: modtoken.hpp:50
nmodl::ast::FactorDef::set_value
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable FactorDef::value (rvalue reference)
Definition: ast.cpp:7646
nmodl::ast::BreakpointBlock::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4693
nmodl::ast::Ast::is_derivative_block
virtual bool is_derivative_block() const noexcept
Check if the ast node is an instance of ast::DerivativeBlock.
Definition: ast.cpp:132
nmodl::ast::Ast::is_boolean
virtual bool is_boolean() const noexcept
Check if the ast node is an instance of ast::Boolean.
Definition: ast.cpp:82
nmodl::ast::LineComment::statement
std::shared_ptr< String > statement
comment text
Definition: line_comment.hpp:41
nmodl::ast::Ast::get_parent
virtual Ast * get_parent() const
Parent getter.
Definition: ast.cpp:311
nmodl::ast::AssignedBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: assigned_block.hpp:59
nmodl::ast::ProcedureBlock::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:4164
nmodl::ast::Global::insert_global_var
GlobalVarVector::const_iterator insert_global_var(GlobalVarVector::const_iterator position, const std::shared_ptr< GlobalVar > &n)
Insert member to variables.
Definition: ast.cpp:11920
nmodl::ast::Ast::is_unary_operator
virtual bool is_unary_operator() const noexcept
Check if the ast node is an instance of ast::UnaryOperator.
Definition: ast.cpp:182
nmodl::ast::Ast::get_node_name
virtual std::string get_node_name() const
Return name of of the node.
Definition: ast.cpp:28
nmodl::ast::PrimeName::set_order
void set_order(std::shared_ptr< Integer > &&order)
Setter for member variable PrimeName::order (rvalue reference)
Definition: ast.cpp:980
nmodl::ast::Ast::is_range_var
virtual bool is_range_var() const noexcept
Check if the ast node is an instance of ast::RangeVar.
Definition: ast.cpp:104
nmodl::ast::AssignedBlock::definitions
AssignedDefinitionVector definitions
Vector of assigned variables.
Definition: assigned_block.hpp:57
nmodl::ast::ForNetcon::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5019
nmodl::ast::Model::Model
Model(String *title)
Definition: ast.cpp:8092
nmodl::ast::ReactionStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10654
nmodl::visitor::Visitor::visit_range
virtual void visit_range(ast::Range &node)=0
visit node of type ast::Range
nmodl::ast::Name::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:849
nmodl::ast::String
Represents a string.
Definition: string.hpp:52
nmodl::ast::Limits
TODO.
Definition: limits.hpp:38
nmodl::ast::LagStatement::set_byname
void set_byname(std::shared_ptr< Name > &&byname)
Setter for member variable LagStatement::byname (rvalue reference)
Definition: ast.cpp:10905
nmodl::ast::LocalVar::set_name
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable LocalVar::name (rvalue reference)
Definition: ast.cpp:5822
nmodl::visitor::ConstVisitor::visit_if_statement
virtual void visit_if_statement(const ast::IfStatement &node)=0
visit node of type ast::IfStatement
nmodl::ast::PointerVar::name
std::shared_ptr< Name > name
TODO.
Definition: pointer_var.hpp:41
nmodl::ast::ReactVarName::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1417
nmodl::ast::BABlockType::token
std::shared_ptr< ModToken > token
token with location information
Definition: ba_block_type.hpp:47
all.hpp
Auto generated AST classes declaration.
nmodl::ast::WrappedExpression
Wrap any other expression type.
Definition: wrapped_expression.hpp:38
nmodl::visitor::ConstVisitor::visit_longitudinal_diffusion_block
virtual void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node)=0
visit node of type ast::LongitudinalDiffusionBlock
nmodl::ast::ParamAssign::set_unit
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ParamAssign::unit (rvalue reference)
Definition: ast.cpp:8555
nmodl::ast::ElseIfStatement::ElseIfStatement
ElseIfStatement(Expression *condition, StatementBlock *statement_block)
Definition: ast.cpp:9771
nmodl::visitor::Visitor::visit_lon_diffuse
virtual void visit_lon_diffuse(ast::LonDiffuse &node)=0
visit node of type ast::LonDiffuse
nmodl::ast::Limits::set_min
void set_min(std::shared_ptr< Number > &&min)
Setter for member variable Limits::min (rvalue reference)
Definition: ast.cpp:5923
nmodl::visitor::ConstVisitor::visit_nrn_state_block
virtual void visit_nrn_state_block(const ast::NrnStateBlock &node)=0
visit node of type ast::NrnStateBlock
nmodl::ast::BbcorePointerVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2273
nmodl::ast::Argument::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1293
nmodl::visitor::ConstVisitor::visit_extern_var
virtual void visit_extern_var(const ast::ExternVar &node)=0
visit node of type ast::ExternVar
nmodl::ast::Ast::is_useion
virtual bool is_useion() const noexcept
Check if the ast node is an instance of ast::Useion.
Definition: ast.cpp:262
nmodl::ast::VarName::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1124
nmodl::ast::ExpressionStatement::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ExpressionStatement::expression (rvalue reference)
Definition: ast.cpp:9092
nmodl::ast::IndependentBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: independent_block.hpp:51
nmodl::ast::FromStatement::set_from
void set_from(std::shared_ptr< Expression > &&from)
Setter for member variable FromStatement::from (rvalue reference)
Definition: ast.cpp:9351
nmodl::ast::KineticBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5175
nmodl::ast::FromStatement
TODO.
Definition: from_statement.hpp:38
nmodl::ast::DiffEqExpression::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6689
nmodl::ast::IndexedName::set_length
void set_length(std::shared_ptr< Expression > &&length)
Setter for member variable IndexedName::length (rvalue reference)
Definition: ast.cpp:1100
nmodl::ast::ParamBlock::token
std::shared_ptr< ModToken > token
token with location information
Definition: param_block.hpp:58
nmodl::ast::FactorDef::name
std::shared_ptr< Name > name
TODO.
Definition: factor_def.hpp:41
nmodl::visitor::ConstVisitor::visit_constant_var
virtual void visit_constant_var(const ast::ConstantVar &node)=0
visit node of type ast::ConstantVar
nmodl::ast::DerivativeBlock::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable DerivativeBlock::name (rvalue reference)
Definition: ast.cpp:3325
nmodl::visitor::Visitor::visit_external
virtual void visit_external(ast::External &node)=0
visit node of type ast::External
nmodl::ast::Suffix::Suffix
Suffix(Name *type, Name *name)
Definition: ast.cpp:11277
nmodl::ast::Define::token
std::shared_ptr< ModToken > token
token with location information
Definition: define.hpp:45
nmodl::ast::WriteIonVar::WriteIonVar
WriteIonVar(Name *name)
Definition: ast.cpp:1645
nmodl::ast::IfStatement::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9640
nmodl::ast::NetReceiveBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4366
nmodl::ast::ReactionStatement::token
std::shared_ptr< ModToken > token
token with location information
Definition: reaction_statement.hpp:52
nmodl::ast::ExpressionStatement::ExpressionStatement
ExpressionStatement(Expression *expression)
Definition: ast.cpp:9055
nmodl::ast::Integer::set_value
void set_value(int value)
Setter for member variable Integer::value.
Definition: ast.cpp:587
nmodl::ast::Ast::is_read_ion_var
virtual bool is_read_ion_var() const noexcept
Check if the ast node is an instance of ast::ReadIonVar.
Definition: ast.cpp:96
nmodl::ast::FactorDef::set_unit1
void set_unit1(std::shared_ptr< Unit > &&unit1)
Setter for member variable FactorDef::unit1 (rvalue reference)
Definition: ast.cpp:7663
nmodl::ast::BbcorePointer::BbcorePointer
BbcorePointer(const BbcorePointerVarVector &variables)
Definition: ast.cpp:12316
nmodl::ast::FromStatement::get_node_name
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:9200
nmodl::ast::InitialBlock::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2825
nmodl::ast::ReactionOperator::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6366
nmodl::visitor::Visitor::visit_lin_equation
virtual void visit_lin_equation(ast::LinEquation &node)=0
visit node of type ast::LinEquation
nmodl::ast::ProtectStatement::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9130
nmodl::ast::Argument::token
std::shared_ptr< ModToken > token
token with location information
Definition: argument.hpp:55
nmodl::ast::Limits::set_max
void set_max(std::shared_ptr< Number > &&max)
Setter for member variable Limits::max (rvalue reference)
Definition: ast.cpp:5940
nmodl::ast::NumberRange::set_max
void set_max(std::shared_ptr< Number > &&max)
Setter for member variable NumberRange::max (rvalue reference)
Definition: ast.cpp:6058
nmodl::ast::WriteIonVar::token
std::shared_ptr< ModToken > token
token with location information
Definition: write_ion_var.hpp:43
nmodl::ast::Number::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:442
nmodl::ast::OntologyStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12737
nmodl::ast::UpdateDt::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14248
nmodl::visitor::Visitor::visit_var_name
virtual void visit_var_name(ast::VarName &node)=0
visit node of type ast::VarName
nmodl::ast::WhileStatement::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9431
nmodl::ast::LagStatement::byname
std::shared_ptr< Name > byname
Name of the variable (TODO)
Definition: lag_statement.hpp:52
nmodl::ast::Verbatim::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12497
nmodl::ast::PointerVar::set_name
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable PointerVar::name (rvalue reference)
Definition: ast.cpp:2112
nmodl::ast::FunctionBlock::set_parameters
void set_parameters(ArgumentVector &&parameters)
Setter for member variable FunctionBlock::parameters (rvalue reference)
Definition: ast.cpp:4106
nmodl::ast::Ast::is_constructor_block
virtual bool is_constructor_block() const noexcept
Check if the ast node is an instance of ast::ConstructorBlock.
Definition: ast.cpp:126
nmodl::ast::WatchStatement::reset_watch
void reset_watch(WatchVector::const_iterator position, Watch *n)
Reset member to statements.
Definition: ast.cpp:10008
nmodl::visitor::ConstVisitor::visit_cvode_block
virtual void visit_cvode_block(const ast::CvodeBlock &node)=0
visit node of type ast::CvodeBlock
nmodl::ast::ParenExpression::set_expression
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ParenExpression::expression (rvalue reference)
Definition: ast.cpp:6477
nmodl::ast::DiscreteBlock::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3709
nmodl::ast::GlobalVar::set_parent_in_children
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2015
nmodl::ast::Compartment::set_species
void set_species(NameVector &&species)
Setter for member variable Compartment::species (rvalue reference)
Definition: ast.cpp:10411