NEURON
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_matexp_block () const noexcept { return false; }
299 
300 bool Ast::is_cvode_block () const noexcept { return false; }
301 
302 bool Ast::is_longitudinal_diffusion_block () const noexcept { return false; }
303 
304 bool Ast::is_wrapped_expression () const noexcept { return false; }
305 
306 bool Ast::is_derivimplicit_callback () const noexcept { return false; }
307 
308 bool Ast::is_solution_expression () const noexcept { return false; }
309 
310 bool Ast::is_update_dt () const noexcept { return false; }
311 
312 
314  return parent;
315 }
316 
318  parent = p;
319 }
320 
321 
322 
323  ///
324  /// Node member functions definition
325  ///
326 
327 
329  }
330 
332  }
333 
335  v.visit_node(*this);
336  }
337 
339  v.visit_node(*this);
340  }
341 
342 
343 
344 
345  ///
346  /// Statement member functions definition
347  ///
348 
349 
351  }
352 
354  }
355 
357  v.visit_statement(*this);
358  }
359 
361  v.visit_statement(*this);
362  }
363 
364 
365 
366 
367  ///
368  /// Expression member functions definition
369  ///
370 
371 
373  }
374 
376  }
377 
379  v.visit_expression(*this);
380  }
381 
383  v.visit_expression(*this);
384  }
385 
386 
387 
388 
389  ///
390  /// Block member functions definition
391  ///
392 
393 
395  }
396 
398  }
399 
401  v.visit_block(*this);
402  }
403 
405  v.visit_block(*this);
406  }
407 
408 
409 
410 
411  ///
412  /// Identifier member functions definition
413  ///
414 
415 
417  }
418 
420  }
421 
423  v.visit_identifier(*this);
424  }
425 
427  v.visit_identifier(*this);
428  }
429 
430 
431 
432 
433  ///
434  /// Number member functions definition
435  ///
436 
437 
439  }
440 
442  }
443 
445  v.visit_number(*this);
446  }
447 
449  v.visit_number(*this);
450  }
451 
452 
453 
454 
455  ///
456  /// String member functions definition
457  ///
458 
459 
460 
461 
462 
464  }
465 
467  }
468 
470  v.visit_string(*this);
471  }
472 
474  v.visit_string(*this);
475  }
476 
477 
478  String::String(const std::string& value)
480 
481 
482 
483  /// copy constructor implementation
484  String::String(const String& obj) {
485  /// object member can be just copied by value
486  this->value = obj.value;
487 
488  /// if there is a token, make copy
489  if (obj.token) {
490  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
491  }
492 
493  /// set parents
495  }
496 
497 
498  /// set this parent in the children
500 
501 
502  }
503 
504 
505 
506  void String::set_value(std::string value) {
507  // why don't we use a coding convention instead of this workaround for
508  // variable shadowing?
509  this->value = value;
510  }
511 
512 
513 
514  ///
515  /// Integer member functions definition
516  ///
517 
518 
519 
520 
521 
522 
523 
524 
526  /// optional member could be nullptr
527  if (this->macro) {
528  this->macro->accept(v);
529  }
530  (void)v;
531  }
532 
534  /// optional member could be nullptr
535  if (this->macro) {
536  this->macro->accept(v);
537  }
538  (void)v;
539  }
540 
542  v.visit_integer(*this);
543  }
544 
546  v.visit_integer(*this);
547  }
548 
549 
551  : value(value), macro(macro) { set_parent_in_children(); }
552 
553 
554  Integer::Integer(int value, std::shared_ptr<Name> macro)
555  : value(value), macro(macro) { set_parent_in_children(); }
556 
557 
558  /// copy constructor implementation
559  Integer::Integer(const Integer& obj) {
560  /// object member can be just copied by value
561  this->value = obj.value;
562  /// pointer member must be reseted with the new copy
563  if (obj.macro) {
564  this->macro.reset(obj.macro->clone());
565  }
566 
567  /// if there is a token, make copy
568  if (obj.token) {
569  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
570  }
571 
572  /// set parents
574  }
575 
576 
577  /// set this parent in the children
579 
580  /// optional member could be nullptr
581  if (macro) {
582  macro->set_parent(this);
583  }
584 
585  }
586 
587 
588 
590  // why don't we use a coding convention instead of this workaround for
591  // variable shadowing?
592  this->value = value;
593  }
594 
595 
596  void Integer::set_macro(std::shared_ptr<Name>&& macro) {
597  this->macro = macro;
598  // set parents
599  if (macro) {
600  macro->set_parent(this);
601  }
602  }
603 
604  void Integer::set_macro(const std::shared_ptr<Name>& macro) {
605  this->macro = macro;
606  // set parents
607  if (macro) {
608  macro->set_parent(this);
609  }
610  }
611 
612 
613 
614  ///
615  /// Float member functions definition
616  ///
617 
618 
619 
620 
621 
623  }
624 
626  }
627 
629  v.visit_float(*this);
630  }
631 
633  v.visit_float(*this);
634  }
635 
636 
637  Float::Float(const std::string& value)
639 
640 
641 
642  /// copy constructor implementation
643  Float::Float(const Float& obj) {
644  /// object member can be just copied by value
645  this->value = obj.value;
646 
647  /// if there is a token, make copy
648  if (obj.token) {
649  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
650  }
651 
652  /// set parents
654  }
655 
656 
657  /// set this parent in the children
659 
660 
661  }
662 
663 
664 
665  void Float::set_value(std::string value) {
666  // why don't we use a coding convention instead of this workaround for
667  // variable shadowing?
668  this->value = value;
669  }
670 
671 
672 
673  ///
674  /// Double member functions definition
675  ///
676 
677 
678 
679 
680 
682  }
683 
685  }
686 
688  v.visit_double(*this);
689  }
690 
692  v.visit_double(*this);
693  }
694 
695 
696  Double::Double(const std::string& value)
698 
699 
700 
701  /// copy constructor implementation
702  Double::Double(const Double& obj) {
703  /// object member can be just copied by value
704  this->value = obj.value;
705 
706  /// if there is a token, make copy
707  if (obj.token) {
708  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
709  }
710 
711  /// set parents
713  }
714 
715 
716  /// set this parent in the children
718 
719 
720  }
721 
722 
723 
724  void Double::set_value(std::string value) {
725  // why don't we use a coding convention instead of this workaround for
726  // variable shadowing?
727  this->value = value;
728  }
729 
730 
731 
732  ///
733  /// Boolean member functions definition
734  ///
735 
736 
737 
738 
739 
741  }
742 
744  }
745 
747  v.visit_boolean(*this);
748  }
749 
751  v.visit_boolean(*this);
752  }
753 
754 
757 
758 
759 
760  /// copy constructor implementation
761  Boolean::Boolean(const Boolean& obj) {
762  /// object member can be just copied by value
763  this->value = obj.value;
764 
765  /// if there is a token, make copy
766  if (obj.token) {
767  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
768  }
769 
770  /// set parents
772  }
773 
774 
775  /// set this parent in the children
777 
778 
779  }
780 
781 
782 
784  // why don't we use a coding convention instead of this workaround for
785  // variable shadowing?
786  this->value = value;
787  }
788 
789 
790 
791  ///
792  /// Name member functions definition
793  ///
794 
795 
796 
797  std::string Name::get_node_name() const {
798  return value->eval();
799  }
800 
802  /// use -> for pointer member
803  value->accept(v);
804  (void)v;
805  }
806 
808  /// use -> for pointer member
809  value->accept(v);
810  (void)v;
811  }
812 
814  v.visit_name(*this);
815  }
816 
818  v.visit_name(*this);
819  }
820 
821 
824 
825 
826  Name::Name(std::shared_ptr<String> value)
828 
829 
830  /// copy constructor implementation
831  Name::Name(const Name& obj) {
832  /// pointer member must be reseted with the new copy
833  if (obj.value) {
834  this->value.reset(obj.value->clone());
835  }
836 
837  /// if there is a token, make copy
838  if (obj.token) {
839  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
840  }
841 
842  /// set parents
844  }
845 
846  void Name::set_name(const std::string& name) {
847  value->set(name);
848  }
849 
850  /// set this parent in the children
852 
853  /// optional member could be nullptr
854  if (value) {
855  value->set_parent(this);
856  }
857 
858  }
859 
860 
861 
862  void Name::set_value(std::shared_ptr<String>&& value) {
863  this->value = value;
864  // set parents
865  if (value) {
866  value->set_parent(this);
867  }
868  }
869 
870  void Name::set_value(const std::shared_ptr<String>& value) {
871  this->value = value;
872  // set parents
873  if (value) {
874  value->set_parent(this);
875  }
876  }
877 
878 
879 
880  ///
881  /// PrimeName member functions definition
882  ///
883 
884 
885 
886  std::string PrimeName::get_node_name() const {
887  return value->eval();
888  }
889 
890 
891 
892 
894  /// use -> for pointer member
895  value->accept(v);
896  (void)v;
897  /// use -> for pointer member
898  order->accept(v);
899  (void)v;
900  }
901 
903  /// use -> for pointer member
904  value->accept(v);
905  (void)v;
906  /// use -> for pointer member
907  order->accept(v);
908  (void)v;
909  }
910 
912  v.visit_prime_name(*this);
913  }
914 
916  v.visit_prime_name(*this);
917  }
918 
919 
922 
923 
924  PrimeName::PrimeName(std::shared_ptr<String> value, std::shared_ptr<Integer> order)
926 
927 
928  /// copy constructor implementation
930  /// pointer member must be reseted with the new copy
931  if (obj.value) {
932  this->value.reset(obj.value->clone());
933  }
934  /// pointer member must be reseted with the new copy
935  if (obj.order) {
936  this->order.reset(obj.order->clone());
937  }
938 
939  /// if there is a token, make copy
940  if (obj.token) {
941  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
942  }
943 
944  /// set parents
946  }
947 
948 
949  /// set this parent in the children
951 
952  /// optional member could be nullptr
953  if (value) {
954  value->set_parent(this);
955  }
956  /// optional member could be nullptr
957  if (order) {
958  order->set_parent(this);
959  }
960 
961  }
962 
963 
964 
965  void PrimeName::set_value(std::shared_ptr<String>&& value) {
966  this->value = value;
967  // set parents
968  if (value) {
969  value->set_parent(this);
970  }
971  }
972 
973  void PrimeName::set_value(const std::shared_ptr<String>& value) {
974  this->value = value;
975  // set parents
976  if (value) {
977  value->set_parent(this);
978  }
979  }
980 
981 
982  void PrimeName::set_order(std::shared_ptr<Integer>&& order) {
983  this->order = order;
984  // set parents
985  if (order) {
986  order->set_parent(this);
987  }
988  }
989 
990  void PrimeName::set_order(const std::shared_ptr<Integer>& order) {
991  this->order = order;
992  // set parents
993  if (order) {
994  order->set_parent(this);
995  }
996  }
997 
998 
999 
1000  ///
1001  /// IndexedName member functions definition
1002  ///
1003 
1004 
1005 
1006  std::string IndexedName::get_node_name() const {
1007  return name->get_node_name();
1008  }
1009 
1010 
1011 
1012 
1014  /// use -> for pointer member
1015  name->accept(v);
1016  (void)v;
1017  /// use -> for pointer member
1018  length->accept(v);
1019  (void)v;
1020  }
1021 
1023  /// use -> for pointer member
1024  name->accept(v);
1025  (void)v;
1026  /// use -> for pointer member
1027  length->accept(v);
1028  (void)v;
1029  }
1030 
1032  v.visit_indexed_name(*this);
1033  }
1034 
1036  v.visit_indexed_name(*this);
1037  }
1038 
1039 
1041  : name(name), length(length) { set_parent_in_children(); }
1042 
1043 
1044  IndexedName::IndexedName(std::shared_ptr<Identifier> name, std::shared_ptr<Expression> length)
1045  : name(name), length(length) { set_parent_in_children(); }
1046 
1047 
1048  /// copy constructor implementation
1050  /// pointer member must be reseted with the new copy
1051  if (obj.name) {
1052  this->name.reset(obj.name->clone());
1053  }
1054  /// pointer member must be reseted with the new copy
1055  if (obj.length) {
1056  this->length.reset(obj.length->clone());
1057  }
1058 
1059  /// if there is a token, make copy
1060  if (obj.token) {
1061  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1062  }
1063 
1064  /// set parents
1066  }
1067 
1068 
1069  /// set this parent in the children
1071 
1072  /// optional member could be nullptr
1073  if (name) {
1074  name->set_parent(this);
1075  }
1076  /// optional member could be nullptr
1077  if (length) {
1078  length->set_parent(this);
1079  }
1080 
1081  }
1082 
1083 
1084 
1085  void IndexedName::set_name(std::shared_ptr<Identifier>&& name) {
1086  this->name = name;
1087  // set parents
1088  if (name) {
1089  name->set_parent(this);
1090  }
1091  }
1092 
1093  void IndexedName::set_name(const std::shared_ptr<Identifier>& name) {
1094  this->name = name;
1095  // set parents
1096  if (name) {
1097  name->set_parent(this);
1098  }
1099  }
1100 
1101 
1102  void IndexedName::set_length(std::shared_ptr<Expression>&& length) {
1103  this->length = length;
1104  // set parents
1105  if (length) {
1106  length->set_parent(this);
1107  }
1108  }
1109 
1110  void IndexedName::set_length(const std::shared_ptr<Expression>& length) {
1111  this->length = length;
1112  // set parents
1113  if (length) {
1114  length->set_parent(this);
1115  }
1116  }
1117 
1118 
1119 
1120  ///
1121  /// VarName member functions definition
1122  ///
1123 
1124 
1125 
1126  std::string VarName::get_node_name() const {
1127  return name->get_node_name();
1128  }
1129 
1130 
1131 
1132 
1133 
1134 
1135 
1137  /// use -> for pointer member
1138  name->accept(v);
1139  (void)v;
1140  /// optional member could be nullptr
1141  if (this->at) {
1142  this->at->accept(v);
1143  }
1144  (void)v;
1145  /// optional member could be nullptr
1146  if (this->index) {
1147  this->index->accept(v);
1148  }
1149  (void)v;
1150  }
1151 
1153  /// use -> for pointer member
1154  name->accept(v);
1155  (void)v;
1156  /// optional member could be nullptr
1157  if (this->at) {
1158  this->at->accept(v);
1159  }
1160  (void)v;
1161  /// optional member could be nullptr
1162  if (this->index) {
1163  this->index->accept(v);
1164  }
1165  (void)v;
1166  }
1167 
1169  v.visit_var_name(*this);
1170  }
1171 
1173  v.visit_var_name(*this);
1174  }
1175 
1176 
1178  : name(name), at(at), index(index) { set_parent_in_children(); }
1179 
1180 
1181  VarName::VarName(std::shared_ptr<Identifier> name, std::shared_ptr<Integer> at, std::shared_ptr<Expression> index)
1182  : name(name), at(at), index(index) { set_parent_in_children(); }
1183 
1184 
1185  /// copy constructor implementation
1187  /// pointer member must be reseted with the new copy
1188  if (obj.name) {
1189  this->name.reset(obj.name->clone());
1190  }
1191  /// pointer member must be reseted with the new copy
1192  if (obj.at) {
1193  this->at.reset(obj.at->clone());
1194  }
1195  /// pointer member must be reseted with the new copy
1196  if (obj.index) {
1197  this->index.reset(obj.index->clone());
1198  }
1199 
1200  /// if there is a token, make copy
1201  if (obj.token) {
1202  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1203  }
1204 
1205  /// set parents
1207  }
1208 
1209 
1210  /// set this parent in the children
1212 
1213  /// optional member could be nullptr
1214  if (name) {
1215  name->set_parent(this);
1216  }
1217  /// optional member could be nullptr
1218  if (at) {
1219  at->set_parent(this);
1220  }
1221  /// optional member could be nullptr
1222  if (index) {
1223  index->set_parent(this);
1224  }
1225 
1226  }
1227 
1228 
1229 
1230  void VarName::set_name(std::shared_ptr<Identifier>&& name) {
1231  this->name = name;
1232  // set parents
1233  if (name) {
1234  name->set_parent(this);
1235  }
1236  }
1237 
1238  void VarName::set_name(const std::shared_ptr<Identifier>& name) {
1239  this->name = name;
1240  // set parents
1241  if (name) {
1242  name->set_parent(this);
1243  }
1244  }
1245 
1246 
1247  void VarName::set_at(std::shared_ptr<Integer>&& at) {
1248  this->at = at;
1249  // set parents
1250  if (at) {
1251  at->set_parent(this);
1252  }
1253  }
1254 
1255  void VarName::set_at(const std::shared_ptr<Integer>& at) {
1256  this->at = at;
1257  // set parents
1258  if (at) {
1259  at->set_parent(this);
1260  }
1261  }
1262 
1263 
1264  void VarName::set_index(std::shared_ptr<Expression>&& index) {
1265  this->index = index;
1266  // set parents
1267  if (index) {
1268  index->set_parent(this);
1269  }
1270  }
1271 
1272  void VarName::set_index(const std::shared_ptr<Expression>& index) {
1273  this->index = index;
1274  // set parents
1275  if (index) {
1276  index->set_parent(this);
1277  }
1278  }
1279 
1280 
1281 
1282  ///
1283  /// Argument member functions definition
1284  ///
1285 
1286 
1287 
1288  std::string Argument::get_node_name() const {
1289  return name->get_node_name();
1290  }
1291 
1292 
1293 
1294 
1296  /// use -> for pointer member
1297  name->accept(v);
1298  (void)v;
1299  /// optional member could be nullptr
1300  if (this->unit) {
1301  this->unit->accept(v);
1302  }
1303  (void)v;
1304  }
1305 
1307  /// use -> for pointer member
1308  name->accept(v);
1309  (void)v;
1310  /// optional member could be nullptr
1311  if (this->unit) {
1312  this->unit->accept(v);
1313  }
1314  (void)v;
1315  }
1316 
1318  v.visit_argument(*this);
1319  }
1320 
1322  v.visit_argument(*this);
1323  }
1324 
1325 
1328 
1329 
1330  Argument::Argument(std::shared_ptr<Identifier> name, std::shared_ptr<Unit> unit)
1332 
1333 
1334  /// copy constructor implementation
1336  /// pointer member must be reseted with the new copy
1337  if (obj.name) {
1338  this->name.reset(obj.name->clone());
1339  }
1340  /// pointer member must be reseted with the new copy
1341  if (obj.unit) {
1342  this->unit.reset(obj.unit->clone());
1343  }
1344 
1345  /// if there is a token, make copy
1346  if (obj.token) {
1347  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1348  }
1349 
1350  /// set parents
1352  }
1353 
1354 
1355  /// set this parent in the children
1357 
1358  /// optional member could be nullptr
1359  if (name) {
1360  name->set_parent(this);
1361  }
1362  /// optional member could be nullptr
1363  if (unit) {
1364  unit->set_parent(this);
1365  }
1366 
1367  }
1368 
1369 
1370 
1371  void Argument::set_name(std::shared_ptr<Identifier>&& name) {
1372  this->name = name;
1373  // set parents
1374  if (name) {
1375  name->set_parent(this);
1376  }
1377  }
1378 
1379  void Argument::set_name(const std::shared_ptr<Identifier>& name) {
1380  this->name = name;
1381  // set parents
1382  if (name) {
1383  name->set_parent(this);
1384  }
1385  }
1386 
1387 
1388  void Argument::set_unit(std::shared_ptr<Unit>&& unit) {
1389  this->unit = unit;
1390  // set parents
1391  if (unit) {
1392  unit->set_parent(this);
1393  }
1394  }
1395 
1396  void Argument::set_unit(const std::shared_ptr<Unit>& unit) {
1397  this->unit = unit;
1398  // set parents
1399  if (unit) {
1400  unit->set_parent(this);
1401  }
1402  }
1403 
1404 
1405 
1406  ///
1407  /// ReactVarName member functions definition
1408  ///
1409 
1410 
1411 
1412 
1413 
1414 
1415  std::string ReactVarName::get_node_name() const {
1416  return name->get_node_name();
1417  }
1418 
1420  /// optional member could be nullptr
1421  if (this->value) {
1422  this->value->accept(v);
1423  }
1424  (void)v;
1425  /// use -> for pointer member
1426  name->accept(v);
1427  (void)v;
1428  }
1429 
1431  /// optional member could be nullptr
1432  if (this->value) {
1433  this->value->accept(v);
1434  }
1435  (void)v;
1436  /// use -> for pointer member
1437  name->accept(v);
1438  (void)v;
1439  }
1440 
1442  v.visit_react_var_name(*this);
1443  }
1444 
1446  v.visit_react_var_name(*this);
1447  }
1448 
1449 
1452 
1453 
1454  ReactVarName::ReactVarName(std::shared_ptr<Integer> value, std::shared_ptr<VarName> name)
1456 
1457 
1458  /// copy constructor implementation
1460  /// pointer member must be reseted with the new copy
1461  if (obj.value) {
1462  this->value.reset(obj.value->clone());
1463  }
1464  /// pointer member must be reseted with the new copy
1465  if (obj.name) {
1466  this->name.reset(obj.name->clone());
1467  }
1468 
1469  /// if there is a token, make copy
1470  if (obj.token) {
1471  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1472  }
1473 
1474  /// set parents
1476  }
1477 
1478 
1479  /// set this parent in the children
1481 
1482  /// optional member could be nullptr
1483  if (value) {
1484  value->set_parent(this);
1485  }
1486  /// optional member could be nullptr
1487  if (name) {
1488  name->set_parent(this);
1489  }
1490 
1491  }
1492 
1493 
1494 
1495  void ReactVarName::set_value(std::shared_ptr<Integer>&& value) {
1496  this->value = value;
1497  // set parents
1498  if (value) {
1499  value->set_parent(this);
1500  }
1501  }
1502 
1503  void ReactVarName::set_value(const std::shared_ptr<Integer>& value) {
1504  this->value = value;
1505  // set parents
1506  if (value) {
1507  value->set_parent(this);
1508  }
1509  }
1510 
1511 
1512  void ReactVarName::set_name(std::shared_ptr<VarName>&& name) {
1513  this->name = name;
1514  // set parents
1515  if (name) {
1516  name->set_parent(this);
1517  }
1518  }
1519 
1520  void ReactVarName::set_name(const std::shared_ptr<VarName>& name) {
1521  this->name = name;
1522  // set parents
1523  if (name) {
1524  name->set_parent(this);
1525  }
1526  }
1527 
1528 
1529 
1530  ///
1531  /// ReadIonVar member functions definition
1532  ///
1533 
1534 
1535 
1536  std::string ReadIonVar::get_node_name() const {
1537  return name->get_node_name();
1538  }
1539 
1541  /// use -> for pointer member
1542  name->accept(v);
1543  (void)v;
1544  }
1545 
1547  /// use -> for pointer member
1548  name->accept(v);
1549  (void)v;
1550  }
1551 
1553  v.visit_read_ion_var(*this);
1554  }
1555 
1557  v.visit_read_ion_var(*this);
1558  }
1559 
1560 
1562  : name(name) { set_parent_in_children(); }
1563 
1564 
1565  ReadIonVar::ReadIonVar(std::shared_ptr<Name> name)
1566  : name(name) { set_parent_in_children(); }
1567 
1568 
1569  /// copy constructor implementation
1571  /// pointer member must be reseted with the new copy
1572  if (obj.name) {
1573  this->name.reset(obj.name->clone());
1574  }
1575 
1576  /// if there is a token, make copy
1577  if (obj.token) {
1578  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1579  }
1580 
1581  /// set parents
1583  }
1584 
1585 
1586  /// set this parent in the children
1588 
1589  /// optional member could be nullptr
1590  if (name) {
1591  name->set_parent(this);
1592  }
1593 
1594  }
1595 
1596 
1597 
1598  void ReadIonVar::set_name(std::shared_ptr<Name>&& name) {
1599  this->name = name;
1600  // set parents
1601  if (name) {
1602  name->set_parent(this);
1603  }
1604  }
1605 
1606  void ReadIonVar::set_name(const std::shared_ptr<Name>& name) {
1607  this->name = name;
1608  // set parents
1609  if (name) {
1610  name->set_parent(this);
1611  }
1612  }
1613 
1614 
1615 
1616  ///
1617  /// WriteIonVar member functions definition
1618  ///
1619 
1620 
1621 
1622  std::string WriteIonVar::get_node_name() const {
1623  return name->get_node_name();
1624  }
1625 
1627  /// use -> for pointer member
1628  name->accept(v);
1629  (void)v;
1630  }
1631 
1633  /// use -> for pointer member
1634  name->accept(v);
1635  (void)v;
1636  }
1637 
1639  v.visit_write_ion_var(*this);
1640  }
1641 
1643  v.visit_write_ion_var(*this);
1644  }
1645 
1646 
1648  : name(name) { set_parent_in_children(); }
1649 
1650 
1651  WriteIonVar::WriteIonVar(std::shared_ptr<Name> name)
1652  : name(name) { set_parent_in_children(); }
1653 
1654 
1655  /// copy constructor implementation
1657  /// pointer member must be reseted with the new copy
1658  if (obj.name) {
1659  this->name.reset(obj.name->clone());
1660  }
1661 
1662  /// if there is a token, make copy
1663  if (obj.token) {
1664  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1665  }
1666 
1667  /// set parents
1669  }
1670 
1671 
1672  /// set this parent in the children
1674 
1675  /// optional member could be nullptr
1676  if (name) {
1677  name->set_parent(this);
1678  }
1679 
1680  }
1681 
1682 
1683 
1684  void WriteIonVar::set_name(std::shared_ptr<Name>&& name) {
1685  this->name = name;
1686  // set parents
1687  if (name) {
1688  name->set_parent(this);
1689  }
1690  }
1691 
1692  void WriteIonVar::set_name(const std::shared_ptr<Name>& name) {
1693  this->name = name;
1694  // set parents
1695  if (name) {
1696  name->set_parent(this);
1697  }
1698  }
1699 
1700 
1701 
1702  ///
1703  /// NonspecificCurVar member functions definition
1704  ///
1705 
1706 
1707 
1708  std::string NonspecificCurVar::get_node_name() const {
1709  return name->get_node_name();
1710  }
1711 
1713  /// use -> for pointer member
1714  name->accept(v);
1715  (void)v;
1716  }
1717 
1719  /// use -> for pointer member
1720  name->accept(v);
1721  (void)v;
1722  }
1723 
1725  v.visit_nonspecific_cur_var(*this);
1726  }
1727 
1729  v.visit_nonspecific_cur_var(*this);
1730  }
1731 
1732 
1734  : name(name) { set_parent_in_children(); }
1735 
1736 
1738  : name(name) { set_parent_in_children(); }
1739 
1740 
1741  /// copy constructor implementation
1743  /// pointer member must be reseted with the new copy
1744  if (obj.name) {
1745  this->name.reset(obj.name->clone());
1746  }
1747 
1748  /// if there is a token, make copy
1749  if (obj.token) {
1750  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1751  }
1752 
1753  /// set parents
1755  }
1756 
1757 
1758  /// set this parent in the children
1760 
1761  /// optional member could be nullptr
1762  if (name) {
1763  name->set_parent(this);
1764  }
1765 
1766  }
1767 
1768 
1769 
1770  void NonspecificCurVar::set_name(std::shared_ptr<Name>&& name) {
1771  this->name = name;
1772  // set parents
1773  if (name) {
1774  name->set_parent(this);
1775  }
1776  }
1777 
1778  void NonspecificCurVar::set_name(const std::shared_ptr<Name>& name) {
1779  this->name = name;
1780  // set parents
1781  if (name) {
1782  name->set_parent(this);
1783  }
1784  }
1785 
1786 
1787 
1788  ///
1789  /// ElectrodeCurVar member functions definition
1790  ///
1791 
1792 
1793 
1794  std::string ElectrodeCurVar::get_node_name() const {
1795  return name->get_node_name();
1796  }
1797 
1799  /// use -> for pointer member
1800  name->accept(v);
1801  (void)v;
1802  }
1803 
1805  /// use -> for pointer member
1806  name->accept(v);
1807  (void)v;
1808  }
1809 
1811  v.visit_electrode_cur_var(*this);
1812  }
1813 
1815  v.visit_electrode_cur_var(*this);
1816  }
1817 
1818 
1820  : name(name) { set_parent_in_children(); }
1821 
1822 
1824  : name(name) { set_parent_in_children(); }
1825 
1826 
1827  /// copy constructor implementation
1829  /// pointer member must be reseted with the new copy
1830  if (obj.name) {
1831  this->name.reset(obj.name->clone());
1832  }
1833 
1834  /// if there is a token, make copy
1835  if (obj.token) {
1836  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1837  }
1838 
1839  /// set parents
1841  }
1842 
1843 
1844  /// set this parent in the children
1846 
1847  /// optional member could be nullptr
1848  if (name) {
1849  name->set_parent(this);
1850  }
1851 
1852  }
1853 
1854 
1855 
1856  void ElectrodeCurVar::set_name(std::shared_ptr<Name>&& name) {
1857  this->name = name;
1858  // set parents
1859  if (name) {
1860  name->set_parent(this);
1861  }
1862  }
1863 
1864  void ElectrodeCurVar::set_name(const std::shared_ptr<Name>& name) {
1865  this->name = name;
1866  // set parents
1867  if (name) {
1868  name->set_parent(this);
1869  }
1870  }
1871 
1872 
1873 
1874  ///
1875  /// RangeVar member functions definition
1876  ///
1877 
1878 
1879 
1880  std::string RangeVar::get_node_name() const {
1881  return name->get_node_name();
1882  }
1883 
1885  /// use -> for pointer member
1886  name->accept(v);
1887  (void)v;
1888  }
1889 
1891  /// use -> for pointer member
1892  name->accept(v);
1893  (void)v;
1894  }
1895 
1897  v.visit_range_var(*this);
1898  }
1899 
1901  v.visit_range_var(*this);
1902  }
1903 
1904 
1906  : name(name) { set_parent_in_children(); }
1907 
1908 
1909  RangeVar::RangeVar(std::shared_ptr<Name> name)
1910  : name(name) { set_parent_in_children(); }
1911 
1912 
1913  /// copy constructor implementation
1915  /// pointer member must be reseted with the new copy
1916  if (obj.name) {
1917  this->name.reset(obj.name->clone());
1918  }
1919 
1920  /// if there is a token, make copy
1921  if (obj.token) {
1922  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
1923  }
1924 
1925  /// set parents
1927  }
1928 
1929 
1930  /// set this parent in the children
1932 
1933  /// optional member could be nullptr
1934  if (name) {
1935  name->set_parent(this);
1936  }
1937 
1938  }
1939 
1940 
1941 
1942  void RangeVar::set_name(std::shared_ptr<Name>&& name) {
1943  this->name = name;
1944  // set parents
1945  if (name) {
1946  name->set_parent(this);
1947  }
1948  }
1949 
1950  void RangeVar::set_name(const std::shared_ptr<Name>& name) {
1951  this->name = name;
1952  // set parents
1953  if (name) {
1954  name->set_parent(this);
1955  }
1956  }
1957 
1958 
1959 
1960  ///
1961  /// GlobalVar member functions definition
1962  ///
1963 
1964 
1965 
1966  std::string GlobalVar::get_node_name() const {
1967  return name->get_node_name();
1968  }
1969 
1971  /// use -> for pointer member
1972  name->accept(v);
1973  (void)v;
1974  }
1975 
1977  /// use -> for pointer member
1978  name->accept(v);
1979  (void)v;
1980  }
1981 
1983  v.visit_global_var(*this);
1984  }
1985 
1987  v.visit_global_var(*this);
1988  }
1989 
1990 
1992  : name(name) { set_parent_in_children(); }
1993 
1994 
1995  GlobalVar::GlobalVar(std::shared_ptr<Name> name)
1996  : name(name) { set_parent_in_children(); }
1997 
1998 
1999  /// copy constructor implementation
2001  /// pointer member must be reseted with the new copy
2002  if (obj.name) {
2003  this->name.reset(obj.name->clone());
2004  }
2005 
2006  /// if there is a token, make copy
2007  if (obj.token) {
2008  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2009  }
2010 
2011  /// set parents
2013  }
2014 
2015 
2016  /// set this parent in the children
2018 
2019  /// optional member could be nullptr
2020  if (name) {
2021  name->set_parent(this);
2022  }
2023 
2024  }
2025 
2026 
2027 
2028  void GlobalVar::set_name(std::shared_ptr<Name>&& name) {
2029  this->name = name;
2030  // set parents
2031  if (name) {
2032  name->set_parent(this);
2033  }
2034  }
2035 
2036  void GlobalVar::set_name(const std::shared_ptr<Name>& name) {
2037  this->name = name;
2038  // set parents
2039  if (name) {
2040  name->set_parent(this);
2041  }
2042  }
2043 
2044 
2045 
2046  ///
2047  /// PointerVar member functions definition
2048  ///
2049 
2050 
2051 
2052  std::string PointerVar::get_node_name() const {
2053  return name->get_node_name();
2054  }
2055 
2057  /// use -> for pointer member
2058  name->accept(v);
2059  (void)v;
2060  }
2061 
2063  /// use -> for pointer member
2064  name->accept(v);
2065  (void)v;
2066  }
2067 
2069  v.visit_pointer_var(*this);
2070  }
2071 
2073  v.visit_pointer_var(*this);
2074  }
2075 
2076 
2078  : name(name) { set_parent_in_children(); }
2079 
2080 
2081  PointerVar::PointerVar(std::shared_ptr<Name> name)
2082  : name(name) { set_parent_in_children(); }
2083 
2084 
2085  /// copy constructor implementation
2087  /// pointer member must be reseted with the new copy
2088  if (obj.name) {
2089  this->name.reset(obj.name->clone());
2090  }
2091 
2092  /// if there is a token, make copy
2093  if (obj.token) {
2094  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2095  }
2096 
2097  /// set parents
2099  }
2100 
2101 
2102  /// set this parent in the children
2104 
2105  /// optional member could be nullptr
2106  if (name) {
2107  name->set_parent(this);
2108  }
2109 
2110  }
2111 
2112 
2113 
2114  void PointerVar::set_name(std::shared_ptr<Name>&& name) {
2115  this->name = name;
2116  // set parents
2117  if (name) {
2118  name->set_parent(this);
2119  }
2120  }
2121 
2122  void PointerVar::set_name(const std::shared_ptr<Name>& name) {
2123  this->name = name;
2124  // set parents
2125  if (name) {
2126  name->set_parent(this);
2127  }
2128  }
2129 
2130 
2131 
2132  ///
2133  /// RandomVar member functions definition
2134  ///
2135 
2136 
2137 
2138  std::string RandomVar::get_node_name() const {
2139  return name->get_node_name();
2140  }
2141 
2143  /// use -> for pointer member
2144  name->accept(v);
2145  (void)v;
2146  }
2147 
2149  /// use -> for pointer member
2150  name->accept(v);
2151  (void)v;
2152  }
2153 
2155  v.visit_random_var(*this);
2156  }
2157 
2159  v.visit_random_var(*this);
2160  }
2161 
2162 
2164  : name(name) { set_parent_in_children(); }
2165 
2166 
2167  RandomVar::RandomVar(std::shared_ptr<Name> name)
2168  : name(name) { set_parent_in_children(); }
2169 
2170 
2171  /// copy constructor implementation
2173  /// pointer member must be reseted with the new copy
2174  if (obj.name) {
2175  this->name.reset(obj.name->clone());
2176  }
2177 
2178  /// if there is a token, make copy
2179  if (obj.token) {
2180  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2181  }
2182 
2183  /// set parents
2185  }
2186 
2187 
2188  /// set this parent in the children
2190 
2191  /// optional member could be nullptr
2192  if (name) {
2193  name->set_parent(this);
2194  }
2195 
2196  }
2197 
2198 
2199 
2200  void RandomVar::set_name(std::shared_ptr<Name>&& name) {
2201  this->name = name;
2202  // set parents
2203  if (name) {
2204  name->set_parent(this);
2205  }
2206  }
2207 
2208  void RandomVar::set_name(const std::shared_ptr<Name>& name) {
2209  this->name = name;
2210  // set parents
2211  if (name) {
2212  name->set_parent(this);
2213  }
2214  }
2215 
2216 
2217 
2218  ///
2219  /// BbcorePointerVar member functions definition
2220  ///
2221 
2222 
2223 
2224  std::string BbcorePointerVar::get_node_name() const {
2225  return name->get_node_name();
2226  }
2227 
2229  /// use -> for pointer member
2230  name->accept(v);
2231  (void)v;
2232  }
2233 
2235  /// use -> for pointer member
2236  name->accept(v);
2237  (void)v;
2238  }
2239 
2241  v.visit_bbcore_pointer_var(*this);
2242  }
2243 
2245  v.visit_bbcore_pointer_var(*this);
2246  }
2247 
2248 
2250  : name(name) { set_parent_in_children(); }
2251 
2252 
2254  : name(name) { set_parent_in_children(); }
2255 
2256 
2257  /// copy constructor implementation
2259  /// pointer member must be reseted with the new copy
2260  if (obj.name) {
2261  this->name.reset(obj.name->clone());
2262  }
2263 
2264  /// if there is a token, make copy
2265  if (obj.token) {
2266  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2267  }
2268 
2269  /// set parents
2271  }
2272 
2273 
2274  /// set this parent in the children
2276 
2277  /// optional member could be nullptr
2278  if (name) {
2279  name->set_parent(this);
2280  }
2281 
2282  }
2283 
2284 
2285 
2286  void BbcorePointerVar::set_name(std::shared_ptr<Name>&& name) {
2287  this->name = name;
2288  // set parents
2289  if (name) {
2290  name->set_parent(this);
2291  }
2292  }
2293 
2294  void BbcorePointerVar::set_name(const std::shared_ptr<Name>& name) {
2295  this->name = name;
2296  // set parents
2297  if (name) {
2298  name->set_parent(this);
2299  }
2300  }
2301 
2302 
2303 
2304  ///
2305  /// ExternVar member functions definition
2306  ///
2307 
2308 
2309 
2310  std::string ExternVar::get_node_name() const {
2311  return name->get_node_name();
2312  }
2313 
2315  /// use -> for pointer member
2316  name->accept(v);
2317  (void)v;
2318  }
2319 
2321  /// use -> for pointer member
2322  name->accept(v);
2323  (void)v;
2324  }
2325 
2327  v.visit_extern_var(*this);
2328  }
2329 
2331  v.visit_extern_var(*this);
2332  }
2333 
2334 
2336  : name(name) { set_parent_in_children(); }
2337 
2338 
2339  ExternVar::ExternVar(std::shared_ptr<Name> name)
2340  : name(name) { set_parent_in_children(); }
2341 
2342 
2343  /// copy constructor implementation
2345  /// pointer member must be reseted with the new copy
2346  if (obj.name) {
2347  this->name.reset(obj.name->clone());
2348  }
2349 
2350  /// if there is a token, make copy
2351  if (obj.token) {
2352  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2353  }
2354 
2355  /// set parents
2357  }
2358 
2359 
2360  /// set this parent in the children
2362 
2363  /// optional member could be nullptr
2364  if (name) {
2365  name->set_parent(this);
2366  }
2367 
2368  }
2369 
2370 
2371 
2372  void ExternVar::set_name(std::shared_ptr<Name>&& name) {
2373  this->name = name;
2374  // set parents
2375  if (name) {
2376  name->set_parent(this);
2377  }
2378  }
2379 
2380  void ExternVar::set_name(const std::shared_ptr<Name>& name) {
2381  this->name = name;
2382  // set parents
2383  if (name) {
2384  name->set_parent(this);
2385  }
2386  }
2387 
2388 
2389 
2390  ///
2391  /// ParamBlock member functions definition
2392  ///
2393 
2394 
2395 
2396 
2397 
2399  /// visit each element of vector
2400  for (auto& item : this->statements) {
2401  item->accept(v);
2402  }
2403  (void)v;
2404  }
2405 
2407  /// visit each element of vector
2408  for (auto& item : this->statements) {
2409  item->accept(v);
2410  }
2411  (void)v;
2412  }
2413 
2415  v.visit_param_block(*this);
2416  }
2417 
2419  v.visit_param_block(*this);
2420  }
2421 
2422 
2424  : statements(statements) { set_parent_in_children(); }
2425 
2426 
2427 
2428  /// copy constructor implementation
2430  /// copy each element of vector
2431  for (auto& item : obj.statements) {
2432  this->statements.emplace_back(item->clone());
2433  }
2434 
2435  /// if there is a token, make copy
2436  if (obj.token) {
2437  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2438  }
2439 
2440  /// set parents
2442  }
2443 
2444 
2445  /// set this parent in the children
2447 
2448  /// set parent for each element of the vector
2449  for (auto& item : statements) {
2450  item->set_parent(this);
2451 
2452  }
2453 
2454  }
2455 
2456 
2457 
2459  this->statements = statements;
2460  // set parents
2461  for (auto& ii : statements) {
2462  ii->set_parent(this);
2463  }
2464  }
2465 
2467  this->statements = statements;
2468  // set parents
2469  for (auto& ii : statements) {
2470  ii->set_parent(this);
2471  }
2472  }
2473 
2474 
2475 
2476  ///
2477  /// IndependentBlock member functions definition
2478  ///
2479 
2480 
2481 
2482 
2483 
2485  /// visit each element of vector
2486  for (auto& item : this->variables) {
2487  item->accept(v);
2488  }
2489  (void)v;
2490  }
2491 
2493  /// visit each element of vector
2494  for (auto& item : this->variables) {
2495  item->accept(v);
2496  }
2497  (void)v;
2498  }
2499 
2501  v.visit_independent_block(*this);
2502  }
2503 
2505  v.visit_independent_block(*this);
2506  }
2507 
2508 
2510  : variables(variables) { set_parent_in_children(); }
2511 
2512 
2513 
2514  /// copy constructor implementation
2516  /// copy each element of vector
2517  for (auto& item : obj.variables) {
2518  this->variables.emplace_back(item->clone());
2519  }
2520 
2521  /// if there is a token, make copy
2522  if (obj.token) {
2523  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2524  }
2525 
2526  /// set parents
2528  }
2529 
2530 
2531  /// set this parent in the children
2533 
2534  /// set parent for each element of the vector
2535  for (auto& item : variables) {
2536  item->set_parent(this);
2537 
2538  }
2539 
2540  }
2541 
2542 
2543 
2545  this->variables = variables;
2546  // set parents
2547  for (auto& ii : variables) {
2548  ii->set_parent(this);
2549  }
2550  }
2551 
2553  this->variables = variables;
2554  // set parents
2555  for (auto& ii : variables) {
2556  ii->set_parent(this);
2557  }
2558  }
2559 
2560 
2561 
2562  ///
2563  /// AssignedBlock member functions definition
2564  ///
2565 
2566 
2567 /**
2568  * \brief Add member to definitions by raw pointer
2569  */
2571  definitions.emplace_back(n);
2572 
2573  // set parents
2574  n->set_parent(this);
2575 }
2576 
2577 /**
2578  * \brief Add member to definitions by shared_ptr
2579  */
2580 void AssignedBlock::emplace_back_assigned_definition(std::shared_ptr<AssignedDefinition> n) {
2581  definitions.emplace_back(n);
2582  // set parents
2583  n->set_parent(this);
2584 }
2585 
2586 /**
2587  * \brief Erase member to definitions
2588  */
2589 AssignedDefinitionVector::const_iterator AssignedBlock::erase_assigned_definition(AssignedDefinitionVector::const_iterator first) {
2590  return definitions.erase(first);
2591 }
2592 /**
2593  * \brief Erase members to definitions
2594  */
2595 AssignedDefinitionVector::const_iterator AssignedBlock::erase_assigned_definition(AssignedDefinitionVector::const_iterator first, AssignedDefinitionVector::const_iterator last) {
2596  return definitions.erase(first, last);
2597 }
2598 /**
2599  * \brief Erase non-consecutive members to definitions
2600  *
2601  * loosely following the cpp reference of remove_if
2602  */
2603 size_t AssignedBlock::erase_assigned_definition(std::unordered_set<AssignedDefinition*>& to_be_erased) {
2604  auto first = definitions.begin();
2605  auto last = definitions.end();
2606  auto result = first;
2607 
2608  while (first != last) {
2609  // automatically erase dangling pointers from the uset while
2610  // looking for them to erase them in the vector
2611  if (to_be_erased.erase(first->get()) == 0) {
2613  ++result;
2614  }
2615  ++first;
2616  }
2617 
2618  size_t out = last - result;
2620 
2621  return out;
2622 }
2623 
2624 /**
2625  * \brief Insert member to definitions
2626  */
2627 AssignedDefinitionVector::const_iterator AssignedBlock::insert_assigned_definition(AssignedDefinitionVector::const_iterator position, const std::shared_ptr<AssignedDefinition>& n) {
2628  n->set_parent(this);
2629  return definitions.insert(position, n);
2630 }
2631 
2632 /**
2633  * \brief Reset member to definitions
2634  */
2635 void AssignedBlock::reset_assigned_definition(AssignedDefinitionVector::const_iterator position, AssignedDefinition* n) {
2636  //set parents
2637  n->set_parent(this);
2638 
2639  definitions[position - definitions.begin()].reset(n);
2640 }
2641 
2642 /**
2643  * \brief Reset member to definitions
2644  */
2645 void AssignedBlock::reset_assigned_definition(AssignedDefinitionVector::const_iterator position, std::shared_ptr<AssignedDefinition> n) {
2646  //set parents
2647  n->set_parent(this);
2648 
2649  definitions[position - definitions.begin()] = n;
2650 }
2651 
2652 
2653 
2654 
2656  /// visit each element of vector
2657  for (auto& item : this->definitions) {
2658  item->accept(v);
2659  }
2660  (void)v;
2661  }
2662 
2664  /// visit each element of vector
2665  for (auto& item : this->definitions) {
2666  item->accept(v);
2667  }
2668  (void)v;
2669  }
2670 
2672  v.visit_assigned_block(*this);
2673  }
2674 
2676  v.visit_assigned_block(*this);
2677  }
2678 
2679 
2681  : definitions(definitions) { set_parent_in_children(); }
2682 
2683 
2684 
2685  /// copy constructor implementation
2687  /// copy each element of vector
2688  for (auto& item : obj.definitions) {
2689  this->definitions.emplace_back(item->clone());
2690  }
2691 
2692  /// if there is a token, make copy
2693  if (obj.token) {
2694  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2695  }
2696 
2697  /// set parents
2699  }
2700 
2701 
2702  /// set this parent in the children
2704 
2705  /// set parent for each element of the vector
2706  for (auto& item : definitions) {
2707  item->set_parent(this);
2708 
2709  }
2710 
2711  }
2712 
2713 
2714 
2716  this->definitions = definitions;
2717  // set parents
2718  for (auto& ii : definitions) {
2719  ii->set_parent(this);
2720  }
2721  }
2722 
2724  this->definitions = definitions;
2725  // set parents
2726  for (auto& ii : definitions) {
2727  ii->set_parent(this);
2728  }
2729  }
2730 
2731 
2732 
2733  ///
2734  /// StateBlock member functions definition
2735  ///
2736 
2737 
2738 
2739 
2740 
2742  /// visit each element of vector
2743  for (auto& item : this->definitions) {
2744  item->accept(v);
2745  }
2746  (void)v;
2747  }
2748 
2750  /// visit each element of vector
2751  for (auto& item : this->definitions) {
2752  item->accept(v);
2753  }
2754  (void)v;
2755  }
2756 
2758  v.visit_state_block(*this);
2759  }
2760 
2762  v.visit_state_block(*this);
2763  }
2764 
2765 
2767  : definitions(definitions) { set_parent_in_children(); }
2768 
2769 
2770 
2771  /// copy constructor implementation
2773  /// copy each element of vector
2774  for (auto& item : obj.definitions) {
2775  this->definitions.emplace_back(item->clone());
2776  }
2777 
2778  /// if there is a token, make copy
2779  if (obj.token) {
2780  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2781  }
2782 
2783  /// set parents
2785  }
2786 
2787 
2788  /// set this parent in the children
2790 
2791  /// set parent for each element of the vector
2792  for (auto& item : definitions) {
2793  item->set_parent(this);
2794 
2795  }
2796 
2797  }
2798 
2799 
2800 
2802  this->definitions = definitions;
2803  // set parents
2804  for (auto& ii : definitions) {
2805  ii->set_parent(this);
2806  }
2807  }
2808 
2810  this->definitions = definitions;
2811  // set parents
2812  for (auto& ii : definitions) {
2813  ii->set_parent(this);
2814  }
2815  }
2816 
2817 
2818 
2819  ///
2820  /// InitialBlock member functions definition
2821  ///
2822 
2823 
2824 
2825 
2826 
2828  /// use -> for pointer member
2829  statement_block->accept(v);
2830  (void)v;
2831  }
2832 
2834  /// use -> for pointer member
2835  statement_block->accept(v);
2836  (void)v;
2837  }
2838 
2840  v.visit_initial_block(*this);
2841  }
2842 
2844  v.visit_initial_block(*this);
2845  }
2846 
2847 
2849  : statement_block(statement_block) { set_parent_in_children(); }
2850 
2851 
2852  InitialBlock::InitialBlock(std::shared_ptr<StatementBlock> statement_block)
2853  : statement_block(statement_block) { set_parent_in_children(); }
2854 
2855 
2856  /// copy constructor implementation
2858  /// pointer member must be reseted with the new copy
2859  if (obj.statement_block) {
2860  this->statement_block.reset(obj.statement_block->clone());
2861  }
2862 
2863  /// if there is a token, make copy
2864  if (obj.token) {
2865  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2866  }
2867 
2868  /// set parents
2870  }
2871 
2872 
2873  /// set this parent in the children
2875 
2876  /// optional member could be nullptr
2877  if (statement_block) {
2878  statement_block->set_parent(this);
2879  }
2880 
2881  }
2882 
2883 
2884 
2885  void InitialBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
2887  // set parents
2888  if (statement_block) {
2889  statement_block->set_parent(this);
2890  }
2891  }
2892 
2893  void InitialBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
2894  this->statement_block = statement_block;
2895  // set parents
2896  if (statement_block) {
2897  statement_block->set_parent(this);
2898  }
2899  }
2900 
2901 
2902 
2903  ///
2904  /// ConstructorBlock member functions definition
2905  ///
2906 
2907 
2908 
2909 
2910 
2912  /// use -> for pointer member
2913  statement_block->accept(v);
2914  (void)v;
2915  }
2916 
2918  /// use -> for pointer member
2919  statement_block->accept(v);
2920  (void)v;
2921  }
2922 
2924  v.visit_constructor_block(*this);
2925  }
2926 
2928  v.visit_constructor_block(*this);
2929  }
2930 
2931 
2933  : statement_block(statement_block) { set_parent_in_children(); }
2934 
2935 
2936  ConstructorBlock::ConstructorBlock(std::shared_ptr<StatementBlock> statement_block)
2937  : statement_block(statement_block) { set_parent_in_children(); }
2938 
2939 
2940  /// copy constructor implementation
2942  /// pointer member must be reseted with the new copy
2943  if (obj.statement_block) {
2944  this->statement_block.reset(obj.statement_block->clone());
2945  }
2946 
2947  /// if there is a token, make copy
2948  if (obj.token) {
2949  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
2950  }
2951 
2952  /// set parents
2954  }
2955 
2956 
2957  /// set this parent in the children
2959 
2960  /// optional member could be nullptr
2961  if (statement_block) {
2962  statement_block->set_parent(this);
2963  }
2964 
2965  }
2966 
2967 
2968 
2969  void ConstructorBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
2971  // set parents
2972  if (statement_block) {
2973  statement_block->set_parent(this);
2974  }
2975  }
2976 
2977  void ConstructorBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
2978  this->statement_block = statement_block;
2979  // set parents
2980  if (statement_block) {
2981  statement_block->set_parent(this);
2982  }
2983  }
2984 
2985 
2986 
2987  ///
2988  /// DestructorBlock member functions definition
2989  ///
2990 
2991 
2992 
2993 
2994 
2996  /// use -> for pointer member
2997  statement_block->accept(v);
2998  (void)v;
2999  }
3000 
3002  /// use -> for pointer member
3003  statement_block->accept(v);
3004  (void)v;
3005  }
3006 
3008  v.visit_destructor_block(*this);
3009  }
3010 
3012  v.visit_destructor_block(*this);
3013  }
3014 
3015 
3017  : statement_block(statement_block) { set_parent_in_children(); }
3018 
3019 
3020  DestructorBlock::DestructorBlock(std::shared_ptr<StatementBlock> statement_block)
3021  : statement_block(statement_block) { set_parent_in_children(); }
3022 
3023 
3024  /// copy constructor implementation
3026  /// pointer member must be reseted with the new copy
3027  if (obj.statement_block) {
3028  this->statement_block.reset(obj.statement_block->clone());
3029  }
3030 
3031  /// if there is a token, make copy
3032  if (obj.token) {
3033  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3034  }
3035 
3036  /// set parents
3038  }
3039 
3040 
3041  /// set this parent in the children
3043 
3044  /// optional member could be nullptr
3045  if (statement_block) {
3046  statement_block->set_parent(this);
3047  }
3048 
3049  }
3050 
3051 
3052 
3053  void DestructorBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3055  // set parents
3056  if (statement_block) {
3057  statement_block->set_parent(this);
3058  }
3059  }
3060 
3061  void DestructorBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3062  this->statement_block = statement_block;
3063  // set parents
3064  if (statement_block) {
3065  statement_block->set_parent(this);
3066  }
3067  }
3068 
3069 
3070 
3071  ///
3072  /// StatementBlock member functions definition
3073  ///
3074 
3075 
3076 /**
3077  * \brief Add member to statements by raw pointer
3078  */
3080  statements.emplace_back(n);
3081 
3082  // set parents
3083  n->set_parent(this);
3084 }
3085 
3086 /**
3087  * \brief Add member to statements by shared_ptr
3088  */
3089 void StatementBlock::emplace_back_statement(std::shared_ptr<Statement> n) {
3090  statements.emplace_back(n);
3091  // set parents
3092  n->set_parent(this);
3093 }
3094 
3095 /**
3096  * \brief Erase member to statements
3097  */
3098 StatementVector::const_iterator StatementBlock::erase_statement(StatementVector::const_iterator first) {
3099  return statements.erase(first);
3100 }
3101 /**
3102  * \brief Erase members to statements
3103  */
3104 StatementVector::const_iterator StatementBlock::erase_statement(StatementVector::const_iterator first, StatementVector::const_iterator last) {
3105  return statements.erase(first, last);
3106 }
3107 /**
3108  * \brief Erase non-consecutive members to statements
3109  *
3110  * loosely following the cpp reference of remove_if
3111  */
3112 size_t StatementBlock::erase_statement(std::unordered_set<Statement*>& to_be_erased) {
3113  auto first = statements.begin();
3114  auto last = statements.end();
3115  auto result = first;
3116 
3117  while (first != last) {
3118  // automatically erase dangling pointers from the uset while
3119  // looking for them to erase them in the vector
3120  if (to_be_erased.erase(first->get()) == 0) {
3121  reset_statement(result, *first);
3122  ++result;
3123  }
3124  ++first;
3125  }
3126 
3127  size_t out = last - result;
3128  erase_statement(result, last);
3129 
3130  return out;
3131 }
3132 
3133 /**
3134  * \brief Insert member to statements
3135  */
3136 StatementVector::const_iterator StatementBlock::insert_statement(StatementVector::const_iterator position, const std::shared_ptr<Statement>& n) {
3137  n->set_parent(this);
3138  return statements.insert(position, n);
3139 }
3140 
3141 /**
3142  * \brief Reset member to statements
3143  */
3144 void StatementBlock::reset_statement(StatementVector::const_iterator position, Statement* n) {
3145  //set parents
3146  n->set_parent(this);
3147 
3148  statements[position - statements.begin()].reset(n);
3149 }
3150 
3151 /**
3152  * \brief Reset member to statements
3153  */
3154 void StatementBlock::reset_statement(StatementVector::const_iterator position, std::shared_ptr<Statement> n) {
3155  //set parents
3156  n->set_parent(this);
3157 
3158  statements[position - statements.begin()] = n;
3159 }
3160 
3161 
3162 
3163 
3165  /// visit each element of vector
3166  for (auto& item : this->statements) {
3167  item->accept(v);
3168  }
3169  (void)v;
3170  }
3171 
3173  /// visit each element of vector
3174  for (auto& item : this->statements) {
3175  item->accept(v);
3176  }
3177  (void)v;
3178  }
3179 
3181  v.visit_statement_block(*this);
3182  }
3183 
3185  v.visit_statement_block(*this);
3186  }
3187 
3188 
3190  : statements(statements) { set_parent_in_children(); }
3191 
3192 
3193 
3194  /// copy constructor implementation
3196  /// copy each element of vector
3197  for (auto& item : obj.statements) {
3198  this->statements.emplace_back(item->clone());
3199  }
3200 
3201  /// if there is a token, make copy
3202  if (obj.token) {
3203  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3204  }
3205 
3206  /// set parents
3208  }
3209 
3210 
3211  /// set this parent in the children
3213 
3214  /// set parent for each element of the vector
3215  for (auto& item : statements) {
3216  item->set_parent(this);
3217 
3218  }
3219 
3220  }
3221 
3222 
3223 
3225  this->statements = statements;
3226  // set parents
3227  for (auto& ii : statements) {
3228  ii->set_parent(this);
3229  }
3230  }
3231 
3233  this->statements = statements;
3234  // set parents
3235  for (auto& ii : statements) {
3236  ii->set_parent(this);
3237  }
3238  }
3239 
3240 
3241 
3242  ///
3243  /// DerivativeBlock member functions definition
3244  ///
3245 
3246 
3247 
3248  std::string DerivativeBlock::get_node_name() const {
3249  return name->get_node_name();
3250  }
3251 
3252 
3253 
3254 
3256  /// use -> for pointer member
3257  name->accept(v);
3258  (void)v;
3259  /// use -> for pointer member
3260  statement_block->accept(v);
3261  (void)v;
3262  }
3263 
3265  /// use -> for pointer member
3266  name->accept(v);
3267  (void)v;
3268  /// use -> for pointer member
3269  statement_block->accept(v);
3270  (void)v;
3271  }
3272 
3274  v.visit_derivative_block(*this);
3275  }
3276 
3278  v.visit_derivative_block(*this);
3279  }
3280 
3281 
3283  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3284 
3285 
3286  DerivativeBlock::DerivativeBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> statement_block)
3287  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3288 
3289 
3290  /// copy constructor implementation
3292  /// pointer member must be reseted with the new copy
3293  if (obj.name) {
3294  this->name.reset(obj.name->clone());
3295  }
3296  /// pointer member must be reseted with the new copy
3297  if (obj.statement_block) {
3298  this->statement_block.reset(obj.statement_block->clone());
3299  }
3300 
3301  /// if there is a token, make copy
3302  if (obj.token) {
3303  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3304  }
3305 
3306  /// set parents
3308  }
3309 
3310 
3311  /// set this parent in the children
3313 
3314  /// optional member could be nullptr
3315  if (name) {
3316  name->set_parent(this);
3317  }
3318  /// optional member could be nullptr
3319  if (statement_block) {
3320  statement_block->set_parent(this);
3321  }
3322 
3323  }
3324 
3325 
3326 
3327  void DerivativeBlock::set_name(std::shared_ptr<Name>&& name) {
3328  this->name = name;
3329  // set parents
3330  if (name) {
3331  name->set_parent(this);
3332  }
3333  }
3334 
3335  void DerivativeBlock::set_name(const std::shared_ptr<Name>& name) {
3336  this->name = name;
3337  // set parents
3338  if (name) {
3339  name->set_parent(this);
3340  }
3341  }
3342 
3343 
3344  void DerivativeBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3346  // set parents
3347  if (statement_block) {
3348  statement_block->set_parent(this);
3349  }
3350  }
3351 
3352  void DerivativeBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3353  this->statement_block = statement_block;
3354  // set parents
3355  if (statement_block) {
3356  statement_block->set_parent(this);
3357  }
3358  }
3359 
3360 
3361 
3362  ///
3363  /// LinearBlock member functions definition
3364  ///
3365 
3366 
3367 
3368  std::string LinearBlock::get_node_name() const {
3369  return name->get_node_name();
3370  }
3371 
3372 
3373 
3374 
3375 
3376 
3377 
3379  /// use -> for pointer member
3380  name->accept(v);
3381  (void)v;
3382  /// visit each element of vector
3383  for (auto& item : this->solvefor) {
3384  item->accept(v);
3385  }
3386  (void)v;
3387  /// use -> for pointer member
3388  statement_block->accept(v);
3389  (void)v;
3390  }
3391 
3393  /// use -> for pointer member
3394  name->accept(v);
3395  (void)v;
3396  /// visit each element of vector
3397  for (auto& item : this->solvefor) {
3398  item->accept(v);
3399  }
3400  (void)v;
3401  /// use -> for pointer member
3402  statement_block->accept(v);
3403  (void)v;
3404  }
3405 
3407  v.visit_linear_block(*this);
3408  }
3409 
3411  v.visit_linear_block(*this);
3412  }
3413 
3414 
3415  LinearBlock::LinearBlock(Name* name, const NameVector& solvefor, StatementBlock* statement_block)
3416  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3417 
3418 
3419  LinearBlock::LinearBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
3420  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3421 
3422 
3423  /// copy constructor implementation
3425  /// pointer member must be reseted with the new copy
3426  if (obj.name) {
3427  this->name.reset(obj.name->clone());
3428  }
3429  /// copy each element of vector
3430  for (auto& item : obj.solvefor) {
3431  this->solvefor.emplace_back(item->clone());
3432  }
3433  /// pointer member must be reseted with the new copy
3434  if (obj.statement_block) {
3435  this->statement_block.reset(obj.statement_block->clone());
3436  }
3437 
3438  /// if there is a token, make copy
3439  if (obj.token) {
3440  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3441  }
3442 
3443  /// set parents
3445  }
3446 
3447 
3448  /// set this parent in the children
3450 
3451  /// optional member could be nullptr
3452  if (name) {
3453  name->set_parent(this);
3454  }
3455  /// set parent for each element of the vector
3456  for (auto& item : solvefor) {
3457  item->set_parent(this);
3458 
3459  }
3460  /// optional member could be nullptr
3461  if (statement_block) {
3462  statement_block->set_parent(this);
3463  }
3464 
3465  }
3466 
3467 
3468 
3469  void LinearBlock::set_name(std::shared_ptr<Name>&& name) {
3470  this->name = name;
3471  // set parents
3472  if (name) {
3473  name->set_parent(this);
3474  }
3475  }
3476 
3477  void LinearBlock::set_name(const std::shared_ptr<Name>& name) {
3478  this->name = name;
3479  // set parents
3480  if (name) {
3481  name->set_parent(this);
3482  }
3483  }
3484 
3485 
3487  this->solvefor = solvefor;
3488  // set parents
3489  for (auto& ii : solvefor) {
3490  ii->set_parent(this);
3491  }
3492  }
3493 
3494  void LinearBlock::set_solvefor(const NameVector& solvefor) {
3495  this->solvefor = solvefor;
3496  // set parents
3497  for (auto& ii : solvefor) {
3498  ii->set_parent(this);
3499  }
3500  }
3501 
3502 
3503  void LinearBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3505  // set parents
3506  if (statement_block) {
3507  statement_block->set_parent(this);
3508  }
3509  }
3510 
3511  void LinearBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3512  this->statement_block = statement_block;
3513  // set parents
3514  if (statement_block) {
3515  statement_block->set_parent(this);
3516  }
3517  }
3518 
3519 
3520 
3521  ///
3522  /// NonLinearBlock member functions definition
3523  ///
3524 
3525 
3526 
3527  std::string NonLinearBlock::get_node_name() const {
3528  return name->get_node_name();
3529  }
3530 
3531 
3532 
3533 
3534 
3535 
3536 
3538  /// use -> for pointer member
3539  name->accept(v);
3540  (void)v;
3541  /// visit each element of vector
3542  for (auto& item : this->solvefor) {
3543  item->accept(v);
3544  }
3545  (void)v;
3546  /// use -> for pointer member
3547  statement_block->accept(v);
3548  (void)v;
3549  }
3550 
3552  /// use -> for pointer member
3553  name->accept(v);
3554  (void)v;
3555  /// visit each element of vector
3556  for (auto& item : this->solvefor) {
3557  item->accept(v);
3558  }
3559  (void)v;
3560  /// use -> for pointer member
3561  statement_block->accept(v);
3562  (void)v;
3563  }
3564 
3566  v.visit_non_linear_block(*this);
3567  }
3568 
3570  v.visit_non_linear_block(*this);
3571  }
3572 
3573 
3575  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3576 
3577 
3578  NonLinearBlock::NonLinearBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
3579  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
3580 
3581 
3582  /// copy constructor implementation
3584  /// pointer member must be reseted with the new copy
3585  if (obj.name) {
3586  this->name.reset(obj.name->clone());
3587  }
3588  /// copy each element of vector
3589  for (auto& item : obj.solvefor) {
3590  this->solvefor.emplace_back(item->clone());
3591  }
3592  /// pointer member must be reseted with the new copy
3593  if (obj.statement_block) {
3594  this->statement_block.reset(obj.statement_block->clone());
3595  }
3596 
3597  /// if there is a token, make copy
3598  if (obj.token) {
3599  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3600  }
3601 
3602  /// set parents
3604  }
3605 
3606 
3607  /// set this parent in the children
3609 
3610  /// optional member could be nullptr
3611  if (name) {
3612  name->set_parent(this);
3613  }
3614  /// set parent for each element of the vector
3615  for (auto& item : solvefor) {
3616  item->set_parent(this);
3617 
3618  }
3619  /// optional member could be nullptr
3620  if (statement_block) {
3621  statement_block->set_parent(this);
3622  }
3623 
3624  }
3625 
3626 
3627 
3628  void NonLinearBlock::set_name(std::shared_ptr<Name>&& name) {
3629  this->name = name;
3630  // set parents
3631  if (name) {
3632  name->set_parent(this);
3633  }
3634  }
3635 
3636  void NonLinearBlock::set_name(const std::shared_ptr<Name>& name) {
3637  this->name = name;
3638  // set parents
3639  if (name) {
3640  name->set_parent(this);
3641  }
3642  }
3643 
3644 
3646  this->solvefor = solvefor;
3647  // set parents
3648  for (auto& ii : solvefor) {
3649  ii->set_parent(this);
3650  }
3651  }
3652 
3654  this->solvefor = solvefor;
3655  // set parents
3656  for (auto& ii : solvefor) {
3657  ii->set_parent(this);
3658  }
3659  }
3660 
3661 
3662  void NonLinearBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3664  // set parents
3665  if (statement_block) {
3666  statement_block->set_parent(this);
3667  }
3668  }
3669 
3670  void NonLinearBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3671  this->statement_block = statement_block;
3672  // set parents
3673  if (statement_block) {
3674  statement_block->set_parent(this);
3675  }
3676  }
3677 
3678 
3679 
3680  ///
3681  /// DiscreteBlock member functions definition
3682  ///
3683 
3684 
3685 
3686  std::string DiscreteBlock::get_node_name() const {
3687  return name->get_node_name();
3688  }
3689 
3690 
3691 
3692 
3694  /// use -> for pointer member
3695  name->accept(v);
3696  (void)v;
3697  /// use -> for pointer member
3698  statement_block->accept(v);
3699  (void)v;
3700  }
3701 
3703  /// use -> for pointer member
3704  name->accept(v);
3705  (void)v;
3706  /// use -> for pointer member
3707  statement_block->accept(v);
3708  (void)v;
3709  }
3710 
3712  v.visit_discrete_block(*this);
3713  }
3714 
3716  v.visit_discrete_block(*this);
3717  }
3718 
3719 
3721  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3722 
3723 
3724  DiscreteBlock::DiscreteBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> statement_block)
3725  : name(name), statement_block(statement_block) { set_parent_in_children(); }
3726 
3727 
3728  /// copy constructor implementation
3730  /// pointer member must be reseted with the new copy
3731  if (obj.name) {
3732  this->name.reset(obj.name->clone());
3733  }
3734  /// pointer member must be reseted with the new copy
3735  if (obj.statement_block) {
3736  this->statement_block.reset(obj.statement_block->clone());
3737  }
3738 
3739  /// if there is a token, make copy
3740  if (obj.token) {
3741  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3742  }
3743 
3744  /// set parents
3746  }
3747 
3748 
3749  /// set this parent in the children
3751 
3752  /// optional member could be nullptr
3753  if (name) {
3754  name->set_parent(this);
3755  }
3756  /// optional member could be nullptr
3757  if (statement_block) {
3758  statement_block->set_parent(this);
3759  }
3760 
3761  }
3762 
3763 
3764 
3765  void DiscreteBlock::set_name(std::shared_ptr<Name>&& name) {
3766  this->name = name;
3767  // set parents
3768  if (name) {
3769  name->set_parent(this);
3770  }
3771  }
3772 
3773  void DiscreteBlock::set_name(const std::shared_ptr<Name>& name) {
3774  this->name = name;
3775  // set parents
3776  if (name) {
3777  name->set_parent(this);
3778  }
3779  }
3780 
3781 
3782  void DiscreteBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
3784  // set parents
3785  if (statement_block) {
3786  statement_block->set_parent(this);
3787  }
3788  }
3789 
3790  void DiscreteBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
3791  this->statement_block = statement_block;
3792  // set parents
3793  if (statement_block) {
3794  statement_block->set_parent(this);
3795  }
3796  }
3797 
3798 
3799 
3800  ///
3801  /// FunctionTableBlock member functions definition
3802  ///
3803 
3804 
3805 
3807  return name->get_node_name();
3808  }
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3817  /// use -> for pointer member
3818  name->accept(v);
3819  (void)v;
3820  /// visit each element of vector
3821  for (auto& item : this->parameters) {
3822  item->accept(v);
3823  }
3824  (void)v;
3825  /// optional member could be nullptr
3826  if (this->unit) {
3827  this->unit->accept(v);
3828  }
3829  (void)v;
3830  }
3831 
3833  /// use -> for pointer member
3834  name->accept(v);
3835  (void)v;
3836  /// visit each element of vector
3837  for (auto& item : this->parameters) {
3838  item->accept(v);
3839  }
3840  (void)v;
3841  /// optional member could be nullptr
3842  if (this->unit) {
3843  this->unit->accept(v);
3844  }
3845  (void)v;
3846  }
3847 
3849  v.visit_function_table_block(*this);
3850  }
3851 
3853  v.visit_function_table_block(*this);
3854  }
3855 
3856 
3858  : name(name), parameters(parameters), unit(unit) { set_parent_in_children(); }
3859 
3860 
3861  FunctionTableBlock::FunctionTableBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit)
3862  : name(name), parameters(parameters), unit(unit) { set_parent_in_children(); }
3863 
3864 
3865  /// copy constructor implementation
3867  /// pointer member must be reseted with the new copy
3868  if (obj.name) {
3869  this->name.reset(obj.name->clone());
3870  }
3871  /// copy each element of vector
3872  for (auto& item : obj.parameters) {
3873  this->parameters.emplace_back(item->clone());
3874  }
3875  /// pointer member must be reseted with the new copy
3876  if (obj.unit) {
3877  this->unit.reset(obj.unit->clone());
3878  }
3879 
3880  /// if there is a token, make copy
3881  if (obj.token) {
3882  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
3883  }
3884 
3885  /// set parents
3887  }
3888 
3889 
3890  /// set this parent in the children
3892 
3893  /// optional member could be nullptr
3894  if (name) {
3895  name->set_parent(this);
3896  }
3897  /// set parent for each element of the vector
3898  for (auto& item : parameters) {
3899  item->set_parent(this);
3900 
3901  }
3902  /// optional member could be nullptr
3903  if (unit) {
3904  unit->set_parent(this);
3905  }
3906 
3907  }
3908 
3909 
3910 
3911  void FunctionTableBlock::set_name(std::shared_ptr<Name>&& name) {
3912  this->name = name;
3913  // set parents
3914  if (name) {
3915  name->set_parent(this);
3916  }
3917  }
3918 
3919  void FunctionTableBlock::set_name(const std::shared_ptr<Name>& name) {
3920  this->name = name;
3921  // set parents
3922  if (name) {
3923  name->set_parent(this);
3924  }
3925  }
3926 
3927 
3929  this->parameters = parameters;
3930  // set parents
3931  for (auto& ii : parameters) {
3932  ii->set_parent(this);
3933  }
3934  }
3935 
3937  this->parameters = parameters;
3938  // set parents
3939  for (auto& ii : parameters) {
3940  ii->set_parent(this);
3941  }
3942  }
3943 
3944 
3945  void FunctionTableBlock::set_unit(std::shared_ptr<Unit>&& unit) {
3946  this->unit = unit;
3947  // set parents
3948  if (unit) {
3949  unit->set_parent(this);
3950  }
3951  }
3952 
3953  void FunctionTableBlock::set_unit(const std::shared_ptr<Unit>& unit) {
3954  this->unit = unit;
3955  // set parents
3956  if (unit) {
3957  unit->set_parent(this);
3958  }
3959  }
3960 
3961 
3962 
3963  ///
3964  /// FunctionBlock member functions definition
3965  ///
3966 
3967 
3968 
3969  std::string FunctionBlock::get_node_name() const {
3970  return name->get_node_name();
3971  }
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3983  /// use -> for pointer member
3984  name->accept(v);
3985  (void)v;
3986  /// visit each element of vector
3987  for (auto& item : this->parameters) {
3988  item->accept(v);
3989  }
3990  (void)v;
3991  /// optional member could be nullptr
3992  if (this->unit) {
3993  this->unit->accept(v);
3994  }
3995  (void)v;
3996  /// use -> for pointer member
3997  statement_block->accept(v);
3998  (void)v;
3999  }
4000 
4002  /// use -> for pointer member
4003  name->accept(v);
4004  (void)v;
4005  /// visit each element of vector
4006  for (auto& item : this->parameters) {
4007  item->accept(v);
4008  }
4009  (void)v;
4010  /// optional member could be nullptr
4011  if (this->unit) {
4012  this->unit->accept(v);
4013  }
4014  (void)v;
4015  /// use -> for pointer member
4016  statement_block->accept(v);
4017  (void)v;
4018  }
4019 
4021  v.visit_function_block(*this);
4022  }
4023 
4025  v.visit_function_block(*this);
4026  }
4027 
4028 
4030  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4031 
4032 
4033  FunctionBlock::FunctionBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit, std::shared_ptr<StatementBlock> statement_block)
4034  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4035 
4036 
4037  /// copy constructor implementation
4039  /// pointer member must be reseted with the new copy
4040  if (obj.name) {
4041  this->name.reset(obj.name->clone());
4042  }
4043  /// copy each element of vector
4044  for (auto& item : obj.parameters) {
4045  this->parameters.emplace_back(item->clone());
4046  }
4047  /// pointer member must be reseted with the new copy
4048  if (obj.unit) {
4049  this->unit.reset(obj.unit->clone());
4050  }
4051  /// pointer member must be reseted with the new copy
4052  if (obj.statement_block) {
4053  this->statement_block.reset(obj.statement_block->clone());
4054  }
4055 
4056  /// if there is a token, make copy
4057  if (obj.token) {
4058  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4059  }
4060 
4061  /// set parents
4063  }
4064 
4065 
4066  /// set this parent in the children
4068 
4069  /// optional member could be nullptr
4070  if (name) {
4071  name->set_parent(this);
4072  }
4073  /// set parent for each element of the vector
4074  for (auto& item : parameters) {
4075  item->set_parent(this);
4076 
4077  }
4078  /// optional member could be nullptr
4079  if (unit) {
4080  unit->set_parent(this);
4081  }
4082  /// optional member could be nullptr
4083  if (statement_block) {
4084  statement_block->set_parent(this);
4085  }
4086 
4087  }
4088 
4089 
4090 
4091  void FunctionBlock::set_name(std::shared_ptr<Name>&& name) {
4092  this->name = name;
4093  // set parents
4094  if (name) {
4095  name->set_parent(this);
4096  }
4097  }
4098 
4099  void FunctionBlock::set_name(const std::shared_ptr<Name>& name) {
4100  this->name = name;
4101  // set parents
4102  if (name) {
4103  name->set_parent(this);
4104  }
4105  }
4106 
4107 
4109  this->parameters = parameters;
4110  // set parents
4111  for (auto& ii : parameters) {
4112  ii->set_parent(this);
4113  }
4114  }
4115 
4117  this->parameters = parameters;
4118  // set parents
4119  for (auto& ii : parameters) {
4120  ii->set_parent(this);
4121  }
4122  }
4123 
4124 
4125  void FunctionBlock::set_unit(std::shared_ptr<Unit>&& unit) {
4126  this->unit = unit;
4127  // set parents
4128  if (unit) {
4129  unit->set_parent(this);
4130  }
4131  }
4132 
4133  void FunctionBlock::set_unit(const std::shared_ptr<Unit>& unit) {
4134  this->unit = unit;
4135  // set parents
4136  if (unit) {
4137  unit->set_parent(this);
4138  }
4139  }
4140 
4141 
4142  void FunctionBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4144  // set parents
4145  if (statement_block) {
4146  statement_block->set_parent(this);
4147  }
4148  }
4149 
4150  void FunctionBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4151  this->statement_block = statement_block;
4152  // set parents
4153  if (statement_block) {
4154  statement_block->set_parent(this);
4155  }
4156  }
4157 
4158 
4159 
4160  ///
4161  /// ProcedureBlock member functions definition
4162  ///
4163 
4164 
4165 
4166  std::string ProcedureBlock::get_node_name() const {
4167  return name->get_node_name();
4168  }
4169 
4170 
4171 
4172 
4173 
4174 
4175 
4176 
4177 
4178 
4180  /// use -> for pointer member
4181  name->accept(v);
4182  (void)v;
4183  /// visit each element of vector
4184  for (auto& item : this->parameters) {
4185  item->accept(v);
4186  }
4187  (void)v;
4188  /// optional member could be nullptr
4189  if (this->unit) {
4190  this->unit->accept(v);
4191  }
4192  (void)v;
4193  /// use -> for pointer member
4194  statement_block->accept(v);
4195  (void)v;
4196  }
4197 
4199  /// use -> for pointer member
4200  name->accept(v);
4201  (void)v;
4202  /// visit each element of vector
4203  for (auto& item : this->parameters) {
4204  item->accept(v);
4205  }
4206  (void)v;
4207  /// optional member could be nullptr
4208  if (this->unit) {
4209  this->unit->accept(v);
4210  }
4211  (void)v;
4212  /// use -> for pointer member
4213  statement_block->accept(v);
4214  (void)v;
4215  }
4216 
4218  v.visit_procedure_block(*this);
4219  }
4220 
4222  v.visit_procedure_block(*this);
4223  }
4224 
4225 
4227  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4228 
4229 
4230  ProcedureBlock::ProcedureBlock(std::shared_ptr<Name> name, const ArgumentVector& parameters, std::shared_ptr<Unit> unit, std::shared_ptr<StatementBlock> statement_block)
4231  : name(name), parameters(parameters), unit(unit), statement_block(statement_block) { set_parent_in_children(); }
4232 
4233 
4234  /// copy constructor implementation
4236  /// pointer member must be reseted with the new copy
4237  if (obj.name) {
4238  this->name.reset(obj.name->clone());
4239  }
4240  /// copy each element of vector
4241  for (auto& item : obj.parameters) {
4242  this->parameters.emplace_back(item->clone());
4243  }
4244  /// pointer member must be reseted with the new copy
4245  if (obj.unit) {
4246  this->unit.reset(obj.unit->clone());
4247  }
4248  /// pointer member must be reseted with the new copy
4249  if (obj.statement_block) {
4250  this->statement_block.reset(obj.statement_block->clone());
4251  }
4252 
4253  /// if there is a token, make copy
4254  if (obj.token) {
4255  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4256  }
4257 
4258  /// set parents
4260  }
4261 
4262 
4263  /// set this parent in the children
4265 
4266  /// optional member could be nullptr
4267  if (name) {
4268  name->set_parent(this);
4269  }
4270  /// set parent for each element of the vector
4271  for (auto& item : parameters) {
4272  item->set_parent(this);
4273 
4274  }
4275  /// optional member could be nullptr
4276  if (unit) {
4277  unit->set_parent(this);
4278  }
4279  /// optional member could be nullptr
4280  if (statement_block) {
4281  statement_block->set_parent(this);
4282  }
4283 
4284  }
4285 
4286 
4287 
4288  void ProcedureBlock::set_name(std::shared_ptr<Name>&& name) {
4289  this->name = name;
4290  // set parents
4291  if (name) {
4292  name->set_parent(this);
4293  }
4294  }
4295 
4296  void ProcedureBlock::set_name(const std::shared_ptr<Name>& name) {
4297  this->name = name;
4298  // set parents
4299  if (name) {
4300  name->set_parent(this);
4301  }
4302  }
4303 
4304 
4306  this->parameters = parameters;
4307  // set parents
4308  for (auto& ii : parameters) {
4309  ii->set_parent(this);
4310  }
4311  }
4312 
4314  this->parameters = parameters;
4315  // set parents
4316  for (auto& ii : parameters) {
4317  ii->set_parent(this);
4318  }
4319  }
4320 
4321 
4322  void ProcedureBlock::set_unit(std::shared_ptr<Unit>&& unit) {
4323  this->unit = unit;
4324  // set parents
4325  if (unit) {
4326  unit->set_parent(this);
4327  }
4328  }
4329 
4330  void ProcedureBlock::set_unit(const std::shared_ptr<Unit>& unit) {
4331  this->unit = unit;
4332  // set parents
4333  if (unit) {
4334  unit->set_parent(this);
4335  }
4336  }
4337 
4338 
4339  void ProcedureBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4341  // set parents
4342  if (statement_block) {
4343  statement_block->set_parent(this);
4344  }
4345  }
4346 
4347  void ProcedureBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4348  this->statement_block = statement_block;
4349  // set parents
4350  if (statement_block) {
4351  statement_block->set_parent(this);
4352  }
4353  }
4354 
4355 
4356 
4357  ///
4358  /// NetReceiveBlock member functions definition
4359  ///
4360 
4361 
4362 
4363 
4364 
4365 
4366 
4367 
4369  /// visit each element of vector
4370  for (auto& item : this->parameters) {
4371  item->accept(v);
4372  }
4373  (void)v;
4374  /// use -> for pointer member
4375  statement_block->accept(v);
4376  (void)v;
4377  }
4378 
4380  /// visit each element of vector
4381  for (auto& item : this->parameters) {
4382  item->accept(v);
4383  }
4384  (void)v;
4385  /// use -> for pointer member
4386  statement_block->accept(v);
4387  (void)v;
4388  }
4389 
4391  v.visit_net_receive_block(*this);
4392  }
4393 
4395  v.visit_net_receive_block(*this);
4396  }
4397 
4398 
4400  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
4401 
4402 
4403  NetReceiveBlock::NetReceiveBlock(const ArgumentVector& parameters, std::shared_ptr<StatementBlock> statement_block)
4404  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
4405 
4406 
4407  /// copy constructor implementation
4409  /// copy each element of vector
4410  for (auto& item : obj.parameters) {
4411  this->parameters.emplace_back(item->clone());
4412  }
4413  /// pointer member must be reseted with the new copy
4414  if (obj.statement_block) {
4415  this->statement_block.reset(obj.statement_block->clone());
4416  }
4417 
4418  /// if there is a token, make copy
4419  if (obj.token) {
4420  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4421  }
4422 
4423  /// set parents
4425  }
4426 
4427 
4428  /// set this parent in the children
4430 
4431  /// set parent for each element of the vector
4432  for (auto& item : parameters) {
4433  item->set_parent(this);
4434 
4435  }
4436  /// optional member could be nullptr
4437  if (statement_block) {
4438  statement_block->set_parent(this);
4439  }
4440 
4441  }
4442 
4443 
4444 
4446  this->parameters = parameters;
4447  // set parents
4448  for (auto& ii : parameters) {
4449  ii->set_parent(this);
4450  }
4451  }
4452 
4454  this->parameters = parameters;
4455  // set parents
4456  for (auto& ii : parameters) {
4457  ii->set_parent(this);
4458  }
4459  }
4460 
4461 
4462  void NetReceiveBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4464  // set parents
4465  if (statement_block) {
4466  statement_block->set_parent(this);
4467  }
4468  }
4469 
4470  void NetReceiveBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4471  this->statement_block = statement_block;
4472  // set parents
4473  if (statement_block) {
4474  statement_block->set_parent(this);
4475  }
4476  }
4477 
4478 
4479 
4480  ///
4481  /// SolveBlock member functions definition
4482  ///
4483 
4484 
4485 
4486 
4487 
4488 
4489 
4490 
4491 
4492 
4493 
4495  /// use -> for pointer member
4496  block_name->accept(v);
4497  (void)v;
4498  /// optional member could be nullptr
4499  if (this->method) {
4500  this->method->accept(v);
4501  }
4502  (void)v;
4503  /// optional member could be nullptr
4504  if (this->steadystate) {
4505  this->steadystate->accept(v);
4506  }
4507  (void)v;
4508  }
4509 
4511  /// use -> for pointer member
4512  block_name->accept(v);
4513  (void)v;
4514  /// optional member could be nullptr
4515  if (this->method) {
4516  this->method->accept(v);
4517  }
4518  (void)v;
4519  /// optional member could be nullptr
4520  if (this->steadystate) {
4521  this->steadystate->accept(v);
4522  }
4523  (void)v;
4524  }
4525 
4527  v.visit_solve_block(*this);
4528  }
4529 
4531  v.visit_solve_block(*this);
4532  }
4533 
4534 
4535  SolveBlock::SolveBlock(Name* block_name, Name* method, Name* steadystate)
4536  : block_name(block_name), method(method), steadystate(steadystate) { set_parent_in_children(); }
4537 
4538 
4539  SolveBlock::SolveBlock(std::shared_ptr<Name> block_name, std::shared_ptr<Name> method, std::shared_ptr<Name> steadystate)
4540  : block_name(block_name), method(method), steadystate(steadystate) { set_parent_in_children(); }
4541 
4542 
4543  /// copy constructor implementation
4545  /// pointer member must be reseted with the new copy
4546  if (obj.block_name) {
4547  this->block_name.reset(obj.block_name->clone());
4548  }
4549  /// pointer member must be reseted with the new copy
4550  if (obj.method) {
4551  this->method.reset(obj.method->clone());
4552  }
4553  /// pointer member must be reseted with the new copy
4554  if (obj.steadystate) {
4555  this->steadystate.reset(obj.steadystate->clone());
4556  }
4557 
4558  /// if there is a token, make copy
4559  if (obj.token) {
4560  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4561  }
4562 
4563  /// set parents
4565  }
4566 
4567 
4568  /// set this parent in the children
4570 
4571  /// optional member could be nullptr
4572  if (block_name) {
4573  block_name->set_parent(this);
4574  }
4575  /// optional member could be nullptr
4576  if (method) {
4577  method->set_parent(this);
4578  }
4579  /// optional member could be nullptr
4580  if (steadystate) {
4581  steadystate->set_parent(this);
4582  }
4583 
4584  }
4585 
4586 
4587 
4588  void SolveBlock::set_block_name(std::shared_ptr<Name>&& block_name) {
4589  this->block_name = block_name;
4590  // set parents
4591  if (block_name) {
4592  block_name->set_parent(this);
4593  }
4594  }
4595 
4596  void SolveBlock::set_block_name(const std::shared_ptr<Name>& block_name) {
4597  this->block_name = block_name;
4598  // set parents
4599  if (block_name) {
4600  block_name->set_parent(this);
4601  }
4602  }
4603 
4604 
4605  void SolveBlock::set_method(std::shared_ptr<Name>&& method) {
4606  this->method = method;
4607  // set parents
4608  if (method) {
4609  method->set_parent(this);
4610  }
4611  }
4612 
4613  void SolveBlock::set_method(const std::shared_ptr<Name>& method) {
4614  this->method = method;
4615  // set parents
4616  if (method) {
4617  method->set_parent(this);
4618  }
4619  }
4620 
4621 
4622  void SolveBlock::set_steadystate(std::shared_ptr<Name>&& steadystate) {
4623  this->steadystate = steadystate;
4624  // set parents
4625  if (steadystate) {
4626  steadystate->set_parent(this);
4627  }
4628  }
4629 
4630  void SolveBlock::set_steadystate(const std::shared_ptr<Name>& steadystate) {
4631  this->steadystate = steadystate;
4632  // set parents
4633  if (steadystate) {
4634  steadystate->set_parent(this);
4635  }
4636  }
4637 
4638 
4639 
4640  ///
4641  /// BreakpointBlock member functions definition
4642  ///
4643 
4644 
4645 
4646 
4647 
4649  /// use -> for pointer member
4650  statement_block->accept(v);
4651  (void)v;
4652  }
4653 
4655  /// use -> for pointer member
4656  statement_block->accept(v);
4657  (void)v;
4658  }
4659 
4661  v.visit_breakpoint_block(*this);
4662  }
4663 
4665  v.visit_breakpoint_block(*this);
4666  }
4667 
4668 
4670  : statement_block(statement_block) { set_parent_in_children(); }
4671 
4672 
4673  BreakpointBlock::BreakpointBlock(std::shared_ptr<StatementBlock> statement_block)
4674  : statement_block(statement_block) { set_parent_in_children(); }
4675 
4676 
4677  /// copy constructor implementation
4679  /// pointer member must be reseted with the new copy
4680  if (obj.statement_block) {
4681  this->statement_block.reset(obj.statement_block->clone());
4682  }
4683 
4684  /// if there is a token, make copy
4685  if (obj.token) {
4686  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4687  }
4688 
4689  /// set parents
4691  }
4692 
4693 
4694  /// set this parent in the children
4696 
4697  /// optional member could be nullptr
4698  if (statement_block) {
4699  statement_block->set_parent(this);
4700  }
4701 
4702  }
4703 
4704 
4705 
4706  void BreakpointBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4708  // set parents
4709  if (statement_block) {
4710  statement_block->set_parent(this);
4711  }
4712  }
4713 
4714  void BreakpointBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
4715  this->statement_block = statement_block;
4716  // set parents
4717  if (statement_block) {
4718  statement_block->set_parent(this);
4719  }
4720  }
4721 
4722 
4723 
4724  ///
4725  /// BeforeBlock member functions definition
4726  ///
4727 
4728 
4729 
4730 
4731 
4733  /// use -> for pointer member
4734  bablock->accept(v);
4735  (void)v;
4736  }
4737 
4739  /// use -> for pointer member
4740  bablock->accept(v);
4741  (void)v;
4742  }
4743 
4745  v.visit_before_block(*this);
4746  }
4747 
4749  v.visit_before_block(*this);
4750  }
4751 
4752 
4754  : bablock(bablock) { set_parent_in_children(); }
4755 
4756 
4757  BeforeBlock::BeforeBlock(std::shared_ptr<BABlock> bablock)
4758  : bablock(bablock) { set_parent_in_children(); }
4759 
4760 
4761  /// copy constructor implementation
4763  /// pointer member must be reseted with the new copy
4764  if (obj.bablock) {
4765  this->bablock.reset(obj.bablock->clone());
4766  }
4767 
4768  /// if there is a token, make copy
4769  if (obj.token) {
4770  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4771  }
4772 
4773  /// set parents
4775  }
4776 
4777 
4778  /// set this parent in the children
4780 
4781  /// optional member could be nullptr
4782  if (bablock) {
4783  bablock->set_parent(this);
4784  }
4785 
4786  }
4787 
4788 
4789 
4790  void BeforeBlock::set_bablock(std::shared_ptr<BABlock>&& bablock) {
4791  this->bablock = bablock;
4792  // set parents
4793  if (bablock) {
4794  bablock->set_parent(this);
4795  }
4796  }
4797 
4798  void BeforeBlock::set_bablock(const std::shared_ptr<BABlock>& bablock) {
4799  this->bablock = bablock;
4800  // set parents
4801  if (bablock) {
4802  bablock->set_parent(this);
4803  }
4804  }
4805 
4806 
4807 
4808  ///
4809  /// AfterBlock member functions definition
4810  ///
4811 
4812 
4813 
4814 
4815 
4817  /// use -> for pointer member
4818  bablock->accept(v);
4819  (void)v;
4820  }
4821 
4823  /// use -> for pointer member
4824  bablock->accept(v);
4825  (void)v;
4826  }
4827 
4829  v.visit_after_block(*this);
4830  }
4831 
4833  v.visit_after_block(*this);
4834  }
4835 
4836 
4838  : bablock(bablock) { set_parent_in_children(); }
4839 
4840 
4841  AfterBlock::AfterBlock(std::shared_ptr<BABlock> bablock)
4842  : bablock(bablock) { set_parent_in_children(); }
4843 
4844 
4845  /// copy constructor implementation
4847  /// pointer member must be reseted with the new copy
4848  if (obj.bablock) {
4849  this->bablock.reset(obj.bablock->clone());
4850  }
4851 
4852  /// if there is a token, make copy
4853  if (obj.token) {
4854  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4855  }
4856 
4857  /// set parents
4859  }
4860 
4861 
4862  /// set this parent in the children
4864 
4865  /// optional member could be nullptr
4866  if (bablock) {
4867  bablock->set_parent(this);
4868  }
4869 
4870  }
4871 
4872 
4873 
4874  void AfterBlock::set_bablock(std::shared_ptr<BABlock>&& bablock) {
4875  this->bablock = bablock;
4876  // set parents
4877  if (bablock) {
4878  bablock->set_parent(this);
4879  }
4880  }
4881 
4882  void AfterBlock::set_bablock(const std::shared_ptr<BABlock>& bablock) {
4883  this->bablock = bablock;
4884  // set parents
4885  if (bablock) {
4886  bablock->set_parent(this);
4887  }
4888  }
4889 
4890 
4891 
4892  ///
4893  /// BABlock member functions definition
4894  ///
4895 
4896 
4897 
4898 
4899 
4900 
4901 
4902 
4904  /// use -> for pointer member
4905  type->accept(v);
4906  (void)v;
4907  /// use -> for pointer member
4908  statement_block->accept(v);
4909  (void)v;
4910  }
4911 
4913  /// use -> for pointer member
4914  type->accept(v);
4915  (void)v;
4916  /// use -> for pointer member
4917  statement_block->accept(v);
4918  (void)v;
4919  }
4920 
4922  v.visit_ba_block(*this);
4923  }
4924 
4926  v.visit_ba_block(*this);
4927  }
4928 
4929 
4931  : type(type), statement_block(statement_block) { set_parent_in_children(); }
4932 
4933 
4934  BABlock::BABlock(std::shared_ptr<BABlockType> type, std::shared_ptr<StatementBlock> statement_block)
4935  : type(type), statement_block(statement_block) { set_parent_in_children(); }
4936 
4937 
4938  /// copy constructor implementation
4940  /// pointer member must be reseted with the new copy
4941  if (obj.type) {
4942  this->type.reset(obj.type->clone());
4943  }
4944  /// pointer member must be reseted with the new copy
4945  if (obj.statement_block) {
4946  this->statement_block.reset(obj.statement_block->clone());
4947  }
4948 
4949  /// if there is a token, make copy
4950  if (obj.token) {
4951  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
4952  }
4953 
4954  /// set parents
4956  }
4957 
4958 
4959  /// set this parent in the children
4961 
4962  /// optional member could be nullptr
4963  if (type) {
4964  type->set_parent(this);
4965  }
4966  /// optional member could be nullptr
4967  if (statement_block) {
4968  statement_block->set_parent(this);
4969  }
4970 
4971  }
4972 
4973 
4974 
4975  void BABlock::set_type(std::shared_ptr<BABlockType>&& type) {
4976  this->type = type;
4977  // set parents
4978  if (type) {
4979  type->set_parent(this);
4980  }
4981  }
4982 
4983  void BABlock::set_type(const std::shared_ptr<BABlockType>& type) {
4984  this->type = type;
4985  // set parents
4986  if (type) {
4987  type->set_parent(this);
4988  }
4989  }
4990 
4991 
4992  void BABlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
4994  // set parents
4995  if (statement_block) {
4996  statement_block->set_parent(this);
4997  }
4998  }
4999 
5000  void BABlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5001  this->statement_block = statement_block;
5002  // set parents
5003  if (statement_block) {
5004  statement_block->set_parent(this);
5005  }
5006  }
5007 
5008 
5009 
5010  ///
5011  /// ForNetcon member functions definition
5012  ///
5013 
5014 
5015 
5016 
5017 
5018 
5019 
5020 
5022  /// visit each element of vector
5023  for (auto& item : this->parameters) {
5024  item->accept(v);
5025  }
5026  (void)v;
5027  /// use -> for pointer member
5028  statement_block->accept(v);
5029  (void)v;
5030  }
5031 
5033  /// visit each element of vector
5034  for (auto& item : this->parameters) {
5035  item->accept(v);
5036  }
5037  (void)v;
5038  /// use -> for pointer member
5039  statement_block->accept(v);
5040  (void)v;
5041  }
5042 
5044  v.visit_for_netcon(*this);
5045  }
5046 
5048  v.visit_for_netcon(*this);
5049  }
5050 
5051 
5052  ForNetcon::ForNetcon(const ArgumentVector& parameters, StatementBlock* statement_block)
5053  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
5054 
5055 
5056  ForNetcon::ForNetcon(const ArgumentVector& parameters, std::shared_ptr<StatementBlock> statement_block)
5057  : parameters(parameters), statement_block(statement_block) { set_parent_in_children(); }
5058 
5059 
5060  /// copy constructor implementation
5062  /// copy each element of vector
5063  for (auto& item : obj.parameters) {
5064  this->parameters.emplace_back(item->clone());
5065  }
5066  /// pointer member must be reseted with the new copy
5067  if (obj.statement_block) {
5068  this->statement_block.reset(obj.statement_block->clone());
5069  }
5070 
5071  /// if there is a token, make copy
5072  if (obj.token) {
5073  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5074  }
5075 
5076  /// set parents
5078  }
5079 
5080 
5081  /// set this parent in the children
5083 
5084  /// set parent for each element of the vector
5085  for (auto& item : parameters) {
5086  item->set_parent(this);
5087 
5088  }
5089  /// optional member could be nullptr
5090  if (statement_block) {
5091  statement_block->set_parent(this);
5092  }
5093 
5094  }
5095 
5096 
5097 
5099  this->parameters = parameters;
5100  // set parents
5101  for (auto& ii : parameters) {
5102  ii->set_parent(this);
5103  }
5104  }
5105 
5106  void ForNetcon::set_parameters(const ArgumentVector& parameters) {
5107  this->parameters = parameters;
5108  // set parents
5109  for (auto& ii : parameters) {
5110  ii->set_parent(this);
5111  }
5112  }
5113 
5114 
5115  void ForNetcon::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5117  // set parents
5118  if (statement_block) {
5119  statement_block->set_parent(this);
5120  }
5121  }
5122 
5123  void ForNetcon::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5124  this->statement_block = statement_block;
5125  // set parents
5126  if (statement_block) {
5127  statement_block->set_parent(this);
5128  }
5129  }
5130 
5131 
5132 
5133  ///
5134  /// KineticBlock member functions definition
5135  ///
5136 
5137 
5138 
5139  std::string KineticBlock::get_node_name() const {
5140  return name->get_node_name();
5141  }
5142 
5143 
5144 
5145 
5146 
5147 
5148 
5150  /// use -> for pointer member
5151  name->accept(v);
5152  (void)v;
5153  /// visit each element of vector
5154  for (auto& item : this->solvefor) {
5155  item->accept(v);
5156  }
5157  (void)v;
5158  /// use -> for pointer member
5159  statement_block->accept(v);
5160  (void)v;
5161  }
5162 
5164  /// use -> for pointer member
5165  name->accept(v);
5166  (void)v;
5167  /// visit each element of vector
5168  for (auto& item : this->solvefor) {
5169  item->accept(v);
5170  }
5171  (void)v;
5172  /// use -> for pointer member
5173  statement_block->accept(v);
5174  (void)v;
5175  }
5176 
5178  v.visit_kinetic_block(*this);
5179  }
5180 
5182  v.visit_kinetic_block(*this);
5183  }
5184 
5185 
5186  KineticBlock::KineticBlock(Name* name, const NameVector& solvefor, StatementBlock* statement_block)
5187  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
5188 
5189 
5190  KineticBlock::KineticBlock(std::shared_ptr<Name> name, const NameVector& solvefor, std::shared_ptr<StatementBlock> statement_block)
5191  : name(name), solvefor(solvefor), statement_block(statement_block) { set_parent_in_children(); }
5192 
5193 
5194  /// copy constructor implementation
5196  /// pointer member must be reseted with the new copy
5197  if (obj.name) {
5198  this->name.reset(obj.name->clone());
5199  }
5200  /// copy each element of vector
5201  for (auto& item : obj.solvefor) {
5202  this->solvefor.emplace_back(item->clone());
5203  }
5204  /// pointer member must be reseted with the new copy
5205  if (obj.statement_block) {
5206  this->statement_block.reset(obj.statement_block->clone());
5207  }
5208 
5209  /// if there is a token, make copy
5210  if (obj.token) {
5211  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5212  }
5213 
5214  /// set parents
5216  }
5217 
5218 
5219  /// set this parent in the children
5221 
5222  /// optional member could be nullptr
5223  if (name) {
5224  name->set_parent(this);
5225  }
5226  /// set parent for each element of the vector
5227  for (auto& item : solvefor) {
5228  item->set_parent(this);
5229 
5230  }
5231  /// optional member could be nullptr
5232  if (statement_block) {
5233  statement_block->set_parent(this);
5234  }
5235 
5236  }
5237 
5238 
5239 
5240  void KineticBlock::set_name(std::shared_ptr<Name>&& name) {
5241  this->name = name;
5242  // set parents
5243  if (name) {
5244  name->set_parent(this);
5245  }
5246  }
5247 
5248  void KineticBlock::set_name(const std::shared_ptr<Name>& name) {
5249  this->name = name;
5250  // set parents
5251  if (name) {
5252  name->set_parent(this);
5253  }
5254  }
5255 
5256 
5258  this->solvefor = solvefor;
5259  // set parents
5260  for (auto& ii : solvefor) {
5261  ii->set_parent(this);
5262  }
5263  }
5264 
5265  void KineticBlock::set_solvefor(const NameVector& solvefor) {
5266  this->solvefor = solvefor;
5267  // set parents
5268  for (auto& ii : solvefor) {
5269  ii->set_parent(this);
5270  }
5271  }
5272 
5273 
5274  void KineticBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5276  // set parents
5277  if (statement_block) {
5278  statement_block->set_parent(this);
5279  }
5280  }
5281 
5282  void KineticBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5283  this->statement_block = statement_block;
5284  // set parents
5285  if (statement_block) {
5286  statement_block->set_parent(this);
5287  }
5288  }
5289 
5290 
5291 
5292  ///
5293  /// UnitBlock member functions definition
5294  ///
5295 
5296 
5297 
5298 
5299 
5301  /// visit each element of vector
5302  for (auto& item : this->definitions) {
5303  item->accept(v);
5304  }
5305  (void)v;
5306  }
5307 
5309  /// visit each element of vector
5310  for (auto& item : this->definitions) {
5311  item->accept(v);
5312  }
5313  (void)v;
5314  }
5315 
5317  v.visit_unit_block(*this);
5318  }
5319 
5321  v.visit_unit_block(*this);
5322  }
5323 
5324 
5326  : definitions(definitions) { set_parent_in_children(); }
5327 
5328 
5329 
5330  /// copy constructor implementation
5332  /// copy each element of vector
5333  for (auto& item : obj.definitions) {
5334  this->definitions.emplace_back(item->clone());
5335  }
5336 
5337  /// if there is a token, make copy
5338  if (obj.token) {
5339  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5340  }
5341 
5342  /// set parents
5344  }
5345 
5346 
5347  /// set this parent in the children
5349 
5350  /// set parent for each element of the vector
5351  for (auto& item : definitions) {
5352  item->set_parent(this);
5353 
5354  }
5355 
5356  }
5357 
5358 
5359 
5361  this->definitions = definitions;
5362  // set parents
5363  for (auto& ii : definitions) {
5364  ii->set_parent(this);
5365  }
5366  }
5367 
5369  this->definitions = definitions;
5370  // set parents
5371  for (auto& ii : definitions) {
5372  ii->set_parent(this);
5373  }
5374  }
5375 
5376 
5377 
5378  ///
5379  /// ConstantBlock member functions definition
5380  ///
5381 
5382 
5383 
5384 
5385 
5387  /// visit each element of vector
5388  for (auto& item : this->statements) {
5389  item->accept(v);
5390  }
5391  (void)v;
5392  }
5393 
5395  /// visit each element of vector
5396  for (auto& item : this->statements) {
5397  item->accept(v);
5398  }
5399  (void)v;
5400  }
5401 
5403  v.visit_constant_block(*this);
5404  }
5405 
5407  v.visit_constant_block(*this);
5408  }
5409 
5410 
5412  : statements(statements) { set_parent_in_children(); }
5413 
5414 
5415 
5416  /// copy constructor implementation
5418  /// copy each element of vector
5419  for (auto& item : obj.statements) {
5420  this->statements.emplace_back(item->clone());
5421  }
5422 
5423  /// if there is a token, make copy
5424  if (obj.token) {
5425  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5426  }
5427 
5428  /// set parents
5430  }
5431 
5432 
5433  /// set this parent in the children
5435 
5436  /// set parent for each element of the vector
5437  for (auto& item : statements) {
5438  item->set_parent(this);
5439 
5440  }
5441 
5442  }
5443 
5444 
5445 
5447  this->statements = statements;
5448  // set parents
5449  for (auto& ii : statements) {
5450  ii->set_parent(this);
5451  }
5452  }
5453 
5455  this->statements = statements;
5456  // set parents
5457  for (auto& ii : statements) {
5458  ii->set_parent(this);
5459  }
5460  }
5461 
5462 
5463 
5464  ///
5465  /// NeuronBlock member functions definition
5466  ///
5467 
5468 
5469 
5470 
5471 
5473  /// use -> for pointer member
5474  statement_block->accept(v);
5475  (void)v;
5476  }
5477 
5479  /// use -> for pointer member
5480  statement_block->accept(v);
5481  (void)v;
5482  }
5483 
5485  v.visit_neuron_block(*this);
5486  }
5487 
5489  v.visit_neuron_block(*this);
5490  }
5491 
5492 
5494  : statement_block(statement_block) { set_parent_in_children(); }
5495 
5496 
5497  NeuronBlock::NeuronBlock(std::shared_ptr<StatementBlock> statement_block)
5498  : statement_block(statement_block) { set_parent_in_children(); }
5499 
5500 
5501  /// copy constructor implementation
5503  /// pointer member must be reseted with the new copy
5504  if (obj.statement_block) {
5505  this->statement_block.reset(obj.statement_block->clone());
5506  }
5507 
5508  /// if there is a token, make copy
5509  if (obj.token) {
5510  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5511  }
5512 
5513  /// set parents
5515  }
5516 
5517 
5518  /// set this parent in the children
5520 
5521  /// optional member could be nullptr
5522  if (statement_block) {
5523  statement_block->set_parent(this);
5524  }
5525 
5526  }
5527 
5528 
5529 
5530  void NeuronBlock::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
5532  // set parents
5533  if (statement_block) {
5534  statement_block->set_parent(this);
5535  }
5536  }
5537 
5538  void NeuronBlock::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
5539  this->statement_block = statement_block;
5540  // set parents
5541  if (statement_block) {
5542  statement_block->set_parent(this);
5543  }
5544  }
5545 
5546 
5547 
5548  ///
5549  /// Unit member functions definition
5550  ///
5551 
5552 
5553 
5554  std::string Unit::get_node_name() const {
5555  return name->eval();
5556  }
5557 
5559  /// use -> for pointer member
5560  name->accept(v);
5561  (void)v;
5562  }
5563 
5565  /// use -> for pointer member
5566  name->accept(v);
5567  (void)v;
5568  }
5569 
5571  v.visit_unit(*this);
5572  }
5573 
5575  v.visit_unit(*this);
5576  }
5577 
5578 
5580  : name(name) { set_parent_in_children(); }
5581 
5582 
5583  Unit::Unit(std::shared_ptr<String> name)
5584  : name(name) { set_parent_in_children(); }
5585 
5586 
5587  /// copy constructor implementation
5588  Unit::Unit(const Unit& obj) {
5589  /// pointer member must be reseted with the new copy
5590  if (obj.name) {
5591  this->name.reset(obj.name->clone());
5592  }
5593 
5594  /// if there is a token, make copy
5595  if (obj.token) {
5596  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5597  }
5598 
5599  /// set parents
5601  }
5602 
5603 
5604  /// set this parent in the children
5606 
5607  /// optional member could be nullptr
5608  if (name) {
5609  name->set_parent(this);
5610  }
5611 
5612  }
5613 
5614 
5615 
5616  void Unit::set_name(std::shared_ptr<String>&& name) {
5617  this->name = name;
5618  // set parents
5619  if (name) {
5620  name->set_parent(this);
5621  }
5622  }
5623 
5624  void Unit::set_name(const std::shared_ptr<String>& name) {
5625  this->name = name;
5626  // set parents
5627  if (name) {
5628  name->set_parent(this);
5629  }
5630  }
5631 
5632 
5633 
5634  ///
5635  /// DoubleUnit member functions definition
5636  ///
5637 
5638 
5639 
5640 
5641 
5642 
5643 
5644 
5646  /// use -> for pointer member
5647  value->accept(v);
5648  (void)v;
5649  /// optional member could be nullptr
5650  if (this->unit) {
5651  this->unit->accept(v);
5652  }
5653  (void)v;
5654  }
5655 
5657  /// use -> for pointer member
5658  value->accept(v);
5659  (void)v;
5660  /// optional member could be nullptr
5661  if (this->unit) {
5662  this->unit->accept(v);
5663  }
5664  (void)v;
5665  }
5666 
5668  v.visit_double_unit(*this);
5669  }
5670 
5672  v.visit_double_unit(*this);
5673  }
5674 
5675 
5678 
5679 
5680  DoubleUnit::DoubleUnit(std::shared_ptr<Double> value, std::shared_ptr<Unit> unit)
5682 
5683 
5684  /// copy constructor implementation
5686  /// pointer member must be reseted with the new copy
5687  if (obj.value) {
5688  this->value.reset(obj.value->clone());
5689  }
5690  /// pointer member must be reseted with the new copy
5691  if (obj.unit) {
5692  this->unit.reset(obj.unit->clone());
5693  }
5694 
5695  /// if there is a token, make copy
5696  if (obj.token) {
5697  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5698  }
5699 
5700  /// set parents
5702  }
5703 
5704 
5705  /// set this parent in the children
5707 
5708  /// optional member could be nullptr
5709  if (value) {
5710  value->set_parent(this);
5711  }
5712  /// optional member could be nullptr
5713  if (unit) {
5714  unit->set_parent(this);
5715  }
5716 
5717  }
5718 
5719 
5720 
5721  void DoubleUnit::set_value(std::shared_ptr<Double>&& value) {
5722  this->value = value;
5723  // set parents
5724  if (value) {
5725  value->set_parent(this);
5726  }
5727  }
5728 
5729  void DoubleUnit::set_value(const std::shared_ptr<Double>& value) {
5730  this->value = value;
5731  // set parents
5732  if (value) {
5733  value->set_parent(this);
5734  }
5735  }
5736 
5737 
5738  void DoubleUnit::set_unit(std::shared_ptr<Unit>&& unit) {
5739  this->unit = unit;
5740  // set parents
5741  if (unit) {
5742  unit->set_parent(this);
5743  }
5744  }
5745 
5746  void DoubleUnit::set_unit(const std::shared_ptr<Unit>& unit) {
5747  this->unit = unit;
5748  // set parents
5749  if (unit) {
5750  unit->set_parent(this);
5751  }
5752  }
5753 
5754 
5755 
5756  ///
5757  /// LocalVar member functions definition
5758  ///
5759 
5760 
5761 
5762  std::string LocalVar::get_node_name() const {
5763  return name->get_node_name();
5764  }
5765 
5767  /// use -> for pointer member
5768  name->accept(v);
5769  (void)v;
5770  }
5771 
5773  /// use -> for pointer member
5774  name->accept(v);
5775  (void)v;
5776  }
5777 
5779  v.visit_local_var(*this);
5780  }
5781 
5783  v.visit_local_var(*this);
5784  }
5785 
5786 
5788  : name(name) { set_parent_in_children(); }
5789 
5790 
5791  LocalVar::LocalVar(std::shared_ptr<Identifier> name)
5792  : name(name) { set_parent_in_children(); }
5793 
5794 
5795  /// copy constructor implementation
5797  /// pointer member must be reseted with the new copy
5798  if (obj.name) {
5799  this->name.reset(obj.name->clone());
5800  }
5801 
5802  /// if there is a token, make copy
5803  if (obj.token) {
5804  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5805  }
5806 
5807  /// set parents
5809  }
5810 
5811 
5812  /// set this parent in the children
5814 
5815  /// optional member could be nullptr
5816  if (name) {
5817  name->set_parent(this);
5818  }
5819 
5820  }
5821 
5822 
5823 
5824  void LocalVar::set_name(std::shared_ptr<Identifier>&& name) {
5825  this->name = name;
5826  // set parents
5827  if (name) {
5828  name->set_parent(this);
5829  }
5830  }
5831 
5832  void LocalVar::set_name(const std::shared_ptr<Identifier>& name) {
5833  this->name = name;
5834  // set parents
5835  if (name) {
5836  name->set_parent(this);
5837  }
5838  }
5839 
5840 
5841 
5842  ///
5843  /// Limits member functions definition
5844  ///
5845 
5846 
5847 
5848 
5849 
5850 
5851 
5852 
5854  /// use -> for pointer member
5855  min->accept(v);
5856  (void)v;
5857  /// use -> for pointer member
5858  max->accept(v);
5859  (void)v;
5860  }
5861 
5863  /// use -> for pointer member
5864  min->accept(v);
5865  (void)v;
5866  /// use -> for pointer member
5867  max->accept(v);
5868  (void)v;
5869  }
5870 
5872  v.visit_limits(*this);
5873  }
5874 
5876  v.visit_limits(*this);
5877  }
5878 
5879 
5881  : min(min), max(max) { set_parent_in_children(); }
5882 
5883 
5884  Limits::Limits(std::shared_ptr<Number> min, std::shared_ptr<Number> max)
5885  : min(min), max(max) { set_parent_in_children(); }
5886 
5887 
5888  /// copy constructor implementation
5889  Limits::Limits(const Limits& obj) {
5890  /// pointer member must be reseted with the new copy
5891  if (obj.min) {
5892  this->min.reset(obj.min->clone());
5893  }
5894  /// pointer member must be reseted with the new copy
5895  if (obj.max) {
5896  this->max.reset(obj.max->clone());
5897  }
5898 
5899  /// if there is a token, make copy
5900  if (obj.token) {
5901  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
5902  }
5903 
5904  /// set parents
5906  }
5907 
5908 
5909  /// set this parent in the children
5911 
5912  /// optional member could be nullptr
5913  if (min) {
5914  min->set_parent(this);
5915  }
5916  /// optional member could be nullptr
5917  if (max) {
5918  max->set_parent(this);
5919  }
5920 
5921  }
5922 
5923 
5924 
5925  void Limits::set_min(std::shared_ptr<Number>&& min) {
5926  this->min = min;
5927  // set parents
5928  if (min) {
5929  min->set_parent(this);
5930  }
5931  }
5932 
5933  void Limits::set_min(const std::shared_ptr<Number>& min) {
5934  this->min = min;
5935  // set parents
5936  if (min) {
5937  min->set_parent(this);
5938  }
5939  }
5940 
5941 
5942  void Limits::set_max(std::shared_ptr<Number>&& max) {
5943  this->max = max;
5944  // set parents
5945  if (max) {
5946  max->set_parent(this);
5947  }
5948  }
5949 
5950  void Limits::set_max(const std::shared_ptr<Number>& max) {
5951  this->max = max;
5952  // set parents
5953  if (max) {
5954  max->set_parent(this);
5955  }
5956  }
5957 
5958 
5959 
5960  ///
5961  /// NumberRange member functions definition
5962  ///
5963 
5964 
5965 
5966 
5967 
5968 
5969 
5970 
5972  /// use -> for pointer member
5973  min->accept(v);
5974  (void)v;
5975  /// use -> for pointer member
5976  max->accept(v);
5977  (void)v;
5978  }
5979 
5981  /// use -> for pointer member
5982  min->accept(v);
5983  (void)v;
5984  /// use -> for pointer member
5985  max->accept(v);
5986  (void)v;
5987  }
5988 
5990  v.visit_number_range(*this);
5991  }
5992 
5994  v.visit_number_range(*this);
5995  }
5996 
5997 
5999  : min(min), max(max) { set_parent_in_children(); }
6000 
6001 
6002  NumberRange::NumberRange(std::shared_ptr<Number> min, std::shared_ptr<Number> max)
6003  : min(min), max(max) { set_parent_in_children(); }
6004 
6005 
6006  /// copy constructor implementation
6008  /// pointer member must be reseted with the new copy
6009  if (obj.min) {
6010  this->min.reset(obj.min->clone());
6011  }
6012  /// pointer member must be reseted with the new copy
6013  if (obj.max) {
6014  this->max.reset(obj.max->clone());
6015  }
6016 
6017  /// if there is a token, make copy
6018  if (obj.token) {
6019  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6020  }
6021 
6022  /// set parents
6024  }
6025 
6026 
6027  /// set this parent in the children
6029 
6030  /// optional member could be nullptr
6031  if (min) {
6032  min->set_parent(this);
6033  }
6034  /// optional member could be nullptr
6035  if (max) {
6036  max->set_parent(this);
6037  }
6038 
6039  }
6040 
6041 
6042 
6043  void NumberRange::set_min(std::shared_ptr<Number>&& min) {
6044  this->min = min;
6045  // set parents
6046  if (min) {
6047  min->set_parent(this);
6048  }
6049  }
6050 
6051  void NumberRange::set_min(const std::shared_ptr<Number>& min) {
6052  this->min = min;
6053  // set parents
6054  if (min) {
6055  min->set_parent(this);
6056  }
6057  }
6058 
6059 
6060  void NumberRange::set_max(std::shared_ptr<Number>&& max) {
6061  this->max = max;
6062  // set parents
6063  if (max) {
6064  max->set_parent(this);
6065  }
6066  }
6067 
6068  void NumberRange::set_max(const std::shared_ptr<Number>& max) {
6069  this->max = max;
6070  // set parents
6071  if (max) {
6072  max->set_parent(this);
6073  }
6074  }
6075 
6076 
6077 
6078  ///
6079  /// ConstantVar member functions definition
6080  ///
6081 
6082 
6083 
6084  std::string ConstantVar::get_node_name() const {
6085  return name->get_node_name();
6086  }
6087 
6088 
6089 
6090 
6091 
6092 
6093 
6095  /// use -> for pointer member
6096  name->accept(v);
6097  (void)v;
6098  /// use -> for pointer member
6099  value->accept(v);
6100  (void)v;
6101  /// optional member could be nullptr
6102  if (this->unit) {
6103  this->unit->accept(v);
6104  }
6105  (void)v;
6106  }
6107 
6109  /// use -> for pointer member
6110  name->accept(v);
6111  (void)v;
6112  /// use -> for pointer member
6113  value->accept(v);
6114  (void)v;
6115  /// optional member could be nullptr
6116  if (this->unit) {
6117  this->unit->accept(v);
6118  }
6119  (void)v;
6120  }
6121 
6123  v.visit_constant_var(*this);
6124  }
6125 
6127  v.visit_constant_var(*this);
6128  }
6129 
6130 
6133 
6134 
6135  ConstantVar::ConstantVar(std::shared_ptr<Name> name, std::shared_ptr<Number> value, std::shared_ptr<Unit> unit)
6137 
6138 
6139  /// copy constructor implementation
6141  /// pointer member must be reseted with the new copy
6142  if (obj.name) {
6143  this->name.reset(obj.name->clone());
6144  }
6145  /// pointer member must be reseted with the new copy
6146  if (obj.value) {
6147  this->value.reset(obj.value->clone());
6148  }
6149  /// pointer member must be reseted with the new copy
6150  if (obj.unit) {
6151  this->unit.reset(obj.unit->clone());
6152  }
6153 
6154  /// if there is a token, make copy
6155  if (obj.token) {
6156  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6157  }
6158 
6159  /// set parents
6161  }
6162 
6163 
6164  /// set this parent in the children
6166 
6167  /// optional member could be nullptr
6168  if (name) {
6169  name->set_parent(this);
6170  }
6171  /// optional member could be nullptr
6172  if (value) {
6173  value->set_parent(this);
6174  }
6175  /// optional member could be nullptr
6176  if (unit) {
6177  unit->set_parent(this);
6178  }
6179 
6180  }
6181 
6182 
6183 
6184  void ConstantVar::set_name(std::shared_ptr<Name>&& name) {
6185  this->name = name;
6186  // set parents
6187  if (name) {
6188  name->set_parent(this);
6189  }
6190  }
6191 
6192  void ConstantVar::set_name(const std::shared_ptr<Name>& name) {
6193  this->name = name;
6194  // set parents
6195  if (name) {
6196  name->set_parent(this);
6197  }
6198  }
6199 
6200 
6201  void ConstantVar::set_value(std::shared_ptr<Number>&& value) {
6202  this->value = value;
6203  // set parents
6204  if (value) {
6205  value->set_parent(this);
6206  }
6207  }
6208 
6209  void ConstantVar::set_value(const std::shared_ptr<Number>& value) {
6210  this->value = value;
6211  // set parents
6212  if (value) {
6213  value->set_parent(this);
6214  }
6215  }
6216 
6217 
6218  void ConstantVar::set_unit(std::shared_ptr<Unit>&& unit) {
6219  this->unit = unit;
6220  // set parents
6221  if (unit) {
6222  unit->set_parent(this);
6223  }
6224  }
6225 
6226  void ConstantVar::set_unit(const std::shared_ptr<Unit>& unit) {
6227  this->unit = unit;
6228  // set parents
6229  if (unit) {
6230  unit->set_parent(this);
6231  }
6232  }
6233 
6234 
6235 
6236  ///
6237  /// BinaryOperator member functions definition
6238  ///
6239 
6240 
6241 
6242 
6243 
6245  }
6246 
6248  }
6249 
6251  v.visit_binary_operator(*this);
6252  }
6253 
6255  v.visit_binary_operator(*this);
6256  }
6257 
6258 
6261 
6262 
6263 
6264  /// copy constructor implementation
6266  /// object member can be just copied by value
6267  this->value = obj.value;
6268 
6269  /// if there is a token, make copy
6270  if (obj.token) {
6271  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6272  }
6273 
6274  /// set parents
6276  }
6277 
6278 
6279  /// set this parent in the children
6281 
6282 
6283  }
6284 
6285 
6286 
6288  // why don't we use a coding convention instead of this workaround for
6289  // variable shadowing?
6290  this->value = value;
6291  }
6292 
6293 
6294 
6295  ///
6296  /// UnaryOperator member functions definition
6297  ///
6298 
6299 
6300 
6301 
6302 
6304  }
6305 
6307  }
6308 
6310  v.visit_unary_operator(*this);
6311  }
6312 
6314  v.visit_unary_operator(*this);
6315  }
6316 
6317 
6320 
6321 
6322 
6323  /// copy constructor implementation
6325  /// object member can be just copied by value
6326  this->value = obj.value;
6327 
6328  /// if there is a token, make copy
6329  if (obj.token) {
6330  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6331  }
6332 
6333  /// set parents
6335  }
6336 
6337 
6338  /// set this parent in the children
6340 
6341 
6342  }
6343 
6344 
6345 
6347  // why don't we use a coding convention instead of this workaround for
6348  // variable shadowing?
6349  this->value = value;
6350  }
6351 
6352 
6353 
6354  ///
6355  /// ReactionOperator member functions definition
6356  ///
6357 
6358 
6359 
6360 
6361 
6363  }
6364 
6366  }
6367 
6369  v.visit_reaction_operator(*this);
6370  }
6371 
6373  v.visit_reaction_operator(*this);
6374  }
6375 
6376 
6379 
6380 
6381 
6382  /// copy constructor implementation
6384  /// object member can be just copied by value
6385  this->value = obj.value;
6386 
6387  /// if there is a token, make copy
6388  if (obj.token) {
6389  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6390  }
6391 
6392  /// set parents
6394  }
6395 
6396 
6397  /// set this parent in the children
6399 
6400 
6401  }
6402 
6403 
6404 
6406  // why don't we use a coding convention instead of this workaround for
6407  // variable shadowing?
6408  this->value = value;
6409  }
6410 
6411 
6412 
6413  ///
6414  /// ParenExpression member functions definition
6415  ///
6416 
6417 
6418 
6419 
6420 
6422  /// use -> for pointer member
6423  expression->accept(v);
6424  (void)v;
6425  }
6426 
6428  /// use -> for pointer member
6429  expression->accept(v);
6430  (void)v;
6431  }
6432 
6434  v.visit_paren_expression(*this);
6435  }
6436 
6438  v.visit_paren_expression(*this);
6439  }
6440 
6441 
6443  : expression(expression) { set_parent_in_children(); }
6444 
6445 
6446  ParenExpression::ParenExpression(std::shared_ptr<Expression> expression)
6447  : expression(expression) { set_parent_in_children(); }
6448 
6449 
6450  /// copy constructor implementation
6452  /// pointer member must be reseted with the new copy
6453  if (obj.expression) {
6454  this->expression.reset(obj.expression->clone());
6455  }
6456 
6457  /// if there is a token, make copy
6458  if (obj.token) {
6459  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6460  }
6461 
6462  /// set parents
6464  }
6465 
6466 
6467  /// set this parent in the children
6469 
6470  /// optional member could be nullptr
6471  if (expression) {
6472  expression->set_parent(this);
6473  }
6474 
6475  }
6476 
6477 
6478 
6479  void ParenExpression::set_expression(std::shared_ptr<Expression>&& expression) {
6480  this->expression = expression;
6481  // set parents
6482  if (expression) {
6483  expression->set_parent(this);
6484  }
6485  }
6486 
6487  void ParenExpression::set_expression(const std::shared_ptr<Expression>& expression) {
6488  this->expression = expression;
6489  // set parents
6490  if (expression) {
6491  expression->set_parent(this);
6492  }
6493  }
6494 
6495 
6496 
6497  ///
6498  /// BinaryExpression member functions definition
6499  ///
6500 
6501 
6502 
6503 
6504 
6505 
6506 
6507 
6508 
6509 
6510 
6512  /// use -> for pointer member
6513  lhs->accept(v);
6514  (void)v;
6515  /// use . for object member
6516  op.accept(v);
6517  (void)v;
6518  /// use -> for pointer member
6519  rhs->accept(v);
6520  (void)v;
6521  }
6522 
6524  /// use -> for pointer member
6525  lhs->accept(v);
6526  (void)v;
6527  /// use . for object member
6528  op.accept(v);
6529  (void)v;
6530  /// use -> for pointer member
6531  rhs->accept(v);
6532  (void)v;
6533  }
6534 
6536  v.visit_binary_expression(*this);
6537  }
6538 
6540  v.visit_binary_expression(*this);
6541  }
6542 
6543 
6545  : lhs(lhs), op(op), rhs(rhs) { set_parent_in_children(); }
6546 
6547 
6548  BinaryExpression::BinaryExpression(std::shared_ptr<Expression> lhs, const BinaryOperator& op, std::shared_ptr<Expression> rhs)
6549  : lhs(lhs), op(op), rhs(rhs) { set_parent_in_children(); }
6550 
6551 
6552  /// copy constructor implementation
6554  /// pointer member must be reseted with the new copy
6555  if (obj.lhs) {
6556  this->lhs.reset(obj.lhs->clone());
6557  }
6558  /// object member can be just copied by value
6559  this->op = obj.op;
6560  /// pointer member must be reseted with the new copy
6561  if (obj.rhs) {
6562  this->rhs.reset(obj.rhs->clone());
6563  }
6564 
6565  /// if there is a token, make copy
6566  if (obj.token) {
6567  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6568  }
6569 
6570  /// set parents
6572  }
6573 
6574 
6575  /// set this parent in the children
6577 
6578  /// optional member could be nullptr
6579  if (lhs) {
6580  lhs->set_parent(this);
6581  }
6582  op.set_parent(this);
6583  /// optional member could be nullptr
6584  if (rhs) {
6585  rhs->set_parent(this);
6586  }
6587 
6588  }
6589 
6590 
6591 
6592  void BinaryExpression::set_lhs(std::shared_ptr<Expression>&& lhs) {
6593  this->lhs = lhs;
6594  // set parents
6595  if (lhs) {
6596  lhs->set_parent(this);
6597  }
6598  }
6599 
6600  void BinaryExpression::set_lhs(const std::shared_ptr<Expression>& lhs) {
6601  this->lhs = lhs;
6602  // set parents
6603  if (lhs) {
6604  lhs->set_parent(this);
6605  }
6606  }
6607 
6608 
6610  this->op = op;
6611  }
6612 
6614  this->op = op;
6615  }
6616 
6617 
6618  void BinaryExpression::set_rhs(std::shared_ptr<Expression>&& rhs) {
6619  this->rhs = rhs;
6620  // set parents
6621  if (rhs) {
6622  rhs->set_parent(this);
6623  }
6624  }
6625 
6626  void BinaryExpression::set_rhs(const std::shared_ptr<Expression>& rhs) {
6627  this->rhs = rhs;
6628  // set parents
6629  if (rhs) {
6630  rhs->set_parent(this);
6631  }
6632  }
6633 
6634 
6635 
6636  ///
6637  /// DiffEqExpression member functions definition
6638  ///
6639 
6640 
6641 
6642 
6643 
6645  /// use -> for pointer member
6646  expression->accept(v);
6647  (void)v;
6648  }
6649 
6651  /// use -> for pointer member
6652  expression->accept(v);
6653  (void)v;
6654  }
6655 
6657  v.visit_diff_eq_expression(*this);
6658  }
6659 
6661  v.visit_diff_eq_expression(*this);
6662  }
6663 
6664 
6666  : expression(expression) { set_parent_in_children(); }
6667 
6668 
6669  DiffEqExpression::DiffEqExpression(std::shared_ptr<BinaryExpression> expression)
6670  : expression(expression) { set_parent_in_children(); }
6671 
6672 
6673  /// copy constructor implementation
6675  /// pointer member must be reseted with the new copy
6676  if (obj.expression) {
6677  this->expression.reset(obj.expression->clone());
6678  }
6679 
6680  /// if there is a token, make copy
6681  if (obj.token) {
6682  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6683  }
6684 
6685  /// set parents
6687  }
6688 
6689 
6690  /// set this parent in the children
6692 
6693  /// optional member could be nullptr
6694  if (expression) {
6695  expression->set_parent(this);
6696  }
6697 
6698  }
6699 
6700 
6701 
6702  void DiffEqExpression::set_expression(std::shared_ptr<BinaryExpression>&& expression) {
6703  this->expression = expression;
6704  // set parents
6705  if (expression) {
6706  expression->set_parent(this);
6707  }
6708  }
6709 
6710  void DiffEqExpression::set_expression(const std::shared_ptr<BinaryExpression>& expression) {
6711  this->expression = expression;
6712  // set parents
6713  if (expression) {
6714  expression->set_parent(this);
6715  }
6716  }
6717 
6718 
6719 
6720  ///
6721  /// UnaryExpression member functions definition
6722  ///
6723 
6724 
6725 
6726 
6727 
6728 
6729 
6730 
6732  /// use . for object member
6733  op.accept(v);
6734  (void)v;
6735  /// use -> for pointer member
6736  expression->accept(v);
6737  (void)v;
6738  }
6739 
6741  /// use . for object member
6742  op.accept(v);
6743  (void)v;
6744  /// use -> for pointer member
6745  expression->accept(v);
6746  (void)v;
6747  }
6748 
6750  v.visit_unary_expression(*this);
6751  }
6752 
6754  v.visit_unary_expression(*this);
6755  }
6756 
6757 
6759  : op(op), expression(expression) { set_parent_in_children(); }
6760 
6761 
6762  UnaryExpression::UnaryExpression(const UnaryOperator& op, std::shared_ptr<Expression> expression)
6763  : op(op), expression(expression) { set_parent_in_children(); }
6764 
6765 
6766  /// copy constructor implementation
6768  /// object member can be just copied by value
6769  this->op = obj.op;
6770  /// pointer member must be reseted with the new copy
6771  if (obj.expression) {
6772  this->expression.reset(obj.expression->clone());
6773  }
6774 
6775  /// if there is a token, make copy
6776  if (obj.token) {
6777  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6778  }
6779 
6780  /// set parents
6782  }
6783 
6784 
6785  /// set this parent in the children
6787 
6788  op.set_parent(this);
6789  /// optional member could be nullptr
6790  if (expression) {
6791  expression->set_parent(this);
6792  }
6793 
6794  }
6795 
6796 
6797 
6799  this->op = op;
6800  }
6801 
6803  this->op = op;
6804  }
6805 
6806 
6807  void UnaryExpression::set_expression(std::shared_ptr<Expression>&& expression) {
6808  this->expression = expression;
6809  // set parents
6810  if (expression) {
6811  expression->set_parent(this);
6812  }
6813  }
6814 
6815  void UnaryExpression::set_expression(const std::shared_ptr<Expression>& expression) {
6816  this->expression = expression;
6817  // set parents
6818  if (expression) {
6819  expression->set_parent(this);
6820  }
6821  }
6822 
6823 
6824 
6825  ///
6826  /// NonLinEquation member functions definition
6827  ///
6828 
6829 
6830 
6831 
6832 
6833 
6834 
6835 
6837  /// use -> for pointer member
6838  lhs->accept(v);
6839  (void)v;
6840  /// use -> for pointer member
6841  rhs->accept(v);
6842  (void)v;
6843  }
6844 
6846  /// use -> for pointer member
6847  lhs->accept(v);
6848  (void)v;
6849  /// use -> for pointer member
6850  rhs->accept(v);
6851  (void)v;
6852  }
6853 
6855  v.visit_non_lin_equation(*this);
6856  }
6857 
6859  v.visit_non_lin_equation(*this);
6860  }
6861 
6862 
6864  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6865 
6866 
6867  NonLinEquation::NonLinEquation(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs)
6868  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6869 
6870 
6871  /// copy constructor implementation
6873  /// pointer member must be reseted with the new copy
6874  if (obj.lhs) {
6875  this->lhs.reset(obj.lhs->clone());
6876  }
6877  /// pointer member must be reseted with the new copy
6878  if (obj.rhs) {
6879  this->rhs.reset(obj.rhs->clone());
6880  }
6881 
6882  /// if there is a token, make copy
6883  if (obj.token) {
6884  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
6885  }
6886 
6887  /// set parents
6889  }
6890 
6891 
6892  /// set this parent in the children
6894 
6895  /// optional member could be nullptr
6896  if (lhs) {
6897  lhs->set_parent(this);
6898  }
6899  /// optional member could be nullptr
6900  if (rhs) {
6901  rhs->set_parent(this);
6902  }
6903 
6904  }
6905 
6906 
6907 
6908  void NonLinEquation::set_lhs(std::shared_ptr<Expression>&& lhs) {
6909  this->lhs = lhs;
6910  // set parents
6911  if (lhs) {
6912  lhs->set_parent(this);
6913  }
6914  }
6915 
6916  void NonLinEquation::set_lhs(const std::shared_ptr<Expression>& lhs) {
6917  this->lhs = lhs;
6918  // set parents
6919  if (lhs) {
6920  lhs->set_parent(this);
6921  }
6922  }
6923 
6924 
6925  void NonLinEquation::set_rhs(std::shared_ptr<Expression>&& rhs) {
6926  this->rhs = rhs;
6927  // set parents
6928  if (rhs) {
6929  rhs->set_parent(this);
6930  }
6931  }
6932 
6933  void NonLinEquation::set_rhs(const std::shared_ptr<Expression>& rhs) {
6934  this->rhs = rhs;
6935  // set parents
6936  if (rhs) {
6937  rhs->set_parent(this);
6938  }
6939  }
6940 
6941 
6942 
6943  ///
6944  /// LinEquation member functions definition
6945  ///
6946 
6947 
6948 
6949 
6950 
6951 
6952 
6953 
6955  /// use -> for pointer member
6956  lhs->accept(v);
6957  (void)v;
6958  /// use -> for pointer member
6959  rhs->accept(v);
6960  (void)v;
6961  }
6962 
6964  /// use -> for pointer member
6965  lhs->accept(v);
6966  (void)v;
6967  /// use -> for pointer member
6968  rhs->accept(v);
6969  (void)v;
6970  }
6971 
6973  v.visit_lin_equation(*this);
6974  }
6975 
6977  v.visit_lin_equation(*this);
6978  }
6979 
6980 
6982  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6983 
6984 
6985  LinEquation::LinEquation(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs)
6986  : lhs(lhs), rhs(rhs) { set_parent_in_children(); }
6987 
6988 
6989  /// copy constructor implementation
6991  /// pointer member must be reseted with the new copy
6992  if (obj.lhs) {
6993  this->lhs.reset(obj.lhs->clone());
6994  }
6995  /// pointer member must be reseted with the new copy
6996  if (obj.rhs) {
6997  this->rhs.reset(obj.rhs->clone());
6998  }
6999 
7000  /// if there is a token, make copy
7001  if (obj.token) {
7002  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7003  }
7004 
7005  /// set parents
7007  }
7008 
7009 
7010  /// set this parent in the children
7012 
7013  /// optional member could be nullptr
7014  if (lhs) {
7015  lhs->set_parent(this);
7016  }
7017  /// optional member could be nullptr
7018  if (rhs) {
7019  rhs->set_parent(this);
7020  }
7021 
7022  }
7023 
7024 
7025 
7026  void LinEquation::set_lhs(std::shared_ptr<Expression>&& lhs) {
7027  this->lhs = lhs;
7028  // set parents
7029  if (lhs) {
7030  lhs->set_parent(this);
7031  }
7032  }
7033 
7034  void LinEquation::set_lhs(const std::shared_ptr<Expression>& lhs) {
7035  this->lhs = lhs;
7036  // set parents
7037  if (lhs) {
7038  lhs->set_parent(this);
7039  }
7040  }
7041 
7042 
7043  void LinEquation::set_rhs(std::shared_ptr<Expression>&& rhs) {
7044  this->rhs = rhs;
7045  // set parents
7046  if (rhs) {
7047  rhs->set_parent(this);
7048  }
7049  }
7050 
7051  void LinEquation::set_rhs(const std::shared_ptr<Expression>& rhs) {
7052  this->rhs = rhs;
7053  // set parents
7054  if (rhs) {
7055  rhs->set_parent(this);
7056  }
7057  }
7058 
7059 
7060 
7061  ///
7062  /// FunctionCall member functions definition
7063  ///
7064 
7065 
7066 
7067  std::string FunctionCall::get_node_name() const {
7068  return name->get_node_name();
7069  }
7070 
7071 
7072 
7073 
7075  /// use -> for pointer member
7076  name->accept(v);
7077  (void)v;
7078  /// visit each element of vector
7079  for (auto& item : this->arguments) {
7080  item->accept(v);
7081  }
7082  (void)v;
7083  }
7084 
7086  /// use -> for pointer member
7087  name->accept(v);
7088  (void)v;
7089  /// visit each element of vector
7090  for (auto& item : this->arguments) {
7091  item->accept(v);
7092  }
7093  (void)v;
7094  }
7095 
7097  v.visit_function_call(*this);
7098  }
7099 
7101  v.visit_function_call(*this);
7102  }
7103 
7104 
7106  : name(name), arguments(arguments) { set_parent_in_children(); }
7107 
7108 
7109  FunctionCall::FunctionCall(std::shared_ptr<Name> name, const ExpressionVector& arguments)
7110  : name(name), arguments(arguments) { set_parent_in_children(); }
7111 
7112 
7113  /// copy constructor implementation
7115  /// pointer member must be reseted with the new copy
7116  if (obj.name) {
7117  this->name.reset(obj.name->clone());
7118  }
7119  /// copy each element of vector
7120  for (auto& item : obj.arguments) {
7121  this->arguments.emplace_back(item->clone());
7122  }
7123 
7124  /// if there is a token, make copy
7125  if (obj.token) {
7126  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7127  }
7128 
7129  /// set parents
7131  }
7132 
7133 
7134  /// set this parent in the children
7136 
7137  /// optional member could be nullptr
7138  if (name) {
7139  name->set_parent(this);
7140  }
7141  /// set parent for each element of the vector
7142  for (auto& item : arguments) {
7143  item->set_parent(this);
7144 
7145  }
7146 
7147  }
7148 
7149 
7150 
7151  void FunctionCall::set_name(std::shared_ptr<Name>&& name) {
7152  this->name = name;
7153  // set parents
7154  if (name) {
7155  name->set_parent(this);
7156  }
7157  }
7158 
7159  void FunctionCall::set_name(const std::shared_ptr<Name>& name) {
7160  this->name = name;
7161  // set parents
7162  if (name) {
7163  name->set_parent(this);
7164  }
7165  }
7166 
7167 
7169  this->arguments = arguments;
7170  // set parents
7171  for (auto& ii : arguments) {
7172  ii->set_parent(this);
7173  }
7174  }
7175 
7177  this->arguments = arguments;
7178  // set parents
7179  for (auto& ii : arguments) {
7180  ii->set_parent(this);
7181  }
7182  }
7183 
7184 
7185 
7186  ///
7187  /// Watch member functions definition
7188  ///
7189 
7190 
7191 
7192 
7193 
7194 
7195 
7196 
7198  /// use -> for pointer member
7199  expression->accept(v);
7200  (void)v;
7201  /// use -> for pointer member
7202  value->accept(v);
7203  (void)v;
7204  }
7205 
7207  /// use -> for pointer member
7208  expression->accept(v);
7209  (void)v;
7210  /// use -> for pointer member
7211  value->accept(v);
7212  (void)v;
7213  }
7214 
7216  v.visit_watch(*this);
7217  }
7218 
7220  v.visit_watch(*this);
7221  }
7222 
7223 
7225  : expression(expression), value(value) { set_parent_in_children(); }
7226 
7227 
7228  Watch::Watch(std::shared_ptr<Expression> expression, std::shared_ptr<Expression> value)
7229  : expression(expression), value(value) { set_parent_in_children(); }
7230 
7231 
7232  /// copy constructor implementation
7233  Watch::Watch(const Watch& obj) {
7234  /// pointer member must be reseted with the new copy
7235  if (obj.expression) {
7236  this->expression.reset(obj.expression->clone());
7237  }
7238  /// pointer member must be reseted with the new copy
7239  if (obj.value) {
7240  this->value.reset(obj.value->clone());
7241  }
7242 
7243  /// if there is a token, make copy
7244  if (obj.token) {
7245  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7246  }
7247 
7248  /// set parents
7250  }
7251 
7252 
7253  /// set this parent in the children
7255 
7256  /// optional member could be nullptr
7257  if (expression) {
7258  expression->set_parent(this);
7259  }
7260  /// optional member could be nullptr
7261  if (value) {
7262  value->set_parent(this);
7263  }
7264 
7265  }
7266 
7267 
7268 
7269  void Watch::set_expression(std::shared_ptr<Expression>&& expression) {
7270  this->expression = expression;
7271  // set parents
7272  if (expression) {
7273  expression->set_parent(this);
7274  }
7275  }
7276 
7277  void Watch::set_expression(const std::shared_ptr<Expression>& expression) {
7278  this->expression = expression;
7279  // set parents
7280  if (expression) {
7281  expression->set_parent(this);
7282  }
7283  }
7284 
7285 
7286  void Watch::set_value(std::shared_ptr<Expression>&& value) {
7287  this->value = value;
7288  // set parents
7289  if (value) {
7290  value->set_parent(this);
7291  }
7292  }
7293 
7294  void Watch::set_value(const std::shared_ptr<Expression>& value) {
7295  this->value = value;
7296  // set parents
7297  if (value) {
7298  value->set_parent(this);
7299  }
7300  }
7301 
7302 
7303 
7304  ///
7305  /// BABlockType member functions definition
7306  ///
7307 
7308 
7309 
7310 
7311 
7313  }
7314 
7316  }
7317 
7319  v.visit_ba_block_type(*this);
7320  }
7321 
7323  v.visit_ba_block_type(*this);
7324  }
7325 
7326 
7329 
7330 
7331 
7332  /// copy constructor implementation
7334  /// object member can be just copied by value
7335  this->value = obj.value;
7336 
7337  /// if there is a token, make copy
7338  if (obj.token) {
7339  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7340  }
7341 
7342  /// set parents
7344  }
7345 
7346 
7347  /// set this parent in the children
7349 
7350 
7351  }
7352 
7353 
7354 
7356  // why don't we use a coding convention instead of this workaround for
7357  // variable shadowing?
7358  this->value = value;
7359  }
7360 
7361 
7362 
7363  ///
7364  /// UnitDef member functions definition
7365  ///
7366 
7367 
7368 
7369  std::string UnitDef::get_node_name() const {
7370  return unit1->get_node_name();
7371  }
7372 
7373 
7374 
7375 
7377  /// use -> for pointer member
7378  unit1->accept(v);
7379  (void)v;
7380  /// use -> for pointer member
7381  unit2->accept(v);
7382  (void)v;
7383  }
7384 
7386  /// use -> for pointer member
7387  unit1->accept(v);
7388  (void)v;
7389  /// use -> for pointer member
7390  unit2->accept(v);
7391  (void)v;
7392  }
7393 
7395  v.visit_unit_def(*this);
7396  }
7397 
7399  v.visit_unit_def(*this);
7400  }
7401 
7402 
7403  UnitDef::UnitDef(Unit* unit1, Unit* unit2)
7404  : unit1(unit1), unit2(unit2) { set_parent_in_children(); }
7405 
7406 
7407  UnitDef::UnitDef(std::shared_ptr<Unit> unit1, std::shared_ptr<Unit> unit2)
7408  : unit1(unit1), unit2(unit2) { set_parent_in_children(); }
7409 
7410 
7411  /// copy constructor implementation
7413  /// pointer member must be reseted with the new copy
7414  if (obj.unit1) {
7415  this->unit1.reset(obj.unit1->clone());
7416  }
7417  /// pointer member must be reseted with the new copy
7418  if (obj.unit2) {
7419  this->unit2.reset(obj.unit2->clone());
7420  }
7421 
7422  /// if there is a token, make copy
7423  if (obj.token) {
7424  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7425  }
7426 
7427  /// set parents
7429  }
7430 
7431 
7432  /// set this parent in the children
7434 
7435  /// optional member could be nullptr
7436  if (unit1) {
7437  unit1->set_parent(this);
7438  }
7439  /// optional member could be nullptr
7440  if (unit2) {
7441  unit2->set_parent(this);
7442  }
7443 
7444  }
7445 
7446 
7447 
7448  void UnitDef::set_unit1(std::shared_ptr<Unit>&& unit1) {
7449  this->unit1 = unit1;
7450  // set parents
7451  if (unit1) {
7452  unit1->set_parent(this);
7453  }
7454  }
7455 
7456  void UnitDef::set_unit1(const std::shared_ptr<Unit>& unit1) {
7457  this->unit1 = unit1;
7458  // set parents
7459  if (unit1) {
7460  unit1->set_parent(this);
7461  }
7462  }
7463 
7464 
7465  void UnitDef::set_unit2(std::shared_ptr<Unit>&& unit2) {
7466  this->unit2 = unit2;
7467  // set parents
7468  if (unit2) {
7469  unit2->set_parent(this);
7470  }
7471  }
7472 
7473  void UnitDef::set_unit2(const std::shared_ptr<Unit>& unit2) {
7474  this->unit2 = unit2;
7475  // set parents
7476  if (unit2) {
7477  unit2->set_parent(this);
7478  }
7479  }
7480 
7481 
7482 
7483  ///
7484  /// FactorDef member functions definition
7485  ///
7486 
7487 
7488 
7489  std::string FactorDef::get_node_name() const {
7490  return name->get_node_name();
7491  }
7492 
7493 
7494 
7495 
7496 
7497 
7498 
7499 
7500 
7501 
7502 
7503 
7504 
7506  /// use -> for pointer member
7507  name->accept(v);
7508  (void)v;
7509  /// optional member could be nullptr
7510  if (this->value) {
7511  this->value->accept(v);
7512  }
7513  (void)v;
7514  /// use -> for pointer member
7515  unit1->accept(v);
7516  (void)v;
7517  /// optional member could be nullptr
7518  if (this->gt) {
7519  this->gt->accept(v);
7520  }
7521  (void)v;
7522  /// optional member could be nullptr
7523  if (this->unit2) {
7524  this->unit2->accept(v);
7525  }
7526  (void)v;
7527  }
7528 
7530  /// use -> for pointer member
7531  name->accept(v);
7532  (void)v;
7533  /// optional member could be nullptr
7534  if (this->value) {
7535  this->value->accept(v);
7536  }
7537  (void)v;
7538  /// use -> for pointer member
7539  unit1->accept(v);
7540  (void)v;
7541  /// optional member could be nullptr
7542  if (this->gt) {
7543  this->gt->accept(v);
7544  }
7545  (void)v;
7546  /// optional member could be nullptr
7547  if (this->unit2) {
7548  this->unit2->accept(v);
7549  }
7550  (void)v;
7551  }
7552 
7554  v.visit_factor_def(*this);
7555  }
7556 
7558  v.visit_factor_def(*this);
7559  }
7560 
7561 
7563  : name(name), value(value), unit1(unit1), gt(gt), unit2(unit2) { set_parent_in_children(); }
7564 
7565 
7566  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)
7567  : name(name), value(value), unit1(unit1), gt(gt), unit2(unit2) { set_parent_in_children(); }
7568 
7569 
7570  /// copy constructor implementation
7572  /// pointer member must be reseted with the new copy
7573  if (obj.name) {
7574  this->name.reset(obj.name->clone());
7575  }
7576  /// pointer member must be reseted with the new copy
7577  if (obj.value) {
7578  this->value.reset(obj.value->clone());
7579  }
7580  /// pointer member must be reseted with the new copy
7581  if (obj.unit1) {
7582  this->unit1.reset(obj.unit1->clone());
7583  }
7584  /// pointer member must be reseted with the new copy
7585  if (obj.gt) {
7586  this->gt.reset(obj.gt->clone());
7587  }
7588  /// pointer member must be reseted with the new copy
7589  if (obj.unit2) {
7590  this->unit2.reset(obj.unit2->clone());
7591  }
7592 
7593  /// if there is a token, make copy
7594  if (obj.token) {
7595  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7596  }
7597 
7598  /// set parents
7600  }
7601 
7602 
7603  /// set this parent in the children
7605 
7606  /// optional member could be nullptr
7607  if (name) {
7608  name->set_parent(this);
7609  }
7610  /// optional member could be nullptr
7611  if (value) {
7612  value->set_parent(this);
7613  }
7614  /// optional member could be nullptr
7615  if (unit1) {
7616  unit1->set_parent(this);
7617  }
7618  /// optional member could be nullptr
7619  if (gt) {
7620  gt->set_parent(this);
7621  }
7622  /// optional member could be nullptr
7623  if (unit2) {
7624  unit2->set_parent(this);
7625  }
7626 
7627  }
7628 
7629 
7630 
7631  void FactorDef::set_name(std::shared_ptr<Name>&& name) {
7632  this->name = name;
7633  // set parents
7634  if (name) {
7635  name->set_parent(this);
7636  }
7637  }
7638 
7639  void FactorDef::set_name(const std::shared_ptr<Name>& name) {
7640  this->name = name;
7641  // set parents
7642  if (name) {
7643  name->set_parent(this);
7644  }
7645  }
7646 
7647 
7648  void FactorDef::set_value(std::shared_ptr<Double>&& value) {
7649  this->value = value;
7650  // set parents
7651  if (value) {
7652  value->set_parent(this);
7653  }
7654  }
7655 
7656  void FactorDef::set_value(const std::shared_ptr<Double>& value) {
7657  this->value = value;
7658  // set parents
7659  if (value) {
7660  value->set_parent(this);
7661  }
7662  }
7663 
7664 
7665  void FactorDef::set_unit1(std::shared_ptr<Unit>&& unit1) {
7666  this->unit1 = unit1;
7667  // set parents
7668  if (unit1) {
7669  unit1->set_parent(this);
7670  }
7671  }
7672 
7673  void FactorDef::set_unit1(const std::shared_ptr<Unit>& unit1) {
7674  this->unit1 = unit1;
7675  // set parents
7676  if (unit1) {
7677  unit1->set_parent(this);
7678  }
7679  }
7680 
7681 
7682  void FactorDef::set_gt(std::shared_ptr<Boolean>&& gt) {
7683  this->gt = gt;
7684  // set parents
7685  if (gt) {
7686  gt->set_parent(this);
7687  }
7688  }
7689 
7690  void FactorDef::set_gt(const std::shared_ptr<Boolean>& gt) {
7691  this->gt = gt;
7692  // set parents
7693  if (gt) {
7694  gt->set_parent(this);
7695  }
7696  }
7697 
7698 
7699  void FactorDef::set_unit2(std::shared_ptr<Unit>&& unit2) {
7700  this->unit2 = unit2;
7701  // set parents
7702  if (unit2) {
7703  unit2->set_parent(this);
7704  }
7705  }
7706 
7707  void FactorDef::set_unit2(const std::shared_ptr<Unit>& unit2) {
7708  this->unit2 = unit2;
7709  // set parents
7710  if (unit2) {
7711  unit2->set_parent(this);
7712  }
7713  }
7714 
7715 
7716 
7717  ///
7718  /// Valence member functions definition
7719  ///
7720 
7721 
7722 
7723 
7724 
7725 
7726 
7727 
7729  /// use -> for pointer member
7730  type->accept(v);
7731  (void)v;
7732  /// use -> for pointer member
7733  value->accept(v);
7734  (void)v;
7735  }
7736 
7738  /// use -> for pointer member
7739  type->accept(v);
7740  (void)v;
7741  /// use -> for pointer member
7742  value->accept(v);
7743  (void)v;
7744  }
7745 
7747  v.visit_valence(*this);
7748  }
7749 
7751  v.visit_valence(*this);
7752  }
7753 
7754 
7757 
7758 
7759  Valence::Valence(std::shared_ptr<Name> type, std::shared_ptr<Double> value)
7761 
7762 
7763  /// copy constructor implementation
7765  /// pointer member must be reseted with the new copy
7766  if (obj.type) {
7767  this->type.reset(obj.type->clone());
7768  }
7769  /// pointer member must be reseted with the new copy
7770  if (obj.value) {
7771  this->value.reset(obj.value->clone());
7772  }
7773 
7774  /// if there is a token, make copy
7775  if (obj.token) {
7776  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7777  }
7778 
7779  /// set parents
7781  }
7782 
7783 
7784  /// set this parent in the children
7786 
7787  /// optional member could be nullptr
7788  if (type) {
7789  type->set_parent(this);
7790  }
7791  /// optional member could be nullptr
7792  if (value) {
7793  value->set_parent(this);
7794  }
7795 
7796  }
7797 
7798 
7799 
7800  void Valence::set_type(std::shared_ptr<Name>&& type) {
7801  this->type = type;
7802  // set parents
7803  if (type) {
7804  type->set_parent(this);
7805  }
7806  }
7807 
7808  void Valence::set_type(const std::shared_ptr<Name>& type) {
7809  this->type = type;
7810  // set parents
7811  if (type) {
7812  type->set_parent(this);
7813  }
7814  }
7815 
7816 
7817  void Valence::set_value(std::shared_ptr<Double>&& value) {
7818  this->value = value;
7819  // set parents
7820  if (value) {
7821  value->set_parent(this);
7822  }
7823  }
7824 
7825  void Valence::set_value(const std::shared_ptr<Double>& value) {
7826  this->value = value;
7827  // set parents
7828  if (value) {
7829  value->set_parent(this);
7830  }
7831  }
7832 
7833 
7834 
7835  ///
7836  /// UnitState member functions definition
7837  ///
7838 
7839 
7840 
7841 
7842 
7844  }
7845 
7847  }
7848 
7850  v.visit_unit_state(*this);
7851  }
7852 
7854  v.visit_unit_state(*this);
7855  }
7856 
7857 
7860 
7861 
7862 
7863  /// copy constructor implementation
7865  /// object member can be just copied by value
7866  this->value = obj.value;
7867 
7868  /// if there is a token, make copy
7869  if (obj.token) {
7870  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
7871  }
7872 
7873  /// set parents
7875  }
7876 
7877 
7878  /// set this parent in the children
7880 
7881 
7882  }
7883 
7884 
7885 
7887  // why don't we use a coding convention instead of this workaround for
7888  // variable shadowing?
7889  this->value = value;
7890  }
7891 
7892 
7893 
7894  ///
7895  /// LocalListStatement member functions definition
7896  ///
7897 
7898 
7899 /**
7900  * \brief Add member to variables by raw pointer
7901  */
7903  variables.emplace_back(n);
7904 
7905  // set parents
7906  n->set_parent(this);
7907 }
7908 
7909 /**
7910  * \brief Add member to variables by shared_ptr
7911  */
7912 void LocalListStatement::emplace_back_local_var(std::shared_ptr<LocalVar> n) {
7913  variables.emplace_back(n);
7914  // set parents
7915  n->set_parent(this);
7916 }
7917 
7918 /**
7919  * \brief Erase member to variables
7920  */
7921 LocalVarVector::const_iterator LocalListStatement::erase_local_var(LocalVarVector::const_iterator first) {
7922  return variables.erase(first);
7923 }
7924 /**
7925  * \brief Erase members to variables
7926  */
7927 LocalVarVector::const_iterator LocalListStatement::erase_local_var(LocalVarVector::const_iterator first, LocalVarVector::const_iterator last) {
7928  return variables.erase(first, last);
7929 }
7930 /**
7931  * \brief Erase non-consecutive members to variables
7932  *
7933  * loosely following the cpp reference of remove_if
7934  */
7935 size_t LocalListStatement::erase_local_var(std::unordered_set<LocalVar*>& to_be_erased) {
7936  auto first = variables.begin();
7937  auto last = variables.end();
7938  auto result = first;
7939 
7940  while (first != last) {
7941  // automatically erase dangling pointers from the uset while
7942  // looking for them to erase them in the vector
7943  if (to_be_erased.erase(first->get()) == 0) {
7944  reset_local_var(result, *first);
7945  ++result;
7946  }
7947  ++first;
7948  }
7949 
7950  size_t out = last - result;
7951  erase_local_var(result, last);
7952 
7953  return out;
7954 }
7955 
7956 /**
7957  * \brief Insert member to variables
7958  */
7959 LocalVarVector::const_iterator LocalListStatement::insert_local_var(LocalVarVector::const_iterator position, const std::shared_ptr<LocalVar>& n) {
7960  n->set_parent(this);
7961  return variables.insert(position, n);
7962 }
7963 
7964 /**
7965  * \brief Reset member to variables
7966  */
7967 void LocalListStatement::reset_local_var(LocalVarVector::const_iterator position, LocalVar* n) {
7968  //set parents
7969  n->set_parent(this);
7970 
7971  variables[position - variables.begin()].reset(n);
7972 }
7973 
7974 /**
7975  * \brief Reset member to variables
7976  */
7977 void LocalListStatement::reset_local_var(LocalVarVector::const_iterator position, std::shared_ptr<LocalVar> n) {
7978  //set parents
7979  n->set_parent(this);
7980 
7981  variables[position - variables.begin()] = n;
7982 }
7983 
7984 
7985 
7986 
7988  /// visit each element of vector
7989  for (auto& item : this->variables) {
7990  item->accept(v);
7991  }
7992  (void)v;
7993  }
7994 
7996  /// visit each element of vector
7997  for (auto& item : this->variables) {
7998  item->accept(v);
7999  }
8000  (void)v;
8001  }
8002 
8004  v.visit_local_list_statement(*this);
8005  }
8006 
8008  v.visit_local_list_statement(*this);
8009  }
8010 
8011 
8013  : variables(variables) { set_parent_in_children(); }
8014 
8015 
8016 
8017  /// copy constructor implementation
8019  /// copy each element of vector
8020  for (auto& item : obj.variables) {
8021  this->variables.emplace_back(item->clone());
8022  }
8023 
8024  /// if there is a token, make copy
8025  if (obj.token) {
8026  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8027  }
8028 
8029  /// set parents
8031  }
8032 
8033 
8034  /// set this parent in the children
8036 
8037  /// set parent for each element of the vector
8038  for (auto& item : variables) {
8039  item->set_parent(this);
8040 
8041  }
8042 
8043  }
8044 
8045 
8046 
8048  this->variables = variables;
8049  // set parents
8050  for (auto& ii : variables) {
8051  ii->set_parent(this);
8052  }
8053  }
8054 
8056  this->variables = variables;
8057  // set parents
8058  for (auto& ii : variables) {
8059  ii->set_parent(this);
8060  }
8061  }
8062 
8063 
8064 
8065  ///
8066  /// Model member functions definition
8067  ///
8068 
8069 
8070 
8071 
8072 
8074  /// use -> for pointer member
8075  title->accept(v);
8076  (void)v;
8077  }
8078 
8080  /// use -> for pointer member
8081  title->accept(v);
8082  (void)v;
8083  }
8084 
8086  v.visit_model(*this);
8087  }
8088 
8090  v.visit_model(*this);
8091  }
8092 
8093 
8096 
8097 
8098  Model::Model(std::shared_ptr<String> title)
8100 
8101 
8102  /// copy constructor implementation
8103  Model::Model(const Model& obj) {
8104  /// pointer member must be reseted with the new copy
8105  if (obj.title) {
8106  this->title.reset(obj.title->clone());
8107  }
8108 
8109  /// if there is a token, make copy
8110  if (obj.token) {
8111  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8112  }
8113 
8114  /// set parents
8116  }
8117 
8118 
8119  /// set this parent in the children
8121 
8122  /// optional member could be nullptr
8123  if (title) {
8124  title->set_parent(this);
8125  }
8126 
8127  }
8128 
8129 
8130 
8131  void Model::set_title(std::shared_ptr<String>&& title) {
8132  this->title = title;
8133  // set parents
8134  if (title) {
8135  title->set_parent(this);
8136  }
8137  }
8138 
8139  void Model::set_title(const std::shared_ptr<String>& title) {
8140  this->title = title;
8141  // set parents
8142  if (title) {
8143  title->set_parent(this);
8144  }
8145  }
8146 
8147 
8148 
8149  ///
8150  /// Define member functions definition
8151  ///
8152 
8153 
8154 
8155  std::string Define::get_node_name() const {
8156  return name->get_node_name();
8157  }
8158 
8159 
8160 
8161 
8163  /// use -> for pointer member
8164  name->accept(v);
8165  (void)v;
8166  /// use -> for pointer member
8167  value->accept(v);
8168  (void)v;
8169  }
8170 
8172  /// use -> for pointer member
8173  name->accept(v);
8174  (void)v;
8175  /// use -> for pointer member
8176  value->accept(v);
8177  (void)v;
8178  }
8179 
8181  v.visit_define(*this);
8182  }
8183 
8185  v.visit_define(*this);
8186  }
8187 
8188 
8191 
8192 
8193  Define::Define(std::shared_ptr<Name> name, std::shared_ptr<Integer> value)
8195 
8196 
8197  /// copy constructor implementation
8198  Define::Define(const Define& obj) {
8199  /// pointer member must be reseted with the new copy
8200  if (obj.name) {
8201  this->name.reset(obj.name->clone());
8202  }
8203  /// pointer member must be reseted with the new copy
8204  if (obj.value) {
8205  this->value.reset(obj.value->clone());
8206  }
8207 
8208  /// if there is a token, make copy
8209  if (obj.token) {
8210  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8211  }
8212 
8213  /// set parents
8215  }
8216 
8217 
8218  /// set this parent in the children
8220 
8221  /// optional member could be nullptr
8222  if (name) {
8223  name->set_parent(this);
8224  }
8225  /// optional member could be nullptr
8226  if (value) {
8227  value->set_parent(this);
8228  }
8229 
8230  }
8231 
8232 
8233 
8234  void Define::set_name(std::shared_ptr<Name>&& name) {
8235  this->name = name;
8236  // set parents
8237  if (name) {
8238  name->set_parent(this);
8239  }
8240  }
8241 
8242  void Define::set_name(const std::shared_ptr<Name>& name) {
8243  this->name = name;
8244  // set parents
8245  if (name) {
8246  name->set_parent(this);
8247  }
8248  }
8249 
8250 
8251  void Define::set_value(std::shared_ptr<Integer>&& value) {
8252  this->value = value;
8253  // set parents
8254  if (value) {
8255  value->set_parent(this);
8256  }
8257  }
8258 
8259  void Define::set_value(const std::shared_ptr<Integer>& value) {
8260  this->value = value;
8261  // set parents
8262  if (value) {
8263  value->set_parent(this);
8264  }
8265  }
8266 
8267 
8268 
8269  ///
8270  /// Include member functions definition
8271  ///
8272 
8273 
8274 
8275 
8276 
8277 
8278 
8279 
8281  /// use -> for pointer member
8282  filename->accept(v);
8283  (void)v;
8284  /// visit each element of vector
8285  for (auto& item : this->blocks) {
8286  item->accept(v);
8287  }
8288  (void)v;
8289  }
8290 
8292  /// use -> for pointer member
8293  filename->accept(v);
8294  (void)v;
8295  /// visit each element of vector
8296  for (auto& item : this->blocks) {
8297  item->accept(v);
8298  }
8299  (void)v;
8300  }
8301 
8303  v.visit_include(*this);
8304  }
8305 
8307  v.visit_include(*this);
8308  }
8309 
8310 
8311  Include::Include(String* filename, const NodeVector& blocks)
8312  : filename(filename), blocks(blocks) { set_parent_in_children(); }
8313 
8314 
8315  Include::Include(std::shared_ptr<String> filename, const NodeVector& blocks)
8316  : filename(filename), blocks(blocks) { set_parent_in_children(); }
8317 
8318 
8319  /// copy constructor implementation
8321  /// pointer member must be reseted with the new copy
8322  if (obj.filename) {
8323  this->filename.reset(obj.filename->clone());
8324  }
8325  /// copy each element of vector
8326  for (auto& item : obj.blocks) {
8327  this->blocks.emplace_back(item->clone());
8328  }
8329 
8330  /// if there is a token, make copy
8331  if (obj.token) {
8332  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8333  }
8334 
8335  /// set parents
8337  }
8338 
8339 
8340  /// set this parent in the children
8342 
8343  /// optional member could be nullptr
8344  if (filename) {
8345  filename->set_parent(this);
8346  }
8347  /// set parent for each element of the vector
8348  for (auto& item : blocks) {
8349  item->set_parent(this);
8350 
8351  }
8352 
8353  }
8354 
8355 
8356 
8357  void Include::set_filename(std::shared_ptr<String>&& filename) {
8358  this->filename = filename;
8359  // set parents
8360  if (filename) {
8361  filename->set_parent(this);
8362  }
8363  }
8364 
8365  void Include::set_filename(const std::shared_ptr<String>& filename) {
8366  this->filename = filename;
8367  // set parents
8368  if (filename) {
8369  filename->set_parent(this);
8370  }
8371  }
8372 
8373 
8375  this->blocks = blocks;
8376  // set parents
8377  for (auto& ii : blocks) {
8378  ii->set_parent(this);
8379  }
8380  }
8381 
8382  void Include::set_blocks(const NodeVector& blocks) {
8383  this->blocks = blocks;
8384  // set parents
8385  for (auto& ii : blocks) {
8386  ii->set_parent(this);
8387  }
8388  }
8389 
8390 
8391 
8392  ///
8393  /// ParamAssign member functions definition
8394  ///
8395 
8396 
8397 
8398  std::string ParamAssign::get_node_name() const {
8399  return name->get_node_name();
8400  }
8401 
8402 
8403 
8404 
8405 
8406 
8407 
8408 
8409 
8410 
8412  /// use -> for pointer member
8413  name->accept(v);
8414  (void)v;
8415  /// optional member could be nullptr
8416  if (this->value) {
8417  this->value->accept(v);
8418  }
8419  (void)v;
8420  /// optional member could be nullptr
8421  if (this->unit) {
8422  this->unit->accept(v);
8423  }
8424  (void)v;
8425  /// optional member could be nullptr
8426  if (this->limit) {
8427  this->limit->accept(v);
8428  }
8429  (void)v;
8430  }
8431 
8433  /// use -> for pointer member
8434  name->accept(v);
8435  (void)v;
8436  /// optional member could be nullptr
8437  if (this->value) {
8438  this->value->accept(v);
8439  }
8440  (void)v;
8441  /// optional member could be nullptr
8442  if (this->unit) {
8443  this->unit->accept(v);
8444  }
8445  (void)v;
8446  /// optional member could be nullptr
8447  if (this->limit) {
8448  this->limit->accept(v);
8449  }
8450  (void)v;
8451  }
8452 
8454  v.visit_param_assign(*this);
8455  }
8456 
8458  v.visit_param_assign(*this);
8459  }
8460 
8461 
8463  : name(name), value(value), unit(unit), limit(limit) { set_parent_in_children(); }
8464 
8465 
8466  ParamAssign::ParamAssign(std::shared_ptr<Identifier> name, std::shared_ptr<Number> value, std::shared_ptr<Unit> unit, std::shared_ptr<Limits> limit)
8467  : name(name), value(value), unit(unit), limit(limit) { set_parent_in_children(); }
8468 
8469 
8470  /// copy constructor implementation
8472  /// pointer member must be reseted with the new copy
8473  if (obj.name) {
8474  this->name.reset(obj.name->clone());
8475  }
8476  /// pointer member must be reseted with the new copy
8477  if (obj.value) {
8478  this->value.reset(obj.value->clone());
8479  }
8480  /// pointer member must be reseted with the new copy
8481  if (obj.unit) {
8482  this->unit.reset(obj.unit->clone());
8483  }
8484  /// pointer member must be reseted with the new copy
8485  if (obj.limit) {
8486  this->limit.reset(obj.limit->clone());
8487  }
8488 
8489  /// if there is a token, make copy
8490  if (obj.token) {
8491  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8492  }
8493 
8494  /// set parents
8496  }
8497 
8498 
8499  /// set this parent in the children
8501 
8502  /// optional member could be nullptr
8503  if (name) {
8504  name->set_parent(this);
8505  }
8506  /// optional member could be nullptr
8507  if (value) {
8508  value->set_parent(this);
8509  }
8510  /// optional member could be nullptr
8511  if (unit) {
8512  unit->set_parent(this);
8513  }
8514  /// optional member could be nullptr
8515  if (limit) {
8516  limit->set_parent(this);
8517  }
8518 
8519  }
8520 
8521 
8522 
8523  void ParamAssign::set_name(std::shared_ptr<Identifier>&& name) {
8524  this->name = name;
8525  // set parents
8526  if (name) {
8527  name->set_parent(this);
8528  }
8529  }
8530 
8531  void ParamAssign::set_name(const std::shared_ptr<Identifier>& name) {
8532  this->name = name;
8533  // set parents
8534  if (name) {
8535  name->set_parent(this);
8536  }
8537  }
8538 
8539 
8540  void ParamAssign::set_value(std::shared_ptr<Number>&& value) {
8541  this->value = value;
8542  // set parents
8543  if (value) {
8544  value->set_parent(this);
8545  }
8546  }
8547 
8548  void ParamAssign::set_value(const std::shared_ptr<Number>& value) {
8549  this->value = value;
8550  // set parents
8551  if (value) {
8552  value->set_parent(this);
8553  }
8554  }
8555 
8556 
8557  void ParamAssign::set_unit(std::shared_ptr<Unit>&& unit) {
8558  this->unit = unit;
8559  // set parents
8560  if (unit) {
8561  unit->set_parent(this);
8562  }
8563  }
8564 
8565  void ParamAssign::set_unit(const std::shared_ptr<Unit>& unit) {
8566  this->unit = unit;
8567  // set parents
8568  if (unit) {
8569  unit->set_parent(this);
8570  }
8571  }
8572 
8573 
8574  void ParamAssign::set_limit(std::shared_ptr<Limits>&& limit) {
8575  this->limit = limit;
8576  // set parents
8577  if (limit) {
8578  limit->set_parent(this);
8579  }
8580  }
8581 
8582  void ParamAssign::set_limit(const std::shared_ptr<Limits>& limit) {
8583  this->limit = limit;
8584  // set parents
8585  if (limit) {
8586  limit->set_parent(this);
8587  }
8588  }
8589 
8590 
8591 
8592  ///
8593  /// AssignedDefinition member functions definition
8594  ///
8595 
8596 
8597 
8599  return name->get_node_name();
8600  }
8601 
8602 
8603 
8604 
8605 
8606 
8607 
8608 
8609 
8610 
8611 
8612 
8613 
8614 
8615 
8616 
8617 
8618 
8619 
8621  /// use -> for pointer member
8622  name->accept(v);
8623  (void)v;
8624  /// optional member could be nullptr
8625  if (this->length) {
8626  this->length->accept(v);
8627  }
8628  (void)v;
8629  /// optional member could be nullptr
8630  if (this->from) {
8631  this->from->accept(v);
8632  }
8633  (void)v;
8634  /// optional member could be nullptr
8635  if (this->to) {
8636  this->to->accept(v);
8637  }
8638  (void)v;
8639  /// optional member could be nullptr
8640  if (this->start) {
8641  this->start->accept(v);
8642  }
8643  (void)v;
8644  /// optional member could be nullptr
8645  if (this->unit) {
8646  this->unit->accept(v);
8647  }
8648  (void)v;
8649  /// optional member could be nullptr
8650  if (this->abstol) {
8651  this->abstol->accept(v);
8652  }
8653  (void)v;
8654  }
8655 
8657  /// use -> for pointer member
8658  name->accept(v);
8659  (void)v;
8660  /// optional member could be nullptr
8661  if (this->length) {
8662  this->length->accept(v);
8663  }
8664  (void)v;
8665  /// optional member could be nullptr
8666  if (this->from) {
8667  this->from->accept(v);
8668  }
8669  (void)v;
8670  /// optional member could be nullptr
8671  if (this->to) {
8672  this->to->accept(v);
8673  }
8674  (void)v;
8675  /// optional member could be nullptr
8676  if (this->start) {
8677  this->start->accept(v);
8678  }
8679  (void)v;
8680  /// optional member could be nullptr
8681  if (this->unit) {
8682  this->unit->accept(v);
8683  }
8684  (void)v;
8685  /// optional member could be nullptr
8686  if (this->abstol) {
8687  this->abstol->accept(v);
8688  }
8689  (void)v;
8690  }
8691 
8693  v.visit_assigned_definition(*this);
8694  }
8695 
8697  v.visit_assigned_definition(*this);
8698  }
8699 
8700 
8702  : name(name), length(length), from(from), to(to), start(start), unit(unit), abstol(abstol) { set_parent_in_children(); }
8703 
8704 
8705  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)
8706  : name(name), length(length), from(from), to(to), start(start), unit(unit), abstol(abstol) { set_parent_in_children(); }
8707 
8708 
8709  /// copy constructor implementation
8711  /// pointer member must be reseted with the new copy
8712  if (obj.name) {
8713  this->name.reset(obj.name->clone());
8714  }
8715  /// pointer member must be reseted with the new copy
8716  if (obj.length) {
8717  this->length.reset(obj.length->clone());
8718  }
8719  /// pointer member must be reseted with the new copy
8720  if (obj.from) {
8721  this->from.reset(obj.from->clone());
8722  }
8723  /// pointer member must be reseted with the new copy
8724  if (obj.to) {
8725  this->to.reset(obj.to->clone());
8726  }
8727  /// pointer member must be reseted with the new copy
8728  if (obj.start) {
8729  this->start.reset(obj.start->clone());
8730  }
8731  /// pointer member must be reseted with the new copy
8732  if (obj.unit) {
8733  this->unit.reset(obj.unit->clone());
8734  }
8735  /// pointer member must be reseted with the new copy
8736  if (obj.abstol) {
8737  this->abstol.reset(obj.abstol->clone());
8738  }
8739 
8740  /// if there is a token, make copy
8741  if (obj.token) {
8742  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8743  }
8744 
8745  /// set parents
8747  }
8748 
8749 
8750  /// set this parent in the children
8752 
8753  /// optional member could be nullptr
8754  if (name) {
8755  name->set_parent(this);
8756  }
8757  /// optional member could be nullptr
8758  if (length) {
8759  length->set_parent(this);
8760  }
8761  /// optional member could be nullptr
8762  if (from) {
8763  from->set_parent(this);
8764  }
8765  /// optional member could be nullptr
8766  if (to) {
8767  to->set_parent(this);
8768  }
8769  /// optional member could be nullptr
8770  if (start) {
8771  start->set_parent(this);
8772  }
8773  /// optional member could be nullptr
8774  if (unit) {
8775  unit->set_parent(this);
8776  }
8777  /// optional member could be nullptr
8778  if (abstol) {
8779  abstol->set_parent(this);
8780  }
8781 
8782  }
8783 
8784 
8785 
8786  void AssignedDefinition::set_name(std::shared_ptr<Identifier>&& name) {
8787  this->name = name;
8788  // set parents
8789  if (name) {
8790  name->set_parent(this);
8791  }
8792  }
8793 
8794  void AssignedDefinition::set_name(const std::shared_ptr<Identifier>& name) {
8795  this->name = name;
8796  // set parents
8797  if (name) {
8798  name->set_parent(this);
8799  }
8800  }
8801 
8802 
8803  void AssignedDefinition::set_length(std::shared_ptr<Integer>&& length) {
8804  this->length = length;
8805  // set parents
8806  if (length) {
8807  length->set_parent(this);
8808  }
8809  }
8810 
8811  void AssignedDefinition::set_length(const std::shared_ptr<Integer>& length) {
8812  this->length = length;
8813  // set parents
8814  if (length) {
8815  length->set_parent(this);
8816  }
8817  }
8818 
8819 
8820  void AssignedDefinition::set_from(std::shared_ptr<Number>&& from) {
8821  this->from = from;
8822  // set parents
8823  if (from) {
8824  from->set_parent(this);
8825  }
8826  }
8827 
8828  void AssignedDefinition::set_from(const std::shared_ptr<Number>& from) {
8829  this->from = from;
8830  // set parents
8831  if (from) {
8832  from->set_parent(this);
8833  }
8834  }
8835 
8836 
8837  void AssignedDefinition::set_to(std::shared_ptr<Number>&& to) {
8838  this->to = to;
8839  // set parents
8840  if (to) {
8841  to->set_parent(this);
8842  }
8843  }
8844 
8845  void AssignedDefinition::set_to(const std::shared_ptr<Number>& to) {
8846  this->to = to;
8847  // set parents
8848  if (to) {
8849  to->set_parent(this);
8850  }
8851  }
8852 
8853 
8854  void AssignedDefinition::set_start(std::shared_ptr<Number>&& start) {
8855  this->start = start;
8856  // set parents
8857  if (start) {
8858  start->set_parent(this);
8859  }
8860  }
8861 
8862  void AssignedDefinition::set_start(const std::shared_ptr<Number>& start) {
8863  this->start = start;
8864  // set parents
8865  if (start) {
8866  start->set_parent(this);
8867  }
8868  }
8869 
8870 
8871  void AssignedDefinition::set_unit(std::shared_ptr<Unit>&& unit) {
8872  this->unit = unit;
8873  // set parents
8874  if (unit) {
8875  unit->set_parent(this);
8876  }
8877  }
8878 
8879  void AssignedDefinition::set_unit(const std::shared_ptr<Unit>& unit) {
8880  this->unit = unit;
8881  // set parents
8882  if (unit) {
8883  unit->set_parent(this);
8884  }
8885  }
8886 
8887 
8888  void AssignedDefinition::set_abstol(std::shared_ptr<Double>&& abstol) {
8889  this->abstol = abstol;
8890  // set parents
8891  if (abstol) {
8892  abstol->set_parent(this);
8893  }
8894  }
8895 
8896  void AssignedDefinition::set_abstol(const std::shared_ptr<Double>& abstol) {
8897  this->abstol = abstol;
8898  // set parents
8899  if (abstol) {
8900  abstol->set_parent(this);
8901  }
8902  }
8903 
8904 
8905 
8906  ///
8907  /// ConductanceHint member functions definition
8908  ///
8909 
8910 
8911 
8912 
8913 
8914 
8915 
8916 
8918  /// use -> for pointer member
8919  conductance->accept(v);
8920  (void)v;
8921  /// optional member could be nullptr
8922  if (this->ion) {
8923  this->ion->accept(v);
8924  }
8925  (void)v;
8926  }
8927 
8929  /// use -> for pointer member
8930  conductance->accept(v);
8931  (void)v;
8932  /// optional member could be nullptr
8933  if (this->ion) {
8934  this->ion->accept(v);
8935  }
8936  (void)v;
8937  }
8938 
8940  v.visit_conductance_hint(*this);
8941  }
8942 
8944  v.visit_conductance_hint(*this);
8945  }
8946 
8947 
8949  : conductance(conductance), ion(ion) { set_parent_in_children(); }
8950 
8951 
8952  ConductanceHint::ConductanceHint(std::shared_ptr<Name> conductance, std::shared_ptr<Name> ion)
8953  : conductance(conductance), ion(ion) { set_parent_in_children(); }
8954 
8955 
8956  /// copy constructor implementation
8958  /// pointer member must be reseted with the new copy
8959  if (obj.conductance) {
8960  this->conductance.reset(obj.conductance->clone());
8961  }
8962  /// pointer member must be reseted with the new copy
8963  if (obj.ion) {
8964  this->ion.reset(obj.ion->clone());
8965  }
8966 
8967  /// if there is a token, make copy
8968  if (obj.token) {
8969  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
8970  }
8971 
8972  /// set parents
8974  }
8975 
8976 
8977  /// set this parent in the children
8979 
8980  /// optional member could be nullptr
8981  if (conductance) {
8982  conductance->set_parent(this);
8983  }
8984  /// optional member could be nullptr
8985  if (ion) {
8986  ion->set_parent(this);
8987  }
8988 
8989  }
8990 
8991 
8992 
8993  void ConductanceHint::set_conductance(std::shared_ptr<Name>&& conductance) {
8994  this->conductance = conductance;
8995  // set parents
8996  if (conductance) {
8997  conductance->set_parent(this);
8998  }
8999  }
9000 
9001  void ConductanceHint::set_conductance(const std::shared_ptr<Name>& conductance) {
9002  this->conductance = conductance;
9003  // set parents
9004  if (conductance) {
9005  conductance->set_parent(this);
9006  }
9007  }
9008 
9009 
9010  void ConductanceHint::set_ion(std::shared_ptr<Name>&& ion) {
9011  this->ion = ion;
9012  // set parents
9013  if (ion) {
9014  ion->set_parent(this);
9015  }
9016  }
9017 
9018  void ConductanceHint::set_ion(const std::shared_ptr<Name>& ion) {
9019  this->ion = ion;
9020  // set parents
9021  if (ion) {
9022  ion->set_parent(this);
9023  }
9024  }
9025 
9026 
9027 
9028  ///
9029  /// ExpressionStatement member functions definition
9030  ///
9031 
9032 
9033 
9034 
9035 
9037  /// use -> for pointer member
9038  expression->accept(v);
9039  (void)v;
9040  }
9041 
9043  /// use -> for pointer member
9044  expression->accept(v);
9045  (void)v;
9046  }
9047 
9049  v.visit_expression_statement(*this);
9050  }
9051 
9053  v.visit_expression_statement(*this);
9054  }
9055 
9056 
9058  : expression(expression) { set_parent_in_children(); }
9059 
9060 
9061  ExpressionStatement::ExpressionStatement(std::shared_ptr<Expression> expression)
9062  : expression(expression) { set_parent_in_children(); }
9063 
9064 
9065  /// copy constructor implementation
9067  /// pointer member must be reseted with the new copy
9068  if (obj.expression) {
9069  this->expression.reset(obj.expression->clone());
9070  }
9071 
9072  /// if there is a token, make copy
9073  if (obj.token) {
9074  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9075  }
9076 
9077  /// set parents
9079  }
9080 
9081 
9082  /// set this parent in the children
9084 
9085  /// optional member could be nullptr
9086  if (expression) {
9087  expression->set_parent(this);
9088  }
9089 
9090  }
9091 
9092 
9093 
9094  void ExpressionStatement::set_expression(std::shared_ptr<Expression>&& expression) {
9095  this->expression = expression;
9096  // set parents
9097  if (expression) {
9098  expression->set_parent(this);
9099  }
9100  }
9101 
9102  void ExpressionStatement::set_expression(const std::shared_ptr<Expression>& expression) {
9103  this->expression = expression;
9104  // set parents
9105  if (expression) {
9106  expression->set_parent(this);
9107  }
9108  }
9109 
9110 
9111 
9112  ///
9113  /// ProtectStatement member functions definition
9114  ///
9115 
9116 
9117 
9118 
9119 
9121  /// use -> for pointer member
9122  expression->accept(v);
9123  (void)v;
9124  }
9125 
9127  /// use -> for pointer member
9128  expression->accept(v);
9129  (void)v;
9130  }
9131 
9133  v.visit_protect_statement(*this);
9134  }
9135 
9137  v.visit_protect_statement(*this);
9138  }
9139 
9140 
9142  : expression(expression) { set_parent_in_children(); }
9143 
9144 
9145  ProtectStatement::ProtectStatement(std::shared_ptr<Expression> expression)
9146  : expression(expression) { set_parent_in_children(); }
9147 
9148 
9149  /// copy constructor implementation
9151  /// pointer member must be reseted with the new copy
9152  if (obj.expression) {
9153  this->expression.reset(obj.expression->clone());
9154  }
9155 
9156  /// if there is a token, make copy
9157  if (obj.token) {
9158  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9159  }
9160 
9161  /// set parents
9163  }
9164 
9165 
9166  /// set this parent in the children
9168 
9169  /// optional member could be nullptr
9170  if (expression) {
9171  expression->set_parent(this);
9172  }
9173 
9174  }
9175 
9176 
9177 
9178  void ProtectStatement::set_expression(std::shared_ptr<Expression>&& expression) {
9179  this->expression = expression;
9180  // set parents
9181  if (expression) {
9182  expression->set_parent(this);
9183  }
9184  }
9185 
9186  void ProtectStatement::set_expression(const std::shared_ptr<Expression>& expression) {
9187  this->expression = expression;
9188  // set parents
9189  if (expression) {
9190  expression->set_parent(this);
9191  }
9192  }
9193 
9194 
9195 
9196  ///
9197  /// FromStatement member functions definition
9198  ///
9199 
9200 
9201 
9202  std::string FromStatement::get_node_name() const {
9203  return name->get_node_name();
9204  }
9205 
9206 
9207 
9208 
9209 
9210 
9211 
9212 
9213 
9214 
9215 
9216 
9217 
9219  /// use -> for pointer member
9220  name->accept(v);
9221  (void)v;
9222  /// use -> for pointer member
9223  from->accept(v);
9224  (void)v;
9225  /// use -> for pointer member
9226  to->accept(v);
9227  (void)v;
9228  /// optional member could be nullptr
9229  if (this->increment) {
9230  this->increment->accept(v);
9231  }
9232  (void)v;
9233  /// use -> for pointer member
9234  statement_block->accept(v);
9235  (void)v;
9236  }
9237 
9239  /// use -> for pointer member
9240  name->accept(v);
9241  (void)v;
9242  /// use -> for pointer member
9243  from->accept(v);
9244  (void)v;
9245  /// use -> for pointer member
9246  to->accept(v);
9247  (void)v;
9248  /// optional member could be nullptr
9249  if (this->increment) {
9250  this->increment->accept(v);
9251  }
9252  (void)v;
9253  /// use -> for pointer member
9254  statement_block->accept(v);
9255  (void)v;
9256  }
9257 
9259  v.visit_from_statement(*this);
9260  }
9261 
9263  v.visit_from_statement(*this);
9264  }
9265 
9266 
9268  : name(name), from(from), to(to), increment(increment), statement_block(statement_block) { set_parent_in_children(); }
9269 
9270 
9271  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)
9272  : name(name), from(from), to(to), increment(increment), statement_block(statement_block) { set_parent_in_children(); }
9273 
9274 
9275  /// copy constructor implementation
9277  /// pointer member must be reseted with the new copy
9278  if (obj.name) {
9279  this->name.reset(obj.name->clone());
9280  }
9281  /// pointer member must be reseted with the new copy
9282  if (obj.from) {
9283  this->from.reset(obj.from->clone());
9284  }
9285  /// pointer member must be reseted with the new copy
9286  if (obj.to) {
9287  this->to.reset(obj.to->clone());
9288  }
9289  /// pointer member must be reseted with the new copy
9290  if (obj.increment) {
9291  this->increment.reset(obj.increment->clone());
9292  }
9293  /// pointer member must be reseted with the new copy
9294  if (obj.statement_block) {
9295  this->statement_block.reset(obj.statement_block->clone());
9296  }
9297 
9298  /// if there is a token, make copy
9299  if (obj.token) {
9300  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9301  }
9302 
9303  /// set parents
9305  }
9306 
9307 
9308  /// set this parent in the children
9310 
9311  /// optional member could be nullptr
9312  if (name) {
9313  name->set_parent(this);
9314  }
9315  /// optional member could be nullptr
9316  if (from) {
9317  from->set_parent(this);
9318  }
9319  /// optional member could be nullptr
9320  if (to) {
9321  to->set_parent(this);
9322  }
9323  /// optional member could be nullptr
9324  if (increment) {
9325  increment->set_parent(this);
9326  }
9327  /// optional member could be nullptr
9328  if (statement_block) {
9329  statement_block->set_parent(this);
9330  }
9331 
9332  }
9333 
9334 
9335 
9336  void FromStatement::set_name(std::shared_ptr<Name>&& name) {
9337  this->name = name;
9338  // set parents
9339  if (name) {
9340  name->set_parent(this);
9341  }
9342  }
9343 
9344  void FromStatement::set_name(const std::shared_ptr<Name>& name) {
9345  this->name = name;
9346  // set parents
9347  if (name) {
9348  name->set_parent(this);
9349  }
9350  }
9351 
9352 
9353  void FromStatement::set_from(std::shared_ptr<Expression>&& from) {
9354  this->from = from;
9355  // set parents
9356  if (from) {
9357  from->set_parent(this);
9358  }
9359  }
9360 
9361  void FromStatement::set_from(const std::shared_ptr<Expression>& from) {
9362  this->from = from;
9363  // set parents
9364  if (from) {
9365  from->set_parent(this);
9366  }
9367  }
9368 
9369 
9370  void FromStatement::set_to(std::shared_ptr<Expression>&& to) {
9371  this->to = to;
9372  // set parents
9373  if (to) {
9374  to->set_parent(this);
9375  }
9376  }
9377 
9378  void FromStatement::set_to(const std::shared_ptr<Expression>& to) {
9379  this->to = to;
9380  // set parents
9381  if (to) {
9382  to->set_parent(this);
9383  }
9384  }
9385 
9386 
9387  void FromStatement::set_increment(std::shared_ptr<Expression>&& increment) {
9388  this->increment = increment;
9389  // set parents
9390  if (increment) {
9391  increment->set_parent(this);
9392  }
9393  }
9394 
9395  void FromStatement::set_increment(const std::shared_ptr<Expression>& increment) {
9396  this->increment = increment;
9397  // set parents
9398  if (increment) {
9399  increment->set_parent(this);
9400  }
9401  }
9402 
9403 
9404  void FromStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9406  // set parents
9407  if (statement_block) {
9408  statement_block->set_parent(this);
9409  }
9410  }
9411 
9412  void FromStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9413  this->statement_block = statement_block;
9414  // set parents
9415  if (statement_block) {
9416  statement_block->set_parent(this);
9417  }
9418  }
9419 
9420 
9421 
9422  ///
9423  /// WhileStatement member functions definition
9424  ///
9425 
9426 
9427 
9428 
9429 
9430 
9431 
9432 
9434  /// use -> for pointer member
9435  condition->accept(v);
9436  (void)v;
9437  /// use -> for pointer member
9438  statement_block->accept(v);
9439  (void)v;
9440  }
9441 
9443  /// use -> for pointer member
9444  condition->accept(v);
9445  (void)v;
9446  /// use -> for pointer member
9447  statement_block->accept(v);
9448  (void)v;
9449  }
9450 
9452  v.visit_while_statement(*this);
9453  }
9454 
9456  v.visit_while_statement(*this);
9457  }
9458 
9459 
9461  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9462 
9463 
9464  WhileStatement::WhileStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block)
9465  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9466 
9467 
9468  /// copy constructor implementation
9470  /// pointer member must be reseted with the new copy
9471  if (obj.condition) {
9472  this->condition.reset(obj.condition->clone());
9473  }
9474  /// pointer member must be reseted with the new copy
9475  if (obj.statement_block) {
9476  this->statement_block.reset(obj.statement_block->clone());
9477  }
9478 
9479  /// if there is a token, make copy
9480  if (obj.token) {
9481  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9482  }
9483 
9484  /// set parents
9486  }
9487 
9488 
9489  /// set this parent in the children
9491 
9492  /// optional member could be nullptr
9493  if (condition) {
9494  condition->set_parent(this);
9495  }
9496  /// optional member could be nullptr
9497  if (statement_block) {
9498  statement_block->set_parent(this);
9499  }
9500 
9501  }
9502 
9503 
9504 
9505  void WhileStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9506  this->condition = condition;
9507  // set parents
9508  if (condition) {
9509  condition->set_parent(this);
9510  }
9511  }
9512 
9513  void WhileStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9514  this->condition = condition;
9515  // set parents
9516  if (condition) {
9517  condition->set_parent(this);
9518  }
9519  }
9520 
9521 
9522  void WhileStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9524  // set parents
9525  if (statement_block) {
9526  statement_block->set_parent(this);
9527  }
9528  }
9529 
9530  void WhileStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9531  this->statement_block = statement_block;
9532  // set parents
9533  if (statement_block) {
9534  statement_block->set_parent(this);
9535  }
9536  }
9537 
9538 
9539 
9540  ///
9541  /// IfStatement member functions definition
9542  ///
9543 
9544 
9545 
9546 
9547 
9548 
9549 
9550 
9551 
9552 
9553 
9554 
9555 
9556 
9558  /// use -> for pointer member
9559  condition->accept(v);
9560  (void)v;
9561  /// use -> for pointer member
9562  statement_block->accept(v);
9563  (void)v;
9564  /// visit each element of vector
9565  for (auto& item : this->elseifs) {
9566  item->accept(v);
9567  }
9568  (void)v;
9569  /// optional member could be nullptr
9570  if (this->elses) {
9571  this->elses->accept(v);
9572  }
9573  (void)v;
9574  }
9575 
9577  /// use -> for pointer member
9578  condition->accept(v);
9579  (void)v;
9580  /// use -> for pointer member
9581  statement_block->accept(v);
9582  (void)v;
9583  /// visit each element of vector
9584  for (auto& item : this->elseifs) {
9585  item->accept(v);
9586  }
9587  (void)v;
9588  /// optional member could be nullptr
9589  if (this->elses) {
9590  this->elses->accept(v);
9591  }
9592  (void)v;
9593  }
9594 
9596  v.visit_if_statement(*this);
9597  }
9598 
9600  v.visit_if_statement(*this);
9601  }
9602 
9603 
9604  IfStatement::IfStatement(Expression* condition, StatementBlock* statement_block, const ElseIfStatementVector& elseifs, ElseStatement* elses)
9605  : condition(condition), statement_block(statement_block), elseifs(elseifs), elses(elses) { set_parent_in_children(); }
9606 
9607 
9608  IfStatement::IfStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block, const ElseIfStatementVector& elseifs, std::shared_ptr<ElseStatement> elses)
9609  : condition(condition), statement_block(statement_block), elseifs(elseifs), elses(elses) { set_parent_in_children(); }
9610 
9611 
9612  /// copy constructor implementation
9614  /// pointer member must be reseted with the new copy
9615  if (obj.condition) {
9616  this->condition.reset(obj.condition->clone());
9617  }
9618  /// pointer member must be reseted with the new copy
9619  if (obj.statement_block) {
9620  this->statement_block.reset(obj.statement_block->clone());
9621  }
9622  /// copy each element of vector
9623  for (auto& item : obj.elseifs) {
9624  this->elseifs.emplace_back(item->clone());
9625  }
9626  /// pointer member must be reseted with the new copy
9627  if (obj.elses) {
9628  this->elses.reset(obj.elses->clone());
9629  }
9630 
9631  /// if there is a token, make copy
9632  if (obj.token) {
9633  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9634  }
9635 
9636  /// set parents
9638  }
9639 
9640 
9641  /// set this parent in the children
9643 
9644  /// optional member could be nullptr
9645  if (condition) {
9646  condition->set_parent(this);
9647  }
9648  /// optional member could be nullptr
9649  if (statement_block) {
9650  statement_block->set_parent(this);
9651  }
9652  /// set parent for each element of the vector
9653  for (auto& item : elseifs) {
9654  item->set_parent(this);
9655 
9656  }
9657  /// optional member could be nullptr
9658  if (elses) {
9659  elses->set_parent(this);
9660  }
9661 
9662  }
9663 
9664 
9665 
9666  void IfStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9667  this->condition = condition;
9668  // set parents
9669  if (condition) {
9670  condition->set_parent(this);
9671  }
9672  }
9673 
9674  void IfStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9675  this->condition = condition;
9676  // set parents
9677  if (condition) {
9678  condition->set_parent(this);
9679  }
9680  }
9681 
9682 
9683  void IfStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9685  // set parents
9686  if (statement_block) {
9687  statement_block->set_parent(this);
9688  }
9689  }
9690 
9691  void IfStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9692  this->statement_block = statement_block;
9693  // set parents
9694  if (statement_block) {
9695  statement_block->set_parent(this);
9696  }
9697  }
9698 
9699 
9701  this->elseifs = elseifs;
9702  // set parents
9703  for (auto& ii : elseifs) {
9704  ii->set_parent(this);
9705  }
9706  }
9707 
9709  this->elseifs = elseifs;
9710  // set parents
9711  for (auto& ii : elseifs) {
9712  ii->set_parent(this);
9713  }
9714  }
9715 
9716 
9717  void IfStatement::set_elses(std::shared_ptr<ElseStatement>&& elses) {
9718  this->elses = elses;
9719  // set parents
9720  if (elses) {
9721  elses->set_parent(this);
9722  }
9723  }
9724 
9725  void IfStatement::set_elses(const std::shared_ptr<ElseStatement>& elses) {
9726  this->elses = elses;
9727  // set parents
9728  if (elses) {
9729  elses->set_parent(this);
9730  }
9731  }
9732 
9733 
9734 
9735  ///
9736  /// ElseIfStatement member functions definition
9737  ///
9738 
9739 
9740 
9741 
9742 
9743 
9744 
9745 
9747  /// use -> for pointer member
9748  condition->accept(v);
9749  (void)v;
9750  /// use -> for pointer member
9751  statement_block->accept(v);
9752  (void)v;
9753  }
9754 
9756  /// use -> for pointer member
9757  condition->accept(v);
9758  (void)v;
9759  /// use -> for pointer member
9760  statement_block->accept(v);
9761  (void)v;
9762  }
9763 
9765  v.visit_else_if_statement(*this);
9766  }
9767 
9769  v.visit_else_if_statement(*this);
9770  }
9771 
9772 
9774  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9775 
9776 
9777  ElseIfStatement::ElseIfStatement(std::shared_ptr<Expression> condition, std::shared_ptr<StatementBlock> statement_block)
9778  : condition(condition), statement_block(statement_block) { set_parent_in_children(); }
9779 
9780 
9781  /// copy constructor implementation
9783  /// pointer member must be reseted with the new copy
9784  if (obj.condition) {
9785  this->condition.reset(obj.condition->clone());
9786  }
9787  /// pointer member must be reseted with the new copy
9788  if (obj.statement_block) {
9789  this->statement_block.reset(obj.statement_block->clone());
9790  }
9791 
9792  /// if there is a token, make copy
9793  if (obj.token) {
9794  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9795  }
9796 
9797  /// set parents
9799  }
9800 
9801 
9802  /// set this parent in the children
9804 
9805  /// optional member could be nullptr
9806  if (condition) {
9807  condition->set_parent(this);
9808  }
9809  /// optional member could be nullptr
9810  if (statement_block) {
9811  statement_block->set_parent(this);
9812  }
9813 
9814  }
9815 
9816 
9817 
9818  void ElseIfStatement::set_condition(std::shared_ptr<Expression>&& condition) {
9819  this->condition = condition;
9820  // set parents
9821  if (condition) {
9822  condition->set_parent(this);
9823  }
9824  }
9825 
9826  void ElseIfStatement::set_condition(const std::shared_ptr<Expression>& condition) {
9827  this->condition = condition;
9828  // set parents
9829  if (condition) {
9830  condition->set_parent(this);
9831  }
9832  }
9833 
9834 
9835  void ElseIfStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9837  // set parents
9838  if (statement_block) {
9839  statement_block->set_parent(this);
9840  }
9841  }
9842 
9843  void ElseIfStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9844  this->statement_block = statement_block;
9845  // set parents
9846  if (statement_block) {
9847  statement_block->set_parent(this);
9848  }
9849  }
9850 
9851 
9852 
9853  ///
9854  /// ElseStatement member functions definition
9855  ///
9856 
9857 
9858 
9859 
9860 
9862  /// use -> for pointer member
9863  statement_block->accept(v);
9864  (void)v;
9865  }
9866 
9868  /// use -> for pointer member
9869  statement_block->accept(v);
9870  (void)v;
9871  }
9872 
9874  v.visit_else_statement(*this);
9875  }
9876 
9878  v.visit_else_statement(*this);
9879  }
9880 
9881 
9883  : statement_block(statement_block) { set_parent_in_children(); }
9884 
9885 
9886  ElseStatement::ElseStatement(std::shared_ptr<StatementBlock> statement_block)
9887  : statement_block(statement_block) { set_parent_in_children(); }
9888 
9889 
9890  /// copy constructor implementation
9892  /// pointer member must be reseted with the new copy
9893  if (obj.statement_block) {
9894  this->statement_block.reset(obj.statement_block->clone());
9895  }
9896 
9897  /// if there is a token, make copy
9898  if (obj.token) {
9899  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
9900  }
9901 
9902  /// set parents
9904  }
9905 
9906 
9907  /// set this parent in the children
9909 
9910  /// optional member could be nullptr
9911  if (statement_block) {
9912  statement_block->set_parent(this);
9913  }
9914 
9915  }
9916 
9917 
9918 
9919  void ElseStatement::set_statement_block(std::shared_ptr<StatementBlock>&& statement_block) {
9921  // set parents
9922  if (statement_block) {
9923  statement_block->set_parent(this);
9924  }
9925  }
9926 
9927  void ElseStatement::set_statement_block(const std::shared_ptr<StatementBlock>& statement_block) {
9928  this->statement_block = statement_block;
9929  // set parents
9930  if (statement_block) {
9931  statement_block->set_parent(this);
9932  }
9933  }
9934 
9935 
9936 
9937  ///
9938  /// WatchStatement member functions definition
9939  ///
9940 
9941 
9942 /**
9943  * \brief Add member to statements by raw pointer
9944  */
9946  statements.emplace_back(n);
9947 
9948  // set parents
9949  n->set_parent(this);
9950 }
9951 
9952 /**
9953  * \brief Add member to statements by shared_ptr
9954  */
9955 void WatchStatement::emplace_back_watch(std::shared_ptr<Watch> n) {
9956  statements.emplace_back(n);
9957  // set parents
9958  n->set_parent(this);
9959 }
9960 
9961 /**
9962  * \brief Erase member to statements
9963  */
9964 WatchVector::const_iterator WatchStatement::erase_watch(WatchVector::const_iterator first) {
9965  return statements.erase(first);
9966 }
9967 /**
9968  * \brief Erase members to statements
9969  */
9970 WatchVector::const_iterator WatchStatement::erase_watch(WatchVector::const_iterator first, WatchVector::const_iterator last) {
9971  return statements.erase(first, last);
9972 }
9973 /**
9974  * \brief Erase non-consecutive members to statements
9975  *
9976  * loosely following the cpp reference of remove_if
9977  */
9978 size_t WatchStatement::erase_watch(std::unordered_set<Watch*>& to_be_erased) {
9979  auto first = statements.begin();
9980  auto last = statements.end();
9981  auto result = first;
9982 
9983  while (first != last) {
9984  // automatically erase dangling pointers from the uset while
9985  // looking for them to erase them in the vector
9986  if (to_be_erased.erase(first->get()) == 0) {
9987  reset_watch(result, *first);
9988  ++result;
9989  }
9990  ++first;
9991  }
9992 
9993  size_t out = last - result;
9994  erase_watch(result, last);
9995 
9996  return out;
9997 }
9998 
9999 /**
10000  * \brief Insert member to statements
10001  */
10002 WatchVector::const_iterator WatchStatement::insert_watch(WatchVector::const_iterator position, const std::shared_ptr<Watch>& n) {
10003  n->set_parent(this);
10004  return statements.insert(position, n);
10005 }
10006 
10007 /**
10008  * \brief Reset member to statements
10009  */
10010 void WatchStatement::reset_watch(WatchVector::const_iterator position, Watch* n) {
10011  //set parents
10012  n->set_parent(this);
10013 
10014  statements[position - statements.begin()].reset(n);
10015 }
10016 
10017 /**
10018  * \brief Reset member to statements
10019  */
10020 void WatchStatement::reset_watch(WatchVector::const_iterator position, std::shared_ptr<Watch> n) {
10021  //set parents
10022  n->set_parent(this);
10023 
10024  statements[position - statements.begin()] = n;
10025 }
10026 
10027 
10028 
10029 
10031  /// visit each element of vector
10032  for (auto& item : this->statements) {
10033  item->accept(v);
10034  }
10035  (void)v;
10036  }
10037 
10039  /// visit each element of vector
10040  for (auto& item : this->statements) {
10041  item->accept(v);
10042  }
10043  (void)v;
10044  }
10045 
10047  v.visit_watch_statement(*this);
10048  }
10049 
10051  v.visit_watch_statement(*this);
10052  }
10053 
10054 
10056  : statements(statements) { set_parent_in_children(); }
10057 
10058 
10059 
10060  /// copy constructor implementation
10062  /// copy each element of vector
10063  for (auto& item : obj.statements) {
10064  this->statements.emplace_back(item->clone());
10065  }
10066 
10067  /// if there is a token, make copy
10068  if (obj.token) {
10069  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10070  }
10071 
10072  /// set parents
10074  }
10075 
10076 
10077  /// set this parent in the children
10079 
10080  /// set parent for each element of the vector
10081  for (auto& item : statements) {
10082  item->set_parent(this);
10083 
10084  }
10085 
10086  }
10087 
10088 
10089 
10091  this->statements = statements;
10092  // set parents
10093  for (auto& ii : statements) {
10094  ii->set_parent(this);
10095  }
10096  }
10097 
10099  this->statements = statements;
10100  // set parents
10101  for (auto& ii : statements) {
10102  ii->set_parent(this);
10103  }
10104  }
10105 
10106 
10107 
10108  ///
10109  /// MutexLock member functions definition
10110  ///
10111 
10112 
10114  }
10115 
10117  }
10118 
10120  v.visit_mutex_lock(*this);
10121  }
10122 
10124  v.visit_mutex_lock(*this);
10125  }
10126 
10127 
10128 
10129 
10130  ///
10131  /// MutexUnlock member functions definition
10132  ///
10133 
10134 
10136  }
10137 
10139  }
10140 
10142  v.visit_mutex_unlock(*this);
10143  }
10144 
10146  v.visit_mutex_unlock(*this);
10147  }
10148 
10149 
10150 
10151 
10152  ///
10153  /// Conserve member functions definition
10154  ///
10155 
10156 
10157 
10158 
10159 
10160 
10161 
10162 
10164  /// use -> for pointer member
10165  react->accept(v);
10166  (void)v;
10167  /// use -> for pointer member
10168  expr->accept(v);
10169  (void)v;
10170  }
10171 
10173  /// use -> for pointer member
10174  react->accept(v);
10175  (void)v;
10176  /// use -> for pointer member
10177  expr->accept(v);
10178  (void)v;
10179  }
10180 
10182  v.visit_conserve(*this);
10183  }
10184 
10186  v.visit_conserve(*this);
10187  }
10188 
10189 
10191  : react(react), expr(expr) { set_parent_in_children(); }
10192 
10193 
10194  Conserve::Conserve(std::shared_ptr<Expression> react, std::shared_ptr<Expression> expr)
10195  : react(react), expr(expr) { set_parent_in_children(); }
10196 
10197 
10198  /// copy constructor implementation
10200  /// pointer member must be reseted with the new copy
10201  if (obj.react) {
10202  this->react.reset(obj.react->clone());
10203  }
10204  /// pointer member must be reseted with the new copy
10205  if (obj.expr) {
10206  this->expr.reset(obj.expr->clone());
10207  }
10208 
10209  /// if there is a token, make copy
10210  if (obj.token) {
10211  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10212  }
10213 
10214  /// set parents
10216  }
10217 
10218 
10219  /// set this parent in the children
10221 
10222  /// optional member could be nullptr
10223  if (react) {
10224  react->set_parent(this);
10225  }
10226  /// optional member could be nullptr
10227  if (expr) {
10228  expr->set_parent(this);
10229  }
10230 
10231  }
10232 
10233 
10234 
10235  void Conserve::set_react(std::shared_ptr<Expression>&& react) {
10236  this->react = react;
10237  // set parents
10238  if (react) {
10239  react->set_parent(this);
10240  }
10241  }
10242 
10243  void Conserve::set_react(const std::shared_ptr<Expression>& react) {
10244  this->react = react;
10245  // set parents
10246  if (react) {
10247  react->set_parent(this);
10248  }
10249  }
10250 
10251 
10252  void Conserve::set_expr(std::shared_ptr<Expression>&& expr) {
10253  this->expr = expr;
10254  // set parents
10255  if (expr) {
10256  expr->set_parent(this);
10257  }
10258  }
10259 
10260  void Conserve::set_expr(const std::shared_ptr<Expression>& expr) {
10261  this->expr = expr;
10262  // set parents
10263  if (expr) {
10264  expr->set_parent(this);
10265  }
10266  }
10267 
10268 
10269 
10270  ///
10271  /// Compartment member functions definition
10272  ///
10273 
10274 
10275 
10276 
10277 
10278 
10279 
10280 
10281 
10282 
10283 
10285  /// optional member could be nullptr
10286  if (this->index_name) {
10287  this->index_name->accept(v);
10288  }
10289  (void)v;
10290  /// use -> for pointer member
10291  volume->accept(v);
10292  (void)v;
10293  /// visit each element of vector
10294  for (auto& item : this->species) {
10295  item->accept(v);
10296  }
10297  (void)v;
10298  }
10299 
10301  /// optional member could be nullptr
10302  if (this->index_name) {
10303  this->index_name->accept(v);
10304  }
10305  (void)v;
10306  /// use -> for pointer member
10307  volume->accept(v);
10308  (void)v;
10309  /// visit each element of vector
10310  for (auto& item : this->species) {
10311  item->accept(v);
10312  }
10313  (void)v;
10314  }
10315 
10317  v.visit_compartment(*this);
10318  }
10319 
10321  v.visit_compartment(*this);
10322  }
10323 
10324 
10325  Compartment::Compartment(Name* index_name, Expression* volume, const NameVector& species)
10326  : index_name(index_name), volume(volume), species(species) { set_parent_in_children(); }
10327 
10328 
10329  Compartment::Compartment(std::shared_ptr<Name> index_name, std::shared_ptr<Expression> volume, const NameVector& species)
10330  : index_name(index_name), volume(volume), species(species) { set_parent_in_children(); }
10331 
10332 
10333  /// copy constructor implementation
10335  /// pointer member must be reseted with the new copy
10336  if (obj.index_name) {
10337  this->index_name.reset(obj.index_name->clone());
10338  }
10339  /// pointer member must be reseted with the new copy
10340  if (obj.volume) {
10341  this->volume.reset(obj.volume->clone());
10342  }
10343  /// copy each element of vector
10344  for (auto& item : obj.species) {
10345  this->species.emplace_back(item->clone());
10346  }
10347 
10348  /// if there is a token, make copy
10349  if (obj.token) {
10350  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10351  }
10352 
10353  /// set parents
10355  }
10356 
10357 
10358  /// set this parent in the children
10360 
10361  /// optional member could be nullptr
10362  if (index_name) {
10363  index_name->set_parent(this);
10364  }
10365  /// optional member could be nullptr
10366  if (volume) {
10367  volume->set_parent(this);
10368  }
10369  /// set parent for each element of the vector
10370  for (auto& item : species) {
10371  item->set_parent(this);
10372 
10373  }
10374 
10375  }
10376 
10377 
10378 
10379  void Compartment::set_index_name(std::shared_ptr<Name>&& index_name) {
10380  this->index_name = index_name;
10381  // set parents
10382  if (index_name) {
10383  index_name->set_parent(this);
10384  }
10385  }
10386 
10387  void Compartment::set_index_name(const std::shared_ptr<Name>& index_name) {
10388  this->index_name = index_name;
10389  // set parents
10390  if (index_name) {
10391  index_name->set_parent(this);
10392  }
10393  }
10394 
10395 
10396  void Compartment::set_volume(std::shared_ptr<Expression>&& volume) {
10397  this->volume = volume;
10398  // set parents
10399  if (volume) {
10400  volume->set_parent(this);
10401  }
10402  }
10403 
10404  void Compartment::set_volume(const std::shared_ptr<Expression>& volume) {
10405  this->volume = volume;
10406  // set parents
10407  if (volume) {
10408  volume->set_parent(this);
10409  }
10410  }
10411 
10412 
10414  this->species = species;
10415  // set parents
10416  for (auto& ii : species) {
10417  ii->set_parent(this);
10418  }
10419  }
10420 
10421  void Compartment::set_species(const NameVector& species) {
10422  this->species = species;
10423  // set parents
10424  for (auto& ii : species) {
10425  ii->set_parent(this);
10426  }
10427  }
10428 
10429 
10430 
10431  ///
10432  /// LonDiffuse member functions definition
10433  ///
10434 
10435 
10436 
10437 
10438 
10439 
10440 
10441 
10442 
10443 
10444 
10446  /// optional member could be nullptr
10447  if (this->index_name) {
10448  this->index_name->accept(v);
10449  }
10450  (void)v;
10451  /// use -> for pointer member
10452  rate->accept(v);
10453  (void)v;
10454  /// visit each element of vector
10455  for (auto& item : this->species) {
10456  item->accept(v);
10457  }
10458  (void)v;
10459  }
10460 
10462  /// optional member could be nullptr
10463  if (this->index_name) {
10464  this->index_name->accept(v);
10465  }
10466  (void)v;
10467  /// use -> for pointer member
10468  rate->accept(v);
10469  (void)v;
10470  /// visit each element of vector
10471  for (auto& item : this->species) {
10472  item->accept(v);
10473  }
10474  (void)v;
10475  }
10476 
10478  v.visit_lon_diffuse(*this);
10479  }
10480 
10482  v.visit_lon_diffuse(*this);
10483  }
10484 
10485 
10486  LonDiffuse::LonDiffuse(Name* index_name, Expression* rate, const NameVector& species)
10487  : index_name(index_name), rate(rate), species(species) { set_parent_in_children(); }
10488 
10489 
10490  LonDiffuse::LonDiffuse(std::shared_ptr<Name> index_name, std::shared_ptr<Expression> rate, const NameVector& species)
10491  : index_name(index_name), rate(rate), species(species) { set_parent_in_children(); }
10492 
10493 
10494  /// copy constructor implementation
10496  /// pointer member must be reseted with the new copy
10497  if (obj.index_name) {
10498  this->index_name.reset(obj.index_name->clone());
10499  }
10500  /// pointer member must be reseted with the new copy
10501  if (obj.rate) {
10502  this->rate.reset(obj.rate->clone());
10503  }
10504  /// copy each element of vector
10505  for (auto& item : obj.species) {
10506  this->species.emplace_back(item->clone());
10507  }
10508 
10509  /// if there is a token, make copy
10510  if (obj.token) {
10511  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10512  }
10513 
10514  /// set parents
10516  }
10517 
10518 
10519  /// set this parent in the children
10521 
10522  /// optional member could be nullptr
10523  if (index_name) {
10524  index_name->set_parent(this);
10525  }
10526  /// optional member could be nullptr
10527  if (rate) {
10528  rate->set_parent(this);
10529  }
10530  /// set parent for each element of the vector
10531  for (auto& item : species) {
10532  item->set_parent(this);
10533 
10534  }
10535 
10536  }
10537 
10538 
10539 
10540  void LonDiffuse::set_index_name(std::shared_ptr<Name>&& index_name) {
10541  this->index_name = index_name;
10542  // set parents
10543  if (index_name) {
10544  index_name->set_parent(this);
10545  }
10546  }
10547 
10548  void LonDiffuse::set_index_name(const std::shared_ptr<Name>& index_name) {
10549  this->index_name = index_name;
10550  // set parents
10551  if (index_name) {
10552  index_name->set_parent(this);
10553  }
10554  }
10555 
10556 
10557  void LonDiffuse::set_rate(std::shared_ptr<Expression>&& rate) {
10558  this->rate = rate;
10559  // set parents
10560  if (rate) {
10561  rate->set_parent(this);
10562  }
10563  }
10564 
10565  void LonDiffuse::set_rate(const std::shared_ptr<Expression>& rate) {
10566  this->rate = rate;
10567  // set parents
10568  if (rate) {
10569  rate->set_parent(this);
10570  }
10571  }
10572 
10573 
10575  this->species = species;
10576  // set parents
10577  for (auto& ii : species) {
10578  ii->set_parent(this);
10579  }
10580  }
10581 
10582  void LonDiffuse::set_species(const NameVector& species) {
10583  this->species = species;
10584  // set parents
10585  for (auto& ii : species) {
10586  ii->set_parent(this);
10587  }
10588  }
10589 
10590 
10591 
10592  ///
10593  /// ReactionStatement member functions definition
10594  ///
10595 
10596 
10597 
10598 
10599 
10600 
10601 
10602 
10603 
10604 
10605 
10606 
10607 
10608 
10609 
10610 
10611 
10613  /// use -> for pointer member
10614  reaction1->accept(v);
10615  (void)v;
10616  /// use . for object member
10617  op.accept(v);
10618  (void)v;
10619  /// optional member could be nullptr
10620  if (this->reaction2) {
10621  this->reaction2->accept(v);
10622  }
10623  (void)v;
10624  /// use -> for pointer member
10625  expression1->accept(v);
10626  (void)v;
10627  /// optional member could be nullptr
10628  if (this->expression2) {
10629  this->expression2->accept(v);
10630  }
10631  (void)v;
10632  }
10633 
10635  /// use -> for pointer member
10636  reaction1->accept(v);
10637  (void)v;
10638  /// use . for object member
10639  op.accept(v);
10640  (void)v;
10641  /// optional member could be nullptr
10642  if (this->reaction2) {
10643  this->reaction2->accept(v);
10644  }
10645  (void)v;
10646  /// use -> for pointer member
10647  expression1->accept(v);
10648  (void)v;
10649  /// optional member could be nullptr
10650  if (this->expression2) {
10651  this->expression2->accept(v);
10652  }
10653  (void)v;
10654  }
10655 
10657  v.visit_reaction_statement(*this);
10658  }
10659 
10661  v.visit_reaction_statement(*this);
10662  }
10663 
10664 
10665  ReactionStatement::ReactionStatement(Expression* reaction1, const ReactionOperator& op, Expression* reaction2, Expression* expression1, Expression* expression2)
10666  : reaction1(reaction1), op(op), reaction2(reaction2), expression1(expression1), expression2(expression2) { set_parent_in_children(); }
10667 
10668 
10669  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)
10670  : reaction1(reaction1), op(op), reaction2(reaction2), expression1(expression1), expression2(expression2) { set_parent_in_children(); }
10671 
10672 
10673  /// copy constructor implementation
10675  /// pointer member must be reseted with the new copy
10676  if (obj.reaction1) {
10677  this->reaction1.reset(obj.reaction1->clone());
10678  }
10679  /// object member can be just copied by value
10680  this->op = obj.op;
10681  /// pointer member must be reseted with the new copy
10682  if (obj.reaction2) {
10683  this->reaction2.reset(obj.reaction2->clone());
10684  }
10685  /// pointer member must be reseted with the new copy
10686  if (obj.expression1) {
10687  this->expression1.reset(obj.expression1->clone());
10688  }
10689  /// pointer member must be reseted with the new copy
10690  if (obj.expression2) {
10691  this->expression2.reset(obj.expression2->clone());
10692  }
10693 
10694  /// if there is a token, make copy
10695  if (obj.token) {
10696  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10697  }
10698 
10699  /// set parents
10701  }
10702 
10703 
10704  /// set this parent in the children
10706 
10707  /// optional member could be nullptr
10708  if (reaction1) {
10709  reaction1->set_parent(this);
10710  }
10711  op.set_parent(this);
10712  /// optional member could be nullptr
10713  if (reaction2) {
10714  reaction2->set_parent(this);
10715  }
10716  /// optional member could be nullptr
10717  if (expression1) {
10718  expression1->set_parent(this);
10719  }
10720  /// optional member could be nullptr
10721  if (expression2) {
10722  expression2->set_parent(this);
10723  }
10724 
10725  }
10726 
10727 
10728 
10729  void ReactionStatement::set_reaction1(std::shared_ptr<Expression>&& reaction1) {
10730  this->reaction1 = reaction1;
10731  // set parents
10732  if (reaction1) {
10733  reaction1->set_parent(this);
10734  }
10735  }
10736 
10737  void ReactionStatement::set_reaction1(const std::shared_ptr<Expression>& reaction1) {
10738  this->reaction1 = reaction1;
10739  // set parents
10740  if (reaction1) {
10741  reaction1->set_parent(this);
10742  }
10743  }
10744 
10745 
10747  this->op = op;
10748  }
10749 
10751  this->op = op;
10752  }
10753 
10754 
10755  void ReactionStatement::set_reaction2(std::shared_ptr<Expression>&& reaction2) {
10756  this->reaction2 = reaction2;
10757  // set parents
10758  if (reaction2) {
10759  reaction2->set_parent(this);
10760  }
10761  }
10762 
10763  void ReactionStatement::set_reaction2(const std::shared_ptr<Expression>& reaction2) {
10764  this->reaction2 = reaction2;
10765  // set parents
10766  if (reaction2) {
10767  reaction2->set_parent(this);
10768  }
10769  }
10770 
10771 
10772  void ReactionStatement::set_expression1(std::shared_ptr<Expression>&& expression1) {
10773  this->expression1 = expression1;
10774  // set parents
10775  if (expression1) {
10776  expression1->set_parent(this);
10777  }
10778  }
10779 
10780  void ReactionStatement::set_expression1(const std::shared_ptr<Expression>& expression1) {
10781  this->expression1 = expression1;
10782  // set parents
10783  if (expression1) {
10784  expression1->set_parent(this);
10785  }
10786  }
10787 
10788 
10789  void ReactionStatement::set_expression2(std::shared_ptr<Expression>&& expression2) {
10790  this->expression2 = expression2;
10791  // set parents
10792  if (expression2) {
10793  expression2->set_parent(this);
10794  }
10795  }
10796 
10797  void ReactionStatement::set_expression2(const std::shared_ptr<Expression>& expression2) {
10798  this->expression2 = expression2;
10799  // set parents
10800  if (expression2) {
10801  expression2->set_parent(this);
10802  }
10803  }
10804 
10805 
10806 
10807  ///
10808  /// LagStatement member functions definition
10809  ///
10810 
10811 
10812 
10813 
10814 
10815 
10816 
10817 
10819  /// use -> for pointer member
10820  name->accept(v);
10821  (void)v;
10822  /// use -> for pointer member
10823  byname->accept(v);
10824  (void)v;
10825  }
10826 
10828  /// use -> for pointer member
10829  name->accept(v);
10830  (void)v;
10831  /// use -> for pointer member
10832  byname->accept(v);
10833  (void)v;
10834  }
10835 
10837  v.visit_lag_statement(*this);
10838  }
10839 
10841  v.visit_lag_statement(*this);
10842  }
10843 
10844 
10846  : name(name), byname(byname) { set_parent_in_children(); }
10847 
10848 
10849  LagStatement::LagStatement(std::shared_ptr<Identifier> name, std::shared_ptr<Name> byname)
10850  : name(name), byname(byname) { set_parent_in_children(); }
10851 
10852 
10853  /// copy constructor implementation
10855  /// pointer member must be reseted with the new copy
10856  if (obj.name) {
10857  this->name.reset(obj.name->clone());
10858  }
10859  /// pointer member must be reseted with the new copy
10860  if (obj.byname) {
10861  this->byname.reset(obj.byname->clone());
10862  }
10863 
10864  /// if there is a token, make copy
10865  if (obj.token) {
10866  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10867  }
10868 
10869  /// set parents
10871  }
10872 
10873 
10874  /// set this parent in the children
10876 
10877  /// optional member could be nullptr
10878  if (name) {
10879  name->set_parent(this);
10880  }
10881  /// optional member could be nullptr
10882  if (byname) {
10883  byname->set_parent(this);
10884  }
10885 
10886  }
10887 
10888 
10889 
10890  void LagStatement::set_name(std::shared_ptr<Identifier>&& name) {
10891  this->name = name;
10892  // set parents
10893  if (name) {
10894  name->set_parent(this);
10895  }
10896  }
10897 
10898  void LagStatement::set_name(const std::shared_ptr<Identifier>& name) {
10899  this->name = name;
10900  // set parents
10901  if (name) {
10902  name->set_parent(this);
10903  }
10904  }
10905 
10906 
10907  void LagStatement::set_byname(std::shared_ptr<Name>&& byname) {
10908  this->byname = byname;
10909  // set parents
10910  if (byname) {
10911  byname->set_parent(this);
10912  }
10913  }
10914 
10915  void LagStatement::set_byname(const std::shared_ptr<Name>& byname) {
10916  this->byname = byname;
10917  // set parents
10918  if (byname) {
10919  byname->set_parent(this);
10920  }
10921  }
10922 
10923 
10924 
10925  ///
10926  /// ConstantStatement member functions definition
10927  ///
10928 
10929 
10930 
10931 
10932 
10934  /// use -> for pointer member
10935  constant->accept(v);
10936  (void)v;
10937  }
10938 
10940  /// use -> for pointer member
10941  constant->accept(v);
10942  (void)v;
10943  }
10944 
10946  v.visit_constant_statement(*this);
10947  }
10948 
10950  v.visit_constant_statement(*this);
10951  }
10952 
10953 
10955  : constant(constant) { set_parent_in_children(); }
10956 
10957 
10958  ConstantStatement::ConstantStatement(std::shared_ptr<ConstantVar> constant)
10959  : constant(constant) { set_parent_in_children(); }
10960 
10961 
10962  /// copy constructor implementation
10964  /// pointer member must be reseted with the new copy
10965  if (obj.constant) {
10966  this->constant.reset(obj.constant->clone());
10967  }
10968 
10969  /// if there is a token, make copy
10970  if (obj.token) {
10971  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
10972  }
10973 
10974  /// set parents
10976  }
10977 
10978 
10979  /// set this parent in the children
10981 
10982  /// optional member could be nullptr
10983  if (constant) {
10984  constant->set_parent(this);
10985  }
10986 
10987  }
10988 
10989 
10990 
10991  void ConstantStatement::set_constant(std::shared_ptr<ConstantVar>&& constant) {
10992  this->constant = constant;
10993  // set parents
10994  if (constant) {
10995  constant->set_parent(this);
10996  }
10997  }
10998 
10999  void ConstantStatement::set_constant(const std::shared_ptr<ConstantVar>& constant) {
11000  this->constant = constant;
11001  // set parents
11002  if (constant) {
11003  constant->set_parent(this);
11004  }
11005  }
11006 
11007 
11008 
11009  ///
11010  /// TableStatement member functions definition
11011  ///
11012 
11013 
11014 
11015 
11016 
11017 
11018 
11019 
11020 
11021 
11022 
11023 
11024 
11025 
11026 
11027 
11028 
11030  /// visit each element of vector
11031  for (auto& item : this->table_vars) {
11032  item->accept(v);
11033  }
11034  (void)v;
11035  /// visit each element of vector
11036  for (auto& item : this->depend_vars) {
11037  item->accept(v);
11038  }
11039  (void)v;
11040  /// use -> for pointer member
11041  from->accept(v);
11042  (void)v;
11043  /// use -> for pointer member
11044  to->accept(v);
11045  (void)v;
11046  /// use -> for pointer member
11047  with->accept(v);
11048  (void)v;
11049  }
11050 
11052  /// visit each element of vector
11053  for (auto& item : this->table_vars) {
11054  item->accept(v);
11055  }
11056  (void)v;
11057  /// visit each element of vector
11058  for (auto& item : this->depend_vars) {
11059  item->accept(v);
11060  }
11061  (void)v;
11062  /// use -> for pointer member
11063  from->accept(v);
11064  (void)v;
11065  /// use -> for pointer member
11066  to->accept(v);
11067  (void)v;
11068  /// use -> for pointer member
11069  with->accept(v);
11070  (void)v;
11071  }
11072 
11074  v.visit_table_statement(*this);
11075  }
11076 
11078  v.visit_table_statement(*this);
11079  }
11080 
11081 
11082  TableStatement::TableStatement(const NameVector& table_vars, const NameVector& depend_vars, Expression* from, Expression* to, Integer* with)
11083  : table_vars(table_vars), depend_vars(depend_vars), from(from), to(to), with(with) { set_parent_in_children(); }
11084 
11085 
11086  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)
11087  : table_vars(table_vars), depend_vars(depend_vars), from(from), to(to), with(with) { set_parent_in_children(); }
11088 
11089 
11090  /// copy constructor implementation
11092  /// copy each element of vector
11093  for (auto& item : obj.table_vars) {
11094  this->table_vars.emplace_back(item->clone());
11095  }
11096  /// copy each element of vector
11097  for (auto& item : obj.depend_vars) {
11098  this->depend_vars.emplace_back(item->clone());
11099  }
11100  /// pointer member must be reseted with the new copy
11101  if (obj.from) {
11102  this->from.reset(obj.from->clone());
11103  }
11104  /// pointer member must be reseted with the new copy
11105  if (obj.to) {
11106  this->to.reset(obj.to->clone());
11107  }
11108  /// pointer member must be reseted with the new copy
11109  if (obj.with) {
11110  this->with.reset(obj.with->clone());
11111  }
11112 
11113  /// if there is a token, make copy
11114  if (obj.token) {
11115  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11116  }
11117 
11118  /// set parents
11120  }
11121 
11122 
11123  /// set this parent in the children
11125 
11126  /// set parent for each element of the vector
11127  for (auto& item : table_vars) {
11128  item->set_parent(this);
11129 
11130  }
11131  /// set parent for each element of the vector
11132  for (auto& item : depend_vars) {
11133  item->set_parent(this);
11134 
11135  }
11136  /// optional member could be nullptr
11137  if (from) {
11138  from->set_parent(this);
11139  }
11140  /// optional member could be nullptr
11141  if (to) {
11142  to->set_parent(this);
11143  }
11144  /// optional member could be nullptr
11145  if (with) {
11146  with->set_parent(this);
11147  }
11148 
11149  }
11150 
11151 
11152 
11154  this->table_vars = table_vars;
11155  // set parents
11156  for (auto& ii : table_vars) {
11157  ii->set_parent(this);
11158  }
11159  }
11160 
11161  void TableStatement::set_table_vars(const NameVector& table_vars) {
11162  this->table_vars = table_vars;
11163  // set parents
11164  for (auto& ii : table_vars) {
11165  ii->set_parent(this);
11166  }
11167  }
11168 
11169 
11171  this->depend_vars = depend_vars;
11172  // set parents
11173  for (auto& ii : depend_vars) {
11174  ii->set_parent(this);
11175  }
11176  }
11177 
11178  void TableStatement::set_depend_vars(const NameVector& depend_vars) {
11179  this->depend_vars = depend_vars;
11180  // set parents
11181  for (auto& ii : depend_vars) {
11182  ii->set_parent(this);
11183  }
11184  }
11185 
11186 
11187  void TableStatement::set_from(std::shared_ptr<Expression>&& from) {
11188  this->from = from;
11189  // set parents
11190  if (from) {
11191  from->set_parent(this);
11192  }
11193  }
11194 
11195  void TableStatement::set_from(const std::shared_ptr<Expression>& from) {
11196  this->from = from;
11197  // set parents
11198  if (from) {
11199  from->set_parent(this);
11200  }
11201  }
11202 
11203 
11204  void TableStatement::set_to(std::shared_ptr<Expression>&& to) {
11205  this->to = to;
11206  // set parents
11207  if (to) {
11208  to->set_parent(this);
11209  }
11210  }
11211 
11212  void TableStatement::set_to(const std::shared_ptr<Expression>& to) {
11213  this->to = to;
11214  // set parents
11215  if (to) {
11216  to->set_parent(this);
11217  }
11218  }
11219 
11220 
11221  void TableStatement::set_with(std::shared_ptr<Integer>&& with) {
11222  this->with = with;
11223  // set parents
11224  if (with) {
11225  with->set_parent(this);
11226  }
11227  }
11228 
11229  void TableStatement::set_with(const std::shared_ptr<Integer>& with) {
11230  this->with = with;
11231  // set parents
11232  if (with) {
11233  with->set_parent(this);
11234  }
11235  }
11236 
11237 
11238 
11239  ///
11240  /// Suffix member functions definition
11241  ///
11242 
11243 
11244 
11245 
11246 
11247 
11248  std::string Suffix::get_node_name() const {
11249  return name->get_node_name();
11250  }
11251 
11253  /// use -> for pointer member
11254  type->accept(v);
11255  (void)v;
11256  /// use -> for pointer member
11257  name->accept(v);
11258  (void)v;
11259  }
11260 
11262  /// use -> for pointer member
11263  type->accept(v);
11264  (void)v;
11265  /// use -> for pointer member
11266  name->accept(v);
11267  (void)v;
11268  }
11269 
11271  v.visit_suffix(*this);
11272  }
11273 
11275  v.visit_suffix(*this);
11276  }
11277 
11278 
11281 
11282 
11283  Suffix::Suffix(std::shared_ptr<Name> type, std::shared_ptr<Name> name)
11285 
11286 
11287  /// copy constructor implementation
11288  Suffix::Suffix(const Suffix& obj) {
11289  /// pointer member must be reseted with the new copy
11290  if (obj.type) {
11291  this->type.reset(obj.type->clone());
11292  }
11293  /// pointer member must be reseted with the new copy
11294  if (obj.name) {
11295  this->name.reset(obj.name->clone());
11296  }
11297 
11298  /// if there is a token, make copy
11299  if (obj.token) {
11300  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11301  }
11302 
11303  /// set parents
11305  }
11306 
11307 
11308  /// set this parent in the children
11310 
11311  /// optional member could be nullptr
11312  if (type) {
11313  type->set_parent(this);
11314  }
11315  /// optional member could be nullptr
11316  if (name) {
11317  name->set_parent(this);
11318  }
11319 
11320  }
11321 
11322 
11323 
11324  void Suffix::set_type(std::shared_ptr<Name>&& type) {
11325  this->type = type;
11326  // set parents
11327  if (type) {
11328  type->set_parent(this);
11329  }
11330  }
11331 
11332  void Suffix::set_type(const std::shared_ptr<Name>& type) {
11333  this->type = type;
11334  // set parents
11335  if (type) {
11336  type->set_parent(this);
11337  }
11338  }
11339 
11340 
11341  void Suffix::set_name(std::shared_ptr<Name>&& name) {
11342  this->name = name;
11343  // set parents
11344  if (name) {
11345  name->set_parent(this);
11346  }
11347  }
11348 
11349  void Suffix::set_name(const std::shared_ptr<Name>& name) {
11350  this->name = name;
11351  // set parents
11352  if (name) {
11353  name->set_parent(this);
11354  }
11355  }
11356 
11357 
11358 
11359  ///
11360  /// Useion member functions definition
11361  ///
11362 
11363 
11364 
11365  std::string Useion::get_node_name() const {
11366  return name->get_node_name();
11367  }
11368 
11369 
11370 
11371 
11372 
11373 
11374 
11375 
11376 
11377 
11378 
11379 
11380 
11382  /// use -> for pointer member
11383  name->accept(v);
11384  (void)v;
11385  /// visit each element of vector
11386  for (auto& item : this->readlist) {
11387  item->accept(v);
11388  }
11389  (void)v;
11390  /// visit each element of vector
11391  for (auto& item : this->writelist) {
11392  item->accept(v);
11393  }
11394  (void)v;
11395  /// optional member could be nullptr
11396  if (this->valence) {
11397  this->valence->accept(v);
11398  }
11399  (void)v;
11400  /// optional member could be nullptr
11401  if (this->ontology_id) {
11402  this->ontology_id->accept(v);
11403  }
11404  (void)v;
11405  }
11406 
11408  /// use -> for pointer member
11409  name->accept(v);
11410  (void)v;
11411  /// visit each element of vector
11412  for (auto& item : this->readlist) {
11413  item->accept(v);
11414  }
11415  (void)v;
11416  /// visit each element of vector
11417  for (auto& item : this->writelist) {
11418  item->accept(v);
11419  }
11420  (void)v;
11421  /// optional member could be nullptr
11422  if (this->valence) {
11423  this->valence->accept(v);
11424  }
11425  (void)v;
11426  /// optional member could be nullptr
11427  if (this->ontology_id) {
11428  this->ontology_id->accept(v);
11429  }
11430  (void)v;
11431  }
11432 
11434  v.visit_useion(*this);
11435  }
11436 
11438  v.visit_useion(*this);
11439  }
11440 
11441 
11442  Useion::Useion(Name* name, const ReadIonVarVector& readlist, const WriteIonVarVector& writelist, Valence* valence, String* ontology_id)
11443  : name(name), readlist(readlist), writelist(writelist), valence(valence), ontology_id(ontology_id) { set_parent_in_children(); }
11444 
11445 
11446  Useion::Useion(std::shared_ptr<Name> name, const ReadIonVarVector& readlist, const WriteIonVarVector& writelist, std::shared_ptr<Valence> valence, std::shared_ptr<String> ontology_id)
11447  : name(name), readlist(readlist), writelist(writelist), valence(valence), ontology_id(ontology_id) { set_parent_in_children(); }
11448 
11449 
11450  /// copy constructor implementation
11451  Useion::Useion(const Useion& obj) {
11452  /// pointer member must be reseted with the new copy
11453  if (obj.name) {
11454  this->name.reset(obj.name->clone());
11455  }
11456  /// copy each element of vector
11457  for (auto& item : obj.readlist) {
11458  this->readlist.emplace_back(item->clone());
11459  }
11460  /// copy each element of vector
11461  for (auto& item : obj.writelist) {
11462  this->writelist.emplace_back(item->clone());
11463  }
11464  /// pointer member must be reseted with the new copy
11465  if (obj.valence) {
11466  this->valence.reset(obj.valence->clone());
11467  }
11468  /// pointer member must be reseted with the new copy
11469  if (obj.ontology_id) {
11470  this->ontology_id.reset(obj.ontology_id->clone());
11471  }
11472 
11473  /// if there is a token, make copy
11474  if (obj.token) {
11475  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11476  }
11477 
11478  /// set parents
11480  }
11481 
11482 
11483  /// set this parent in the children
11485 
11486  /// optional member could be nullptr
11487  if (name) {
11488  name->set_parent(this);
11489  }
11490  /// set parent for each element of the vector
11491  for (auto& item : readlist) {
11492  item->set_parent(this);
11493 
11494  }
11495  /// set parent for each element of the vector
11496  for (auto& item : writelist) {
11497  item->set_parent(this);
11498 
11499  }
11500  /// optional member could be nullptr
11501  if (valence) {
11502  valence->set_parent(this);
11503  }
11504  /// optional member could be nullptr
11505  if (ontology_id) {
11506  ontology_id->set_parent(this);
11507  }
11508 
11509  }
11510 
11511 
11512 
11513  void Useion::set_name(std::shared_ptr<Name>&& name) {
11514  this->name = name;
11515  // set parents
11516  if (name) {
11517  name->set_parent(this);
11518  }
11519  }
11520 
11521  void Useion::set_name(const std::shared_ptr<Name>& name) {
11522  this->name = name;
11523  // set parents
11524  if (name) {
11525  name->set_parent(this);
11526  }
11527  }
11528 
11529 
11531  this->readlist = readlist;
11532  // set parents
11533  for (auto& ii : readlist) {
11534  ii->set_parent(this);
11535  }
11536  }
11537 
11538  void Useion::set_readlist(const ReadIonVarVector& readlist) {
11539  this->readlist = readlist;
11540  // set parents
11541  for (auto& ii : readlist) {
11542  ii->set_parent(this);
11543  }
11544  }
11545 
11546 
11548  this->writelist = writelist;
11549  // set parents
11550  for (auto& ii : writelist) {
11551  ii->set_parent(this);
11552  }
11553  }
11554 
11555  void Useion::set_writelist(const WriteIonVarVector& writelist) {
11556  this->writelist = writelist;
11557  // set parents
11558  for (auto& ii : writelist) {
11559  ii->set_parent(this);
11560  }
11561  }
11562 
11563 
11564  void Useion::set_valence(std::shared_ptr<Valence>&& valence) {
11565  this->valence = valence;
11566  // set parents
11567  if (valence) {
11568  valence->set_parent(this);
11569  }
11570  }
11571 
11572  void Useion::set_valence(const std::shared_ptr<Valence>& valence) {
11573  this->valence = valence;
11574  // set parents
11575  if (valence) {
11576  valence->set_parent(this);
11577  }
11578  }
11579 
11580 
11581  void Useion::set_ontology_id(std::shared_ptr<String>&& ontology_id) {
11582  this->ontology_id = ontology_id;
11583  // set parents
11584  if (ontology_id) {
11585  ontology_id->set_parent(this);
11586  }
11587  }
11588 
11589  void Useion::set_ontology_id(const std::shared_ptr<String>& ontology_id) {
11590  this->ontology_id = ontology_id;
11591  // set parents
11592  if (ontology_id) {
11593  ontology_id->set_parent(this);
11594  }
11595  }
11596 
11597 
11598 
11599  ///
11600  /// Nonspecific member functions definition
11601  ///
11602 
11603 
11604 
11605 
11606 
11608  /// visit each element of vector
11609  for (auto& item : this->currents) {
11610  item->accept(v);
11611  }
11612  (void)v;
11613  }
11614 
11616  /// visit each element of vector
11617  for (auto& item : this->currents) {
11618  item->accept(v);
11619  }
11620  (void)v;
11621  }
11622 
11624  v.visit_nonspecific(*this);
11625  }
11626 
11628  v.visit_nonspecific(*this);
11629  }
11630 
11631 
11634 
11635 
11636 
11637  /// copy constructor implementation
11639  /// copy each element of vector
11640  for (auto& item : obj.currents) {
11641  this->currents.emplace_back(item->clone());
11642  }
11643 
11644  /// if there is a token, make copy
11645  if (obj.token) {
11646  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11647  }
11648 
11649  /// set parents
11651  }
11652 
11653 
11654  /// set this parent in the children
11656 
11657  /// set parent for each element of the vector
11658  for (auto& item : currents) {
11659  item->set_parent(this);
11660 
11661  }
11662 
11663  }
11664 
11665 
11666 
11668  this->currents = currents;
11669  // set parents
11670  for (auto& ii : currents) {
11671  ii->set_parent(this);
11672  }
11673  }
11674 
11676  this->currents = currents;
11677  // set parents
11678  for (auto& ii : currents) {
11679  ii->set_parent(this);
11680  }
11681  }
11682 
11683 
11684 
11685  ///
11686  /// ElectrodeCurrent member functions definition
11687  ///
11688 
11689 
11690 
11691 
11692 
11694  /// visit each element of vector
11695  for (auto& item : this->currents) {
11696  item->accept(v);
11697  }
11698  (void)v;
11699  }
11700 
11702  /// visit each element of vector
11703  for (auto& item : this->currents) {
11704  item->accept(v);
11705  }
11706  (void)v;
11707  }
11708 
11710  v.visit_electrode_current(*this);
11711  }
11712 
11714  v.visit_electrode_current(*this);
11715  }
11716 
11717 
11720 
11721 
11722 
11723  /// copy constructor implementation
11725  /// copy each element of vector
11726  for (auto& item : obj.currents) {
11727  this->currents.emplace_back(item->clone());
11728  }
11729 
11730  /// if there is a token, make copy
11731  if (obj.token) {
11732  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11733  }
11734 
11735  /// set parents
11737  }
11738 
11739 
11740  /// set this parent in the children
11742 
11743  /// set parent for each element of the vector
11744  for (auto& item : currents) {
11745  item->set_parent(this);
11746 
11747  }
11748 
11749  }
11750 
11751 
11752 
11754  this->currents = currents;
11755  // set parents
11756  for (auto& ii : currents) {
11757  ii->set_parent(this);
11758  }
11759  }
11760 
11762  this->currents = currents;
11763  // set parents
11764  for (auto& ii : currents) {
11765  ii->set_parent(this);
11766  }
11767  }
11768 
11769 
11770 
11771  ///
11772  /// Range member functions definition
11773  ///
11774 
11775 
11776 
11777 
11778 
11780  /// visit each element of vector
11781  for (auto& item : this->variables) {
11782  item->accept(v);
11783  }
11784  (void)v;
11785  }
11786 
11788  /// visit each element of vector
11789  for (auto& item : this->variables) {
11790  item->accept(v);
11791  }
11792  (void)v;
11793  }
11794 
11796  v.visit_range(*this);
11797  }
11798 
11800  v.visit_range(*this);
11801  }
11802 
11803 
11804  Range::Range(const RangeVarVector& variables)
11805  : variables(variables) { set_parent_in_children(); }
11806 
11807 
11808 
11809  /// copy constructor implementation
11810  Range::Range(const Range& obj) {
11811  /// copy each element of vector
11812  for (auto& item : obj.variables) {
11813  this->variables.emplace_back(item->clone());
11814  }
11815 
11816  /// if there is a token, make copy
11817  if (obj.token) {
11818  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11819  }
11820 
11821  /// set parents
11823  }
11824 
11825 
11826  /// set this parent in the children
11828 
11829  /// set parent for each element of the vector
11830  for (auto& item : variables) {
11831  item->set_parent(this);
11832 
11833  }
11834 
11835  }
11836 
11837 
11838 
11840  this->variables = variables;
11841  // set parents
11842  for (auto& ii : variables) {
11843  ii->set_parent(this);
11844  }
11845  }
11846 
11847  void Range::set_variables(const RangeVarVector& variables) {
11848  this->variables = variables;
11849  // set parents
11850  for (auto& ii : variables) {
11851  ii->set_parent(this);
11852  }
11853  }
11854 
11855 
11856 
11857  ///
11858  /// Global member functions definition
11859  ///
11860 
11861 
11862 /**
11863  * \brief Add member to variables by raw pointer
11864  */
11866  variables.emplace_back(n);
11867 
11868  // set parents
11869  n->set_parent(this);
11870 }
11871 
11872 /**
11873  * \brief Add member to variables by shared_ptr
11874  */
11875 void Global::emplace_back_global_var(std::shared_ptr<GlobalVar> n) {
11876  variables.emplace_back(n);
11877  // set parents
11878  n->set_parent(this);
11879 }
11880 
11881 /**
11882  * \brief Erase member to variables
11883  */
11884 GlobalVarVector::const_iterator Global::erase_global_var(GlobalVarVector::const_iterator first) {
11885  return variables.erase(first);
11886 }
11887 /**
11888  * \brief Erase members to variables
11889  */
11890 GlobalVarVector::const_iterator Global::erase_global_var(GlobalVarVector::const_iterator first, GlobalVarVector::const_iterator last) {
11891  return variables.erase(first, last);
11892 }
11893 /**
11894  * \brief Erase non-consecutive members to variables
11895  *
11896  * loosely following the cpp reference of remove_if
11897  */
11898 size_t Global::erase_global_var(std::unordered_set<GlobalVar*>& to_be_erased) {
11899  auto first = variables.begin();
11900  auto last = variables.end();
11901  auto result = first;
11902 
11903  while (first != last) {
11904  // automatically erase dangling pointers from the uset while
11905  // looking for them to erase them in the vector
11906  if (to_be_erased.erase(first->get()) == 0) {
11907  reset_global_var(result, *first);
11908  ++result;
11909  }
11910  ++first;
11911  }
11912 
11913  size_t out = last - result;
11914  erase_global_var(result, last);
11915 
11916  return out;
11917 }
11918 
11919 /**
11920  * \brief Insert member to variables
11921  */
11922 GlobalVarVector::const_iterator Global::insert_global_var(GlobalVarVector::const_iterator position, const std::shared_ptr<GlobalVar>& n) {
11923  n->set_parent(this);
11924  return variables.insert(position, n);
11925 }
11926 
11927 /**
11928  * \brief Reset member to variables
11929  */
11930 void Global::reset_global_var(GlobalVarVector::const_iterator position, GlobalVar* n) {
11931  //set parents
11932  n->set_parent(this);
11933 
11934  variables[position - variables.begin()].reset(n);
11935 }
11936 
11937 /**
11938  * \brief Reset member to variables
11939  */
11940 void Global::reset_global_var(GlobalVarVector::const_iterator position, std::shared_ptr<GlobalVar> n) {
11941  //set parents
11942  n->set_parent(this);
11943 
11944  variables[position - variables.begin()] = n;
11945 }
11946 
11947 
11948 
11949 
11951  /// visit each element of vector
11952  for (auto& item : this->variables) {
11953  item->accept(v);
11954  }
11955  (void)v;
11956  }
11957 
11959  /// visit each element of vector
11960  for (auto& item : this->variables) {
11961  item->accept(v);
11962  }
11963  (void)v;
11964  }
11965 
11967  v.visit_global(*this);
11968  }
11969 
11971  v.visit_global(*this);
11972  }
11973 
11974 
11976  : variables(variables) { set_parent_in_children(); }
11977 
11978 
11979 
11980  /// copy constructor implementation
11981  Global::Global(const Global& obj) {
11982  /// copy each element of vector
11983  for (auto& item : obj.variables) {
11984  this->variables.emplace_back(item->clone());
11985  }
11986 
11987  /// if there is a token, make copy
11988  if (obj.token) {
11989  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
11990  }
11991 
11992  /// set parents
11994  }
11995 
11996 
11997  /// set this parent in the children
11999 
12000  /// set parent for each element of the vector
12001  for (auto& item : variables) {
12002  item->set_parent(this);
12003 
12004  }
12005 
12006  }
12007 
12008 
12009 
12011  this->variables = variables;
12012  // set parents
12013  for (auto& ii : variables) {
12014  ii->set_parent(this);
12015  }
12016  }
12017 
12018  void Global::set_variables(const GlobalVarVector& variables) {
12019  this->variables = variables;
12020  // set parents
12021  for (auto& ii : variables) {
12022  ii->set_parent(this);
12023  }
12024  }
12025 
12026 
12027 
12028  ///
12029  /// RandomVarList member functions definition
12030  ///
12031 
12032 
12033 
12034 
12035 
12037  /// visit each element of vector
12038  for (auto& item : this->variables) {
12039  item->accept(v);
12040  }
12041  (void)v;
12042  }
12043 
12045  /// visit each element of vector
12046  for (auto& item : this->variables) {
12047  item->accept(v);
12048  }
12049  (void)v;
12050  }
12051 
12053  v.visit_random_var_list(*this);
12054  }
12055 
12057  v.visit_random_var_list(*this);
12058  }
12059 
12060 
12062  : variables(variables) { set_parent_in_children(); }
12063 
12064 
12065 
12066  /// copy constructor implementation
12068  /// copy each element of vector
12069  for (auto& item : obj.variables) {
12070  this->variables.emplace_back(item->clone());
12071  }
12072 
12073  /// if there is a token, make copy
12074  if (obj.token) {
12075  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12076  }
12077 
12078  /// set parents
12080  }
12081 
12082 
12083  /// set this parent in the children
12085 
12086  /// set parent for each element of the vector
12087  for (auto& item : variables) {
12088  item->set_parent(this);
12089 
12090  }
12091 
12092  }
12093 
12094 
12095 
12097  this->variables = variables;
12098  // set parents
12099  for (auto& ii : variables) {
12100  ii->set_parent(this);
12101  }
12102  }
12103 
12105  this->variables = variables;
12106  // set parents
12107  for (auto& ii : variables) {
12108  ii->set_parent(this);
12109  }
12110  }
12111 
12112 
12113 
12114  ///
12115  /// Pointer member functions definition
12116  ///
12117 
12118 
12119 /**
12120  * \brief Add member to variables by raw pointer
12121  */
12123  variables.emplace_back(n);
12124 
12125  // set parents
12126  n->set_parent(this);
12127 }
12128 
12129 /**
12130  * \brief Add member to variables by shared_ptr
12131  */
12132 void Pointer::emplace_back_pointer_var(std::shared_ptr<PointerVar> n) {
12133  variables.emplace_back(n);
12134  // set parents
12135  n->set_parent(this);
12136 }
12137 
12138 /**
12139  * \brief Erase member to variables
12140  */
12141 PointerVarVector::const_iterator Pointer::erase_pointer_var(PointerVarVector::const_iterator first) {
12142  return variables.erase(first);
12143 }
12144 /**
12145  * \brief Erase members to variables
12146  */
12147 PointerVarVector::const_iterator Pointer::erase_pointer_var(PointerVarVector::const_iterator first, PointerVarVector::const_iterator last) {
12148  return variables.erase(first, last);
12149 }
12150 /**
12151  * \brief Erase non-consecutive members to variables
12152  *
12153  * loosely following the cpp reference of remove_if
12154  */
12155 size_t Pointer::erase_pointer_var(std::unordered_set<PointerVar*>& to_be_erased) {
12156  auto first = variables.begin();
12157  auto last = variables.end();
12158  auto result = first;
12159 
12160  while (first != last) {
12161  // automatically erase dangling pointers from the uset while
12162  // looking for them to erase them in the vector
12163  if (to_be_erased.erase(first->get()) == 0) {
12164  reset_pointer_var(result, *first);
12165  ++result;
12166  }
12167  ++first;
12168  }
12169 
12170  size_t out = last - result;
12171  erase_pointer_var(result, last);
12172 
12173  return out;
12174 }
12175 
12176 /**
12177  * \brief Insert member to variables
12178  */
12179 PointerVarVector::const_iterator Pointer::insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr<PointerVar>& n) {
12180  n->set_parent(this);
12181  return variables.insert(position, n);
12182 }
12183 
12184 /**
12185  * \brief Reset member to variables
12186  */
12187 void Pointer::reset_pointer_var(PointerVarVector::const_iterator position, PointerVar* n) {
12188  //set parents
12189  n->set_parent(this);
12190 
12191  variables[position - variables.begin()].reset(n);
12192 }
12193 
12194 /**
12195  * \brief Reset member to variables
12196  */
12197 void Pointer::reset_pointer_var(PointerVarVector::const_iterator position, std::shared_ptr<PointerVar> n) {
12198  //set parents
12199  n->set_parent(this);
12200 
12201  variables[position - variables.begin()] = n;
12202 }
12203 
12204 
12205 
12206 
12208  /// visit each element of vector
12209  for (auto& item : this->variables) {
12210  item->accept(v);
12211  }
12212  (void)v;
12213  }
12214 
12216  /// visit each element of vector
12217  for (auto& item : this->variables) {
12218  item->accept(v);
12219  }
12220  (void)v;
12221  }
12222 
12224  v.visit_pointer(*this);
12225  }
12226 
12228  v.visit_pointer(*this);
12229  }
12230 
12231 
12233  : variables(variables) { set_parent_in_children(); }
12234 
12235 
12236 
12237  /// copy constructor implementation
12239  /// copy each element of vector
12240  for (auto& item : obj.variables) {
12241  this->variables.emplace_back(item->clone());
12242  }
12243 
12244  /// if there is a token, make copy
12245  if (obj.token) {
12246  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12247  }
12248 
12249  /// set parents
12251  }
12252 
12253 
12254  /// set this parent in the children
12256 
12257  /// set parent for each element of the vector
12258  for (auto& item : variables) {
12259  item->set_parent(this);
12260 
12261  }
12262 
12263  }
12264 
12265 
12266 
12268  this->variables = variables;
12269  // set parents
12270  for (auto& ii : variables) {
12271  ii->set_parent(this);
12272  }
12273  }
12274 
12275  void Pointer::set_variables(const PointerVarVector& variables) {
12276  this->variables = variables;
12277  // set parents
12278  for (auto& ii : variables) {
12279  ii->set_parent(this);
12280  }
12281  }
12282 
12283 
12284 
12285  ///
12286  /// BbcorePointer member functions definition
12287  ///
12288 
12289 
12290 
12291 
12292 
12294  /// visit each element of vector
12295  for (auto& item : this->variables) {
12296  item->accept(v);
12297  }
12298  (void)v;
12299  }
12300 
12302  /// visit each element of vector
12303  for (auto& item : this->variables) {
12304  item->accept(v);
12305  }
12306  (void)v;
12307  }
12308 
12310  v.visit_bbcore_pointer(*this);
12311  }
12312 
12314  v.visit_bbcore_pointer(*this);
12315  }
12316 
12317 
12319  : variables(variables) { set_parent_in_children(); }
12320 
12321 
12322 
12323  /// copy constructor implementation
12325  /// copy each element of vector
12326  for (auto& item : obj.variables) {
12327  this->variables.emplace_back(item->clone());
12328  }
12329 
12330  /// if there is a token, make copy
12331  if (obj.token) {
12332  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12333  }
12334 
12335  /// set parents
12337  }
12338 
12339 
12340  /// set this parent in the children
12342 
12343  /// set parent for each element of the vector
12344  for (auto& item : variables) {
12345  item->set_parent(this);
12346 
12347  }
12348 
12349  }
12350 
12351 
12352 
12354  this->variables = variables;
12355  // set parents
12356  for (auto& ii : variables) {
12357  ii->set_parent(this);
12358  }
12359  }
12360 
12362  this->variables = variables;
12363  // set parents
12364  for (auto& ii : variables) {
12365  ii->set_parent(this);
12366  }
12367  }
12368 
12369 
12370 
12371  ///
12372  /// External member functions definition
12373  ///
12374 
12375 
12376 
12377 
12378 
12380  /// visit each element of vector
12381  for (auto& item : this->variables) {
12382  item->accept(v);
12383  }
12384  (void)v;
12385  }
12386 
12388  /// visit each element of vector
12389  for (auto& item : this->variables) {
12390  item->accept(v);
12391  }
12392  (void)v;
12393  }
12394 
12396  v.visit_external(*this);
12397  }
12398 
12400  v.visit_external(*this);
12401  }
12402 
12403 
12405  : variables(variables) { set_parent_in_children(); }
12406 
12407 
12408 
12409  /// copy constructor implementation
12411  /// copy each element of vector
12412  for (auto& item : obj.variables) {
12413  this->variables.emplace_back(item->clone());
12414  }
12415 
12416  /// if there is a token, make copy
12417  if (obj.token) {
12418  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12419  }
12420 
12421  /// set parents
12423  }
12424 
12425 
12426  /// set this parent in the children
12428 
12429  /// set parent for each element of the vector
12430  for (auto& item : variables) {
12431  item->set_parent(this);
12432 
12433  }
12434 
12435  }
12436 
12437 
12438 
12440  this->variables = variables;
12441  // set parents
12442  for (auto& ii : variables) {
12443  ii->set_parent(this);
12444  }
12445  }
12446 
12447  void External::set_variables(const ExternVarVector& variables) {
12448  this->variables = variables;
12449  // set parents
12450  for (auto& ii : variables) {
12451  ii->set_parent(this);
12452  }
12453  }
12454 
12455 
12456 
12457  ///
12458  /// ThreadSafe member functions definition
12459  ///
12460 
12461 
12463  }
12464 
12466  }
12467 
12469  v.visit_thread_safe(*this);
12470  }
12471 
12473  v.visit_thread_safe(*this);
12474  }
12475 
12476 
12477 
12478 
12479  ///
12480  /// Verbatim member functions definition
12481  ///
12482 
12483 
12484 
12485 
12486 
12488  /// use -> for pointer member
12489  statement->accept(v);
12490  (void)v;
12491  }
12492 
12494  /// use -> for pointer member
12495  statement->accept(v);
12496  (void)v;
12497  }
12498 
12500  v.visit_verbatim(*this);
12501  }
12502 
12504  v.visit_verbatim(*this);
12505  }
12506 
12507 
12509  : statement(statement) { set_parent_in_children(); }
12510 
12511 
12512  Verbatim::Verbatim(std::shared_ptr<String> statement)
12513  : statement(statement) { set_parent_in_children(); }
12514 
12515 
12516  /// copy constructor implementation
12518  /// pointer member must be reseted with the new copy
12519  if (obj.statement) {
12520  this->statement.reset(obj.statement->clone());
12521  }
12522 
12523  /// if there is a token, make copy
12524  if (obj.token) {
12525  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12526  }
12527 
12528  /// set parents
12530  }
12531 
12532 
12533  /// set this parent in the children
12535 
12536  /// optional member could be nullptr
12537  if (statement) {
12538  statement->set_parent(this);
12539  }
12540 
12541  }
12542 
12543 
12544 
12545  void Verbatim::set_statement(std::shared_ptr<String>&& statement) {
12546  this->statement = statement;
12547  // set parents
12548  if (statement) {
12549  statement->set_parent(this);
12550  }
12551  }
12552 
12553  void Verbatim::set_statement(const std::shared_ptr<String>& statement) {
12554  this->statement = statement;
12555  // set parents
12556  if (statement) {
12557  statement->set_parent(this);
12558  }
12559  }
12560 
12561 
12562 
12563  ///
12564  /// LineComment member functions definition
12565  ///
12566 
12567 
12568 
12569 
12570 
12572  /// use -> for pointer member
12573  statement->accept(v);
12574  (void)v;
12575  }
12576 
12578  /// use -> for pointer member
12579  statement->accept(v);
12580  (void)v;
12581  }
12582 
12584  v.visit_line_comment(*this);
12585  }
12586 
12588  v.visit_line_comment(*this);
12589  }
12590 
12591 
12593  : statement(statement) { set_parent_in_children(); }
12594 
12595 
12596  LineComment::LineComment(std::shared_ptr<String> statement)
12597  : statement(statement) { set_parent_in_children(); }
12598 
12599 
12600  /// copy constructor implementation
12602  /// pointer member must be reseted with the new copy
12603  if (obj.statement) {
12604  this->statement.reset(obj.statement->clone());
12605  }
12606 
12607  /// if there is a token, make copy
12608  if (obj.token) {
12609  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12610  }
12611 
12612  /// set parents
12614  }
12615 
12616 
12617  /// set this parent in the children
12619 
12620  /// optional member could be nullptr
12621  if (statement) {
12622  statement->set_parent(this);
12623  }
12624 
12625  }
12626 
12627 
12628 
12629  void LineComment::set_statement(std::shared_ptr<String>&& statement) {
12630  this->statement = statement;
12631  // set parents
12632  if (statement) {
12633  statement->set_parent(this);
12634  }
12635  }
12636 
12637  void LineComment::set_statement(const std::shared_ptr<String>& statement) {
12638  this->statement = statement;
12639  // set parents
12640  if (statement) {
12641  statement->set_parent(this);
12642  }
12643  }
12644 
12645 
12646 
12647  ///
12648  /// BlockComment member functions definition
12649  ///
12650 
12651 
12652 
12653 
12654 
12656  /// use -> for pointer member
12657  statement->accept(v);
12658  (void)v;
12659  }
12660 
12662  /// use -> for pointer member
12663  statement->accept(v);
12664  (void)v;
12665  }
12666 
12668  v.visit_block_comment(*this);
12669  }
12670 
12672  v.visit_block_comment(*this);
12673  }
12674 
12675 
12677  : statement(statement) { set_parent_in_children(); }
12678 
12679 
12680  BlockComment::BlockComment(std::shared_ptr<String> statement)
12681  : statement(statement) { set_parent_in_children(); }
12682 
12683 
12684  /// copy constructor implementation
12686  /// pointer member must be reseted with the new copy
12687  if (obj.statement) {
12688  this->statement.reset(obj.statement->clone());
12689  }
12690 
12691  /// if there is a token, make copy
12692  if (obj.token) {
12693  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12694  }
12695 
12696  /// set parents
12698  }
12699 
12700 
12701  /// set this parent in the children
12703 
12704  /// optional member could be nullptr
12705  if (statement) {
12706  statement->set_parent(this);
12707  }
12708 
12709  }
12710 
12711 
12712 
12713  void BlockComment::set_statement(std::shared_ptr<String>&& statement) {
12714  this->statement = statement;
12715  // set parents
12716  if (statement) {
12717  statement->set_parent(this);
12718  }
12719  }
12720 
12721  void BlockComment::set_statement(const std::shared_ptr<String>& statement) {
12722  this->statement = statement;
12723  // set parents
12724  if (statement) {
12725  statement->set_parent(this);
12726  }
12727  }
12728 
12729 
12730 
12731  ///
12732  /// OntologyStatement member functions definition
12733  ///
12734 
12735 
12736 
12737 
12738 
12740  /// use -> for pointer member
12741  ontology_id->accept(v);
12742  (void)v;
12743  }
12744 
12746  /// use -> for pointer member
12747  ontology_id->accept(v);
12748  (void)v;
12749  }
12750 
12752  v.visit_ontology_statement(*this);
12753  }
12754 
12756  v.visit_ontology_statement(*this);
12757  }
12758 
12759 
12761  : ontology_id(ontology_id) { set_parent_in_children(); }
12762 
12763 
12764  OntologyStatement::OntologyStatement(std::shared_ptr<String> ontology_id)
12765  : ontology_id(ontology_id) { set_parent_in_children(); }
12766 
12767 
12768  /// copy constructor implementation
12770  /// pointer member must be reseted with the new copy
12771  if (obj.ontology_id) {
12772  this->ontology_id.reset(obj.ontology_id->clone());
12773  }
12774 
12775  /// if there is a token, make copy
12776  if (obj.token) {
12777  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12778  }
12779 
12780  /// set parents
12782  }
12783 
12784 
12785  /// set this parent in the children
12787 
12788  /// optional member could be nullptr
12789  if (ontology_id) {
12790  ontology_id->set_parent(this);
12791  }
12792 
12793  }
12794 
12795 
12796 
12797  void OntologyStatement::set_ontology_id(std::shared_ptr<String>&& ontology_id) {
12798  this->ontology_id = ontology_id;
12799  // set parents
12800  if (ontology_id) {
12801  ontology_id->set_parent(this);
12802  }
12803  }
12804 
12805  void OntologyStatement::set_ontology_id(const std::shared_ptr<String>& ontology_id) {
12806  this->ontology_id = ontology_id;
12807  // set parents
12808  if (ontology_id) {
12809  ontology_id->set_parent(this);
12810  }
12811  }
12812 
12813 
12814 
12815  ///
12816  /// Program member functions definition
12817  ///
12818 
12819 
12820 /**
12821  * \brief Add member to blocks by raw pointer
12822  */
12824  blocks.emplace_back(n);
12825 
12826  // set parents
12827  n->set_parent(this);
12828 }
12829 
12830 /**
12831  * \brief Add member to blocks by shared_ptr
12832  */
12833 void Program::emplace_back_node(std::shared_ptr<Node> n) {
12834  blocks.emplace_back(n);
12835  // set parents
12836  n->set_parent(this);
12837 }
12838 
12839 /**
12840  * \brief Erase member to blocks
12841  */
12842 NodeVector::const_iterator Program::erase_node(NodeVector::const_iterator first) {
12843  return blocks.erase(first);
12844 }
12845 /**
12846  * \brief Erase members to blocks
12847  */
12848 NodeVector::const_iterator Program::erase_node(NodeVector::const_iterator first, NodeVector::const_iterator last) {
12849  return blocks.erase(first, last);
12850 }
12851 /**
12852  * \brief Erase non-consecutive members to blocks
12853  *
12854  * loosely following the cpp reference of remove_if
12855  */
12856 size_t Program::erase_node(std::unordered_set<Node*>& to_be_erased) {
12857  auto first = blocks.begin();
12858  auto last = blocks.end();
12859  auto result = first;
12860 
12861  while (first != last) {
12862  // automatically erase dangling pointers from the uset while
12863  // looking for them to erase them in the vector
12864  if (to_be_erased.erase(first->get()) == 0) {
12865  reset_node(result, *first);
12866  ++result;
12867  }
12868  ++first;
12869  }
12870 
12871  size_t out = last - result;
12872  erase_node(result, last);
12873 
12874  return out;
12875 }
12876 
12877 /**
12878  * \brief Insert member to blocks
12879  */
12880 NodeVector::const_iterator Program::insert_node(NodeVector::const_iterator position, const std::shared_ptr<Node>& n) {
12881  n->set_parent(this);
12882  return blocks.insert(position, n);
12883 }
12884 
12885 /**
12886  * \brief Reset member to blocks
12887  */
12888 void Program::reset_node(NodeVector::const_iterator position, Node* n) {
12889  //set parents
12890  n->set_parent(this);
12891 
12892  blocks[position - blocks.begin()].reset(n);
12893 }
12894 
12895 /**
12896  * \brief Reset member to blocks
12897  */
12898 void Program::reset_node(NodeVector::const_iterator position, std::shared_ptr<Node> n) {
12899  //set parents
12900  n->set_parent(this);
12901 
12902  blocks[position - blocks.begin()] = n;
12903 }
12904 
12905 
12906 
12907 
12909  /// visit each element of vector
12910  for (auto& item : this->blocks) {
12911  item->accept(v);
12912  }
12913  (void)v;
12914  }
12915 
12917  /// visit each element of vector
12918  for (auto& item : this->blocks) {
12919  item->accept(v);
12920  }
12921  (void)v;
12922  }
12923 
12925  v.visit_program(*this);
12926  }
12927 
12929  v.visit_program(*this);
12930  }
12931 
12932 
12934  : blocks(blocks) { set_parent_in_children(); }
12935 
12936 
12937 
12938  /// copy constructor implementation
12940  /// copy each element of vector
12941  for (auto& item : obj.blocks) {
12942  this->blocks.emplace_back(item->clone());
12943  }
12944 
12945  /// if there is a token, make copy
12946  if (obj.token) {
12947  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
12948  }
12949 
12950  /// set parents
12952  }
12953 
12954 
12955  /// set this parent in the children
12957 
12958  /// set parent for each element of the vector
12959  for (auto& item : blocks) {
12960  item->set_parent(this);
12961 
12962  }
12963 
12964  }
12965 
12966 
12967 
12969  this->blocks = blocks;
12970  // set parents
12971  for (auto& ii : blocks) {
12972  ii->set_parent(this);
12973  }
12974  }
12975 
12976  void Program::set_blocks(const NodeVector& blocks) {
12977  this->blocks = blocks;
12978  // set parents
12979  for (auto& ii : blocks) {
12980  ii->set_parent(this);
12981  }
12982  }
12983 
12984 
12985 
12986  ///
12987  /// NrnStateBlock member functions definition
12988  ///
12989 
12990 
12991 
12992 
12993 
12995  /// visit each element of vector
12996  for (auto& item : this->solve_statements) {
12997  item->accept(v);
12998  }
12999  (void)v;
13000  }
13001 
13003  /// visit each element of vector
13004  for (auto& item : this->solve_statements) {
13005  item->accept(v);
13006  }
13007  (void)v;
13008  }
13009 
13011  v.visit_nrn_state_block(*this);
13012  }
13013 
13015  v.visit_nrn_state_block(*this);
13016  }
13017 
13018 
13020  : solve_statements(solve_statements) { set_parent_in_children(); }
13021 
13022 
13023 
13024  /// copy constructor implementation
13026  /// copy each element of vector
13027  for (auto& item : obj.solve_statements) {
13028  this->solve_statements.emplace_back(item->clone());
13029  }
13030 
13031  /// if there is a token, make copy
13032  if (obj.token) {
13033  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13034  }
13035 
13036  /// set parents
13038  }
13039 
13040 
13041  /// set this parent in the children
13043 
13044  /// set parent for each element of the vector
13045  for (auto& item : solve_statements) {
13046  item->set_parent(this);
13047 
13048  }
13049 
13050  }
13051 
13052 
13053 
13056  // set parents
13057  for (auto& ii : solve_statements) {
13058  ii->set_parent(this);
13059  }
13060  }
13061 
13063  this->solve_statements = solve_statements;
13064  // set parents
13065  for (auto& ii : solve_statements) {
13066  ii->set_parent(this);
13067  }
13068  }
13069 
13070 
13071 
13072  ///
13073  /// EigenNewtonSolverBlock member functions definition
13074  ///
13075 
13076 
13077 
13078 
13079 
13080 
13081 
13082 
13083 
13084 
13085 
13086 
13087 
13088 
13089 
13090 
13091 
13092 
13093 
13094 
13095 
13096 
13097 
13099  /// use -> for pointer member
13100  n_state_vars->accept(v);
13101  (void)v;
13102  /// use -> for pointer member
13103  variable_block->accept(v);
13104  (void)v;
13105  /// use -> for pointer member
13106  initialize_block->accept(v);
13107  (void)v;
13108  /// use -> for pointer member
13109  setup_x_block->accept(v);
13110  (void)v;
13111  /// use -> for pointer member
13112  functor_block->accept(v);
13113  (void)v;
13114  /// use -> for pointer member
13115  update_states_block->accept(v);
13116  (void)v;
13117  /// use -> for pointer member
13118  finalize_block->accept(v);
13119  (void)v;
13120  }
13121 
13123  /// use -> for pointer member
13124  n_state_vars->accept(v);
13125  (void)v;
13126  /// use -> for pointer member
13127  variable_block->accept(v);
13128  (void)v;
13129  /// use -> for pointer member
13130  initialize_block->accept(v);
13131  (void)v;
13132  /// use -> for pointer member
13133  setup_x_block->accept(v);
13134  (void)v;
13135  /// use -> for pointer member
13136  functor_block->accept(v);
13137  (void)v;
13138  /// use -> for pointer member
13139  update_states_block->accept(v);
13140  (void)v;
13141  /// use -> for pointer member
13142  finalize_block->accept(v);
13143  (void)v;
13144  }
13145 
13147  v.visit_eigen_newton_solver_block(*this);
13148  }
13149 
13151  v.visit_eigen_newton_solver_block(*this);
13152  }
13153 
13154 
13155  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)
13156  : 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(); }
13157 
13158 
13159  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)
13160  : 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(); }
13161 
13162 
13163  /// copy constructor implementation
13165  /// pointer member must be reseted with the new copy
13166  if (obj.n_state_vars) {
13167  this->n_state_vars.reset(obj.n_state_vars->clone());
13168  }
13169  /// pointer member must be reseted with the new copy
13170  if (obj.variable_block) {
13171  this->variable_block.reset(obj.variable_block->clone());
13172  }
13173  /// pointer member must be reseted with the new copy
13174  if (obj.initialize_block) {
13175  this->initialize_block.reset(obj.initialize_block->clone());
13176  }
13177  /// pointer member must be reseted with the new copy
13178  if (obj.setup_x_block) {
13179  this->setup_x_block.reset(obj.setup_x_block->clone());
13180  }
13181  /// pointer member must be reseted with the new copy
13182  if (obj.functor_block) {
13183  this->functor_block.reset(obj.functor_block->clone());
13184  }
13185  /// pointer member must be reseted with the new copy
13186  if (obj.update_states_block) {
13187  this->update_states_block.reset(obj.update_states_block->clone());
13188  }
13189  /// pointer member must be reseted with the new copy
13190  if (obj.finalize_block) {
13191  this->finalize_block.reset(obj.finalize_block->clone());
13192  }
13193 
13194  /// if there is a token, make copy
13195  if (obj.token) {
13196  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13197  }
13198 
13199  /// set parents
13201  }
13202 
13203 
13204  /// set this parent in the children
13206 
13207  /// optional member could be nullptr
13208  if (n_state_vars) {
13209  n_state_vars->set_parent(this);
13210  }
13211  /// optional member could be nullptr
13212  if (variable_block) {
13213  variable_block->set_parent(this);
13214  }
13215  /// optional member could be nullptr
13216  if (initialize_block) {
13217  initialize_block->set_parent(this);
13218  }
13219  /// optional member could be nullptr
13220  if (setup_x_block) {
13221  setup_x_block->set_parent(this);
13222  }
13223  /// optional member could be nullptr
13224  if (functor_block) {
13225  functor_block->set_parent(this);
13226  }
13227  /// optional member could be nullptr
13228  if (update_states_block) {
13229  update_states_block->set_parent(this);
13230  }
13231  /// optional member could be nullptr
13232  if (finalize_block) {
13233  finalize_block->set_parent(this);
13234  }
13235 
13236  }
13237 
13238 
13239 
13240  void EigenNewtonSolverBlock::set_n_state_vars(std::shared_ptr<Integer>&& n_state_vars) {
13241  this->n_state_vars = n_state_vars;
13242  // set parents
13243  if (n_state_vars) {
13244  n_state_vars->set_parent(this);
13245  }
13246  }
13247 
13248  void EigenNewtonSolverBlock::set_n_state_vars(const std::shared_ptr<Integer>& n_state_vars) {
13249  this->n_state_vars = n_state_vars;
13250  // set parents
13251  if (n_state_vars) {
13252  n_state_vars->set_parent(this);
13253  }
13254  }
13255 
13256 
13257  void EigenNewtonSolverBlock::set_variable_block(std::shared_ptr<StatementBlock>&& variable_block) {
13259  // set parents
13260  if (variable_block) {
13261  variable_block->set_parent(this);
13262  }
13263  }
13264 
13265  void EigenNewtonSolverBlock::set_variable_block(const std::shared_ptr<StatementBlock>& variable_block) {
13266  this->variable_block = variable_block;
13267  // set parents
13268  if (variable_block) {
13269  variable_block->set_parent(this);
13270  }
13271  }
13272 
13273 
13274  void EigenNewtonSolverBlock::set_initialize_block(std::shared_ptr<StatementBlock>&& initialize_block) {
13276  // set parents
13277  if (initialize_block) {
13278  initialize_block->set_parent(this);
13279  }
13280  }
13281 
13282  void EigenNewtonSolverBlock::set_initialize_block(const std::shared_ptr<StatementBlock>& initialize_block) {
13283  this->initialize_block = initialize_block;
13284  // set parents
13285  if (initialize_block) {
13286  initialize_block->set_parent(this);
13287  }
13288  }
13289 
13290 
13291  void EigenNewtonSolverBlock::set_setup_x_block(std::shared_ptr<StatementBlock>&& setup_x_block) {
13292  this->setup_x_block = setup_x_block;
13293  // set parents
13294  if (setup_x_block) {
13295  setup_x_block->set_parent(this);
13296  }
13297  }
13298 
13299  void EigenNewtonSolverBlock::set_setup_x_block(const std::shared_ptr<StatementBlock>& setup_x_block) {
13300  this->setup_x_block = setup_x_block;
13301  // set parents
13302  if (setup_x_block) {
13303  setup_x_block->set_parent(this);
13304  }
13305  }
13306 
13307 
13308  void EigenNewtonSolverBlock::set_functor_block(std::shared_ptr<StatementBlock>&& functor_block) {
13309  this->functor_block = functor_block;
13310  // set parents
13311  if (functor_block) {
13312  functor_block->set_parent(this);
13313  }
13314  }
13315 
13316  void EigenNewtonSolverBlock::set_functor_block(const std::shared_ptr<StatementBlock>& functor_block) {
13317  this->functor_block = functor_block;
13318  // set parents
13319  if (functor_block) {
13320  functor_block->set_parent(this);
13321  }
13322  }
13323 
13324 
13325  void EigenNewtonSolverBlock::set_update_states_block(std::shared_ptr<StatementBlock>&& update_states_block) {
13327  // set parents
13328  if (update_states_block) {
13329  update_states_block->set_parent(this);
13330  }
13331  }
13332 
13333  void EigenNewtonSolverBlock::set_update_states_block(const std::shared_ptr<StatementBlock>& update_states_block) {
13334  this->update_states_block = update_states_block;
13335  // set parents
13336  if (update_states_block) {
13337  update_states_block->set_parent(this);
13338  }
13339  }
13340 
13341 
13342  void EigenNewtonSolverBlock::set_finalize_block(std::shared_ptr<StatementBlock>&& finalize_block) {
13344  // set parents
13345  if (finalize_block) {
13346  finalize_block->set_parent(this);
13347  }
13348  }
13349 
13350  void EigenNewtonSolverBlock::set_finalize_block(const std::shared_ptr<StatementBlock>& finalize_block) {
13351  this->finalize_block = finalize_block;
13352  // set parents
13353  if (finalize_block) {
13354  finalize_block->set_parent(this);
13355  }
13356  }
13357 
13358 
13359 
13360  ///
13361  /// EigenLinearSolverBlock member functions definition
13362  ///
13363 
13364 
13365 
13366 
13367 
13368 
13369 
13370 
13371 
13372 
13373 
13374 
13375 
13376 
13377 
13378 
13379 
13380 
13381 
13382 
13384  /// use -> for pointer member
13385  n_state_vars->accept(v);
13386  (void)v;
13387  /// use -> for pointer member
13388  variable_block->accept(v);
13389  (void)v;
13390  /// use -> for pointer member
13391  initialize_block->accept(v);
13392  (void)v;
13393  /// use -> for pointer member
13394  setup_x_block->accept(v);
13395  (void)v;
13396  /// use -> for pointer member
13397  update_states_block->accept(v);
13398  (void)v;
13399  /// use -> for pointer member
13400  finalize_block->accept(v);
13401  (void)v;
13402  }
13403 
13405  /// use -> for pointer member
13406  n_state_vars->accept(v);
13407  (void)v;
13408  /// use -> for pointer member
13409  variable_block->accept(v);
13410  (void)v;
13411  /// use -> for pointer member
13412  initialize_block->accept(v);
13413  (void)v;
13414  /// use -> for pointer member
13415  setup_x_block->accept(v);
13416  (void)v;
13417  /// use -> for pointer member
13418  update_states_block->accept(v);
13419  (void)v;
13420  /// use -> for pointer member
13421  finalize_block->accept(v);
13422  (void)v;
13423  }
13424 
13426  v.visit_eigen_linear_solver_block(*this);
13427  }
13428 
13430  v.visit_eigen_linear_solver_block(*this);
13431  }
13432 
13433 
13434  EigenLinearSolverBlock::EigenLinearSolverBlock(Integer* n_state_vars, StatementBlock* variable_block, StatementBlock* initialize_block, StatementBlock* setup_x_block, StatementBlock* update_states_block, StatementBlock* finalize_block)
13435  : 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(); }
13436 
13437 
13438  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)
13439  : 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(); }
13440 
13441 
13442  /// copy constructor implementation
13444  /// pointer member must be reseted with the new copy
13445  if (obj.n_state_vars) {
13446  this->n_state_vars.reset(obj.n_state_vars->clone());
13447  }
13448  /// pointer member must be reseted with the new copy
13449  if (obj.variable_block) {
13450  this->variable_block.reset(obj.variable_block->clone());
13451  }
13452  /// pointer member must be reseted with the new copy
13453  if (obj.initialize_block) {
13454  this->initialize_block.reset(obj.initialize_block->clone());
13455  }
13456  /// pointer member must be reseted with the new copy
13457  if (obj.setup_x_block) {
13458  this->setup_x_block.reset(obj.setup_x_block->clone());
13459  }
13460  /// pointer member must be reseted with the new copy
13461  if (obj.update_states_block) {
13462  this->update_states_block.reset(obj.update_states_block->clone());
13463  }
13464  /// pointer member must be reseted with the new copy
13465  if (obj.finalize_block) {
13466  this->finalize_block.reset(obj.finalize_block->clone());
13467  }
13468 
13469  /// if there is a token, make copy
13470  if (obj.token) {
13471  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13472  }
13473 
13474  /// set parents
13476  }
13477 
13478 
13479  /// set this parent in the children
13481 
13482  /// optional member could be nullptr
13483  if (n_state_vars) {
13484  n_state_vars->set_parent(this);
13485  }
13486  /// optional member could be nullptr
13487  if (variable_block) {
13488  variable_block->set_parent(this);
13489  }
13490  /// optional member could be nullptr
13491  if (initialize_block) {
13492  initialize_block->set_parent(this);
13493  }
13494  /// optional member could be nullptr
13495  if (setup_x_block) {
13496  setup_x_block->set_parent(this);
13497  }
13498  /// optional member could be nullptr
13499  if (update_states_block) {
13500  update_states_block->set_parent(this);
13501  }
13502  /// optional member could be nullptr
13503  if (finalize_block) {
13504  finalize_block->set_parent(this);
13505  }
13506 
13507  }
13508 
13509 
13510 
13511  void EigenLinearSolverBlock::set_n_state_vars(std::shared_ptr<Integer>&& n_state_vars) {
13512  this->n_state_vars = n_state_vars;
13513  // set parents
13514  if (n_state_vars) {
13515  n_state_vars->set_parent(this);
13516  }
13517  }
13518 
13519  void EigenLinearSolverBlock::set_n_state_vars(const std::shared_ptr<Integer>& n_state_vars) {
13520  this->n_state_vars = n_state_vars;
13521  // set parents
13522  if (n_state_vars) {
13523  n_state_vars->set_parent(this);
13524  }
13525  }
13526 
13527 
13528  void EigenLinearSolverBlock::set_variable_block(std::shared_ptr<StatementBlock>&& variable_block) {
13530  // set parents
13531  if (variable_block) {
13532  variable_block->set_parent(this);
13533  }
13534  }
13535 
13536  void EigenLinearSolverBlock::set_variable_block(const std::shared_ptr<StatementBlock>& variable_block) {
13537  this->variable_block = variable_block;
13538  // set parents
13539  if (variable_block) {
13540  variable_block->set_parent(this);
13541  }
13542  }
13543 
13544 
13545  void EigenLinearSolverBlock::set_initialize_block(std::shared_ptr<StatementBlock>&& initialize_block) {
13547  // set parents
13548  if (initialize_block) {
13549  initialize_block->set_parent(this);
13550  }
13551  }
13552 
13553  void EigenLinearSolverBlock::set_initialize_block(const std::shared_ptr<StatementBlock>& initialize_block) {
13554  this->initialize_block = initialize_block;
13555  // set parents
13556  if (initialize_block) {
13557  initialize_block->set_parent(this);
13558  }
13559  }
13560 
13561 
13562  void EigenLinearSolverBlock::set_setup_x_block(std::shared_ptr<StatementBlock>&& setup_x_block) {
13563  this->setup_x_block = setup_x_block;
13564  // set parents
13565  if (setup_x_block) {
13566  setup_x_block->set_parent(this);
13567  }
13568  }
13569 
13570  void EigenLinearSolverBlock::set_setup_x_block(const std::shared_ptr<StatementBlock>& setup_x_block) {
13571  this->setup_x_block = setup_x_block;
13572  // set parents
13573  if (setup_x_block) {
13574  setup_x_block->set_parent(this);
13575  }
13576  }
13577 
13578 
13579  void EigenLinearSolverBlock::set_update_states_block(std::shared_ptr<StatementBlock>&& update_states_block) {
13581  // set parents
13582  if (update_states_block) {
13583  update_states_block->set_parent(this);
13584  }
13585  }
13586 
13587  void EigenLinearSolverBlock::set_update_states_block(const std::shared_ptr<StatementBlock>& update_states_block) {
13588  this->update_states_block = update_states_block;
13589  // set parents
13590  if (update_states_block) {
13591  update_states_block->set_parent(this);
13592  }
13593  }
13594 
13595 
13596  void EigenLinearSolverBlock::set_finalize_block(std::shared_ptr<StatementBlock>&& finalize_block) {
13598  // set parents
13599  if (finalize_block) {
13600  finalize_block->set_parent(this);
13601  }
13602  }
13603 
13604  void EigenLinearSolverBlock::set_finalize_block(const std::shared_ptr<StatementBlock>& finalize_block) {
13605  this->finalize_block = finalize_block;
13606  // set parents
13607  if (finalize_block) {
13608  finalize_block->set_parent(this);
13609  }
13610  }
13611 
13612 
13613 
13614  ///
13615  /// MatexpBlock member functions definition
13616  ///
13617 
13618 
13619 
13620 
13621 
13622 
13623 
13624 
13625 
13626 
13627 
13629  /// use -> for pointer member
13630  steadystate->accept(v);
13631  (void)v;
13632  /// use -> for pointer member
13633  jacobian_block->accept(v);
13634  (void)v;
13635  /// visit each element of vector
13636  for (auto& item : this->conserve) {
13637  item->accept(v);
13638  }
13639  (void)v;
13640  }
13641 
13643  /// use -> for pointer member
13644  steadystate->accept(v);
13645  (void)v;
13646  /// use -> for pointer member
13647  jacobian_block->accept(v);
13648  (void)v;
13649  /// visit each element of vector
13650  for (auto& item : this->conserve) {
13651  item->accept(v);
13652  }
13653  (void)v;
13654  }
13655 
13657  v.visit_matexp_block(*this);
13658  }
13659 
13661  v.visit_matexp_block(*this);
13662  }
13663 
13664 
13665  MatexpBlock::MatexpBlock(Boolean* steadystate, StatementBlock* jacobian_block, const ConserveVector& conserve)
13666  : steadystate(steadystate), jacobian_block(jacobian_block), conserve(conserve) { set_parent_in_children(); }
13667 
13668 
13669  MatexpBlock::MatexpBlock(std::shared_ptr<Boolean> steadystate, std::shared_ptr<StatementBlock> jacobian_block, const ConserveVector& conserve)
13670  : steadystate(steadystate), jacobian_block(jacobian_block), conserve(conserve) { set_parent_in_children(); }
13671 
13672 
13673  /// copy constructor implementation
13675  /// pointer member must be reseted with the new copy
13676  if (obj.steadystate) {
13677  this->steadystate.reset(obj.steadystate->clone());
13678  }
13679  /// pointer member must be reseted with the new copy
13680  if (obj.jacobian_block) {
13681  this->jacobian_block.reset(obj.jacobian_block->clone());
13682  }
13683  /// copy each element of vector
13684  for (auto& item : obj.conserve) {
13685  this->conserve.emplace_back(item->clone());
13686  }
13687 
13688  /// if there is a token, make copy
13689  if (obj.token) {
13690  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13691  }
13692 
13693  /// set parents
13695  }
13696 
13697 
13698  /// set this parent in the children
13700 
13701  /// optional member could be nullptr
13702  if (steadystate) {
13703  steadystate->set_parent(this);
13704  }
13705  /// optional member could be nullptr
13706  if (jacobian_block) {
13707  jacobian_block->set_parent(this);
13708  }
13709  /// set parent for each element of the vector
13710  for (auto& item : conserve) {
13711  item->set_parent(this);
13712 
13713  }
13714 
13715  }
13716 
13717 
13718 
13719  void MatexpBlock::set_steadystate(std::shared_ptr<Boolean>&& steadystate) {
13720  this->steadystate = steadystate;
13721  // set parents
13722  if (steadystate) {
13723  steadystate->set_parent(this);
13724  }
13725  }
13726 
13727  void MatexpBlock::set_steadystate(const std::shared_ptr<Boolean>& steadystate) {
13728  this->steadystate = steadystate;
13729  // set parents
13730  if (steadystate) {
13731  steadystate->set_parent(this);
13732  }
13733  }
13734 
13735 
13736  void MatexpBlock::set_jacobian_block(std::shared_ptr<StatementBlock>&& jacobian_block) {
13738  // set parents
13739  if (jacobian_block) {
13740  jacobian_block->set_parent(this);
13741  }
13742  }
13743 
13744  void MatexpBlock::set_jacobian_block(const std::shared_ptr<StatementBlock>& jacobian_block) {
13745  this->jacobian_block = jacobian_block;
13746  // set parents
13747  if (jacobian_block) {
13748  jacobian_block->set_parent(this);
13749  }
13750  }
13751 
13752 
13754  this->conserve = conserve;
13755  // set parents
13756  for (auto& ii : conserve) {
13757  ii->set_parent(this);
13758  }
13759  }
13760 
13762  this->conserve = conserve;
13763  // set parents
13764  for (auto& ii : conserve) {
13765  ii->set_parent(this);
13766  }
13767  }
13768 
13769 
13770 
13771  ///
13772  /// CvodeBlock member functions definition
13773  ///
13774 
13775 
13776 
13777  std::string CvodeBlock::get_node_name() const {
13778  return name->get_node_name();
13779  }
13780 
13781 
13782 
13783 
13784 
13785 
13786 
13787 
13788 
13789 
13791  /// use -> for pointer member
13792  name->accept(v);
13793  (void)v;
13794  /// use -> for pointer member
13795  n_odes->accept(v);
13796  (void)v;
13797  /// use -> for pointer member
13798  non_stiff_block->accept(v);
13799  (void)v;
13800  /// use -> for pointer member
13801  stiff_block->accept(v);
13802  (void)v;
13803  }
13804 
13806  /// use -> for pointer member
13807  name->accept(v);
13808  (void)v;
13809  /// use -> for pointer member
13810  n_odes->accept(v);
13811  (void)v;
13812  /// use -> for pointer member
13813  non_stiff_block->accept(v);
13814  (void)v;
13815  /// use -> for pointer member
13816  stiff_block->accept(v);
13817  (void)v;
13818  }
13819 
13821  v.visit_cvode_block(*this);
13822  }
13823 
13825  v.visit_cvode_block(*this);
13826  }
13827 
13828 
13829  CvodeBlock::CvodeBlock(Name* name, Integer* n_odes, StatementBlock* non_stiff_block, StatementBlock* stiff_block)
13830  : name(name), n_odes(n_odes), non_stiff_block(non_stiff_block), stiff_block(stiff_block) { set_parent_in_children(); }
13831 
13832 
13833  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)
13834  : name(name), n_odes(n_odes), non_stiff_block(non_stiff_block), stiff_block(stiff_block) { set_parent_in_children(); }
13835 
13836 
13837  /// copy constructor implementation
13839  /// pointer member must be reseted with the new copy
13840  if (obj.name) {
13841  this->name.reset(obj.name->clone());
13842  }
13843  /// pointer member must be reseted with the new copy
13844  if (obj.n_odes) {
13845  this->n_odes.reset(obj.n_odes->clone());
13846  }
13847  /// pointer member must be reseted with the new copy
13848  if (obj.non_stiff_block) {
13849  this->non_stiff_block.reset(obj.non_stiff_block->clone());
13850  }
13851  /// pointer member must be reseted with the new copy
13852  if (obj.stiff_block) {
13853  this->stiff_block.reset(obj.stiff_block->clone());
13854  }
13855 
13856  /// if there is a token, make copy
13857  if (obj.token) {
13858  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
13859  }
13860 
13861  /// set parents
13863  }
13864 
13865 
13866  /// set this parent in the children
13868 
13869  /// optional member could be nullptr
13870  if (name) {
13871  name->set_parent(this);
13872  }
13873  /// optional member could be nullptr
13874  if (n_odes) {
13875  n_odes->set_parent(this);
13876  }
13877  /// optional member could be nullptr
13878  if (non_stiff_block) {
13879  non_stiff_block->set_parent(this);
13880  }
13881  /// optional member could be nullptr
13882  if (stiff_block) {
13883  stiff_block->set_parent(this);
13884  }
13885 
13886  }
13887 
13888 
13889 
13890  void CvodeBlock::set_name(std::shared_ptr<Name>&& name) {
13891  this->name = name;
13892  // set parents
13893  if (name) {
13894  name->set_parent(this);
13895  }
13896  }
13897 
13898  void CvodeBlock::set_name(const std::shared_ptr<Name>& name) {
13899  this->name = name;
13900  // set parents
13901  if (name) {
13902  name->set_parent(this);
13903  }
13904  }
13905 
13906 
13907  void CvodeBlock::set_n_odes(std::shared_ptr<Integer>&& n_odes) {
13908  this->n_odes = n_odes;
13909  // set parents
13910  if (n_odes) {
13911  n_odes->set_parent(this);
13912  }
13913  }
13914 
13915  void CvodeBlock::set_n_odes(const std::shared_ptr<Integer>& n_odes) {
13916  this->n_odes = n_odes;
13917  // set parents
13918  if (n_odes) {
13919  n_odes->set_parent(this);
13920  }
13921  }
13922 
13923 
13924  void CvodeBlock::set_non_stiff_block(std::shared_ptr<StatementBlock>&& non_stiff_block) {
13926  // set parents
13927  if (non_stiff_block) {
13928  non_stiff_block->set_parent(this);
13929  }
13930  }
13931 
13932  void CvodeBlock::set_non_stiff_block(const std::shared_ptr<StatementBlock>& non_stiff_block) {
13933  this->non_stiff_block = non_stiff_block;
13934  // set parents
13935  if (non_stiff_block) {
13936  non_stiff_block->set_parent(this);
13937  }
13938  }
13939 
13940 
13941  void CvodeBlock::set_stiff_block(std::shared_ptr<StatementBlock>&& stiff_block) {
13942  this->stiff_block = stiff_block;
13943  // set parents
13944  if (stiff_block) {
13945  stiff_block->set_parent(this);
13946  }
13947  }
13948 
13949  void CvodeBlock::set_stiff_block(const std::shared_ptr<StatementBlock>& stiff_block) {
13950  this->stiff_block = stiff_block;
13951  // set parents
13952  if (stiff_block) {
13953  stiff_block->set_parent(this);
13954  }
13955  }
13956 
13957 
13958 
13959  ///
13960  /// LongitudinalDiffusionBlock member functions definition
13961  ///
13962 
13963 
13964 
13966  return name->get_node_name();
13967  }
13968 
13969 
13970 
13971 
13972 
13973 
13974 
13976  /// use -> for pointer member
13977  name->accept(v);
13978  (void)v;
13979  /// use -> for pointer member
13981  (void)v;
13982  /// use -> for pointer member
13983  compartment_statements->accept(v);
13984  (void)v;
13985  }
13986 
13988  /// use -> for pointer member
13989  name->accept(v);
13990  (void)v;
13991  /// use -> for pointer member
13993  (void)v;
13994  /// use -> for pointer member
13995  compartment_statements->accept(v);
13996  (void)v;
13997  }
13998 
14000  v.visit_longitudinal_diffusion_block(*this);
14001  }
14002 
14004  v.visit_longitudinal_diffusion_block(*this);
14005  }
14006 
14007 
14008  LongitudinalDiffusionBlock::LongitudinalDiffusionBlock(Name* name, StatementBlock* longitudinal_diffusion_statements, StatementBlock* compartment_statements)
14009  : name(name), longitudinal_diffusion_statements(longitudinal_diffusion_statements), compartment_statements(compartment_statements) { set_parent_in_children(); }
14010 
14011 
14012  LongitudinalDiffusionBlock::LongitudinalDiffusionBlock(std::shared_ptr<Name> name, std::shared_ptr<StatementBlock> longitudinal_diffusion_statements, std::shared_ptr<StatementBlock> compartment_statements)
14013  : name(name), longitudinal_diffusion_statements(longitudinal_diffusion_statements), compartment_statements(compartment_statements) { set_parent_in_children(); }
14014 
14015 
14016  /// copy constructor implementation
14018  /// pointer member must be reseted with the new copy
14019  if (obj.name) {
14020  this->name.reset(obj.name->clone());
14021  }
14022  /// pointer member must be reseted with the new copy
14025  }
14026  /// pointer member must be reseted with the new copy
14027  if (obj.compartment_statements) {
14028  this->compartment_statements.reset(obj.compartment_statements->clone());
14029  }
14030 
14031  /// if there is a token, make copy
14032  if (obj.token) {
14033  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14034  }
14035 
14036  /// set parents
14038  }
14039 
14040 
14041  /// set this parent in the children
14043 
14044  /// optional member could be nullptr
14045  if (name) {
14046  name->set_parent(this);
14047  }
14048  /// optional member could be nullptr
14050  longitudinal_diffusion_statements->set_parent(this);
14051  }
14052  /// optional member could be nullptr
14053  if (compartment_statements) {
14054  compartment_statements->set_parent(this);
14055  }
14056 
14057  }
14058 
14059 
14060 
14061  void LongitudinalDiffusionBlock::set_name(std::shared_ptr<Name>&& name) {
14062  this->name = name;
14063  // set parents
14064  if (name) {
14065  name->set_parent(this);
14066  }
14067  }
14068 
14069  void LongitudinalDiffusionBlock::set_name(const std::shared_ptr<Name>& name) {
14070  this->name = name;
14071  // set parents
14072  if (name) {
14073  name->set_parent(this);
14074  }
14075  }
14076 
14077 
14078  void LongitudinalDiffusionBlock::set_longitudinal_diffusion_statements(std::shared_ptr<StatementBlock>&& longitudinal_diffusion_statements) {
14080  // set parents
14082  longitudinal_diffusion_statements->set_parent(this);
14083  }
14084  }
14085 
14086  void LongitudinalDiffusionBlock::set_longitudinal_diffusion_statements(const std::shared_ptr<StatementBlock>& longitudinal_diffusion_statements) {
14087  this->longitudinal_diffusion_statements = longitudinal_diffusion_statements;
14088  // set parents
14090  longitudinal_diffusion_statements->set_parent(this);
14091  }
14092  }
14093 
14094 
14095  void LongitudinalDiffusionBlock::set_compartment_statements(std::shared_ptr<StatementBlock>&& compartment_statements) {
14097  // set parents
14098  if (compartment_statements) {
14099  compartment_statements->set_parent(this);
14100  }
14101  }
14102 
14103  void LongitudinalDiffusionBlock::set_compartment_statements(const std::shared_ptr<StatementBlock>& compartment_statements) {
14104  this->compartment_statements = compartment_statements;
14105  // set parents
14106  if (compartment_statements) {
14107  compartment_statements->set_parent(this);
14108  }
14109  }
14110 
14111 
14112 
14113  ///
14114  /// WrappedExpression member functions definition
14115  ///
14116 
14117 
14118 
14119 
14120 
14122  /// use -> for pointer member
14123  expression->accept(v);
14124  (void)v;
14125  }
14126 
14128  /// use -> for pointer member
14129  expression->accept(v);
14130  (void)v;
14131  }
14132 
14134  v.visit_wrapped_expression(*this);
14135  }
14136 
14138  v.visit_wrapped_expression(*this);
14139  }
14140 
14141 
14143  : expression(expression) { set_parent_in_children(); }
14144 
14145 
14146  WrappedExpression::WrappedExpression(std::shared_ptr<Expression> expression)
14147  : expression(expression) { set_parent_in_children(); }
14148 
14149 
14150  /// copy constructor implementation
14152  /// pointer member must be reseted with the new copy
14153  if (obj.expression) {
14154  this->expression.reset(obj.expression->clone());
14155  }
14156 
14157  /// if there is a token, make copy
14158  if (obj.token) {
14159  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14160  }
14161 
14162  /// set parents
14164  }
14165 
14166 
14167  /// set this parent in the children
14169 
14170  /// optional member could be nullptr
14171  if (expression) {
14172  expression->set_parent(this);
14173  }
14174 
14175  }
14176 
14177 
14178 
14179  void WrappedExpression::set_expression(std::shared_ptr<Expression>&& expression) {
14180  this->expression = expression;
14181  // set parents
14182  if (expression) {
14183  expression->set_parent(this);
14184  }
14185  }
14186 
14187  void WrappedExpression::set_expression(const std::shared_ptr<Expression>& expression) {
14188  this->expression = expression;
14189  // set parents
14190  if (expression) {
14191  expression->set_parent(this);
14192  }
14193  }
14194 
14195 
14196 
14197  ///
14198  /// DerivimplicitCallback member functions definition
14199  ///
14200 
14201 
14202 
14203 
14204 
14206  /// use -> for pointer member
14207  node_to_solve->accept(v);
14208  (void)v;
14209  }
14210 
14212  /// use -> for pointer member
14213  node_to_solve->accept(v);
14214  (void)v;
14215  }
14216 
14218  v.visit_derivimplicit_callback(*this);
14219  }
14220 
14222  v.visit_derivimplicit_callback(*this);
14223  }
14224 
14225 
14227  : node_to_solve(node_to_solve) { set_parent_in_children(); }
14228 
14229 
14230  DerivimplicitCallback::DerivimplicitCallback(std::shared_ptr<Block> node_to_solve)
14231  : node_to_solve(node_to_solve) { set_parent_in_children(); }
14232 
14233 
14234  /// copy constructor implementation
14236  /// pointer member must be reseted with the new copy
14237  if (obj.node_to_solve) {
14238  this->node_to_solve.reset(obj.node_to_solve->clone());
14239  }
14240 
14241  /// if there is a token, make copy
14242  if (obj.token) {
14243  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14244  }
14245 
14246  /// set parents
14248  }
14249 
14250 
14251  /// set this parent in the children
14253 
14254  /// optional member could be nullptr
14255  if (node_to_solve) {
14256  node_to_solve->set_parent(this);
14257  }
14258 
14259  }
14260 
14261 
14262 
14263  void DerivimplicitCallback::set_node_to_solve(std::shared_ptr<Block>&& node_to_solve) {
14264  this->node_to_solve = node_to_solve;
14265  // set parents
14266  if (node_to_solve) {
14267  node_to_solve->set_parent(this);
14268  }
14269  }
14270 
14271  void DerivimplicitCallback::set_node_to_solve(const std::shared_ptr<Block>& node_to_solve) {
14272  this->node_to_solve = node_to_solve;
14273  // set parents
14274  if (node_to_solve) {
14275  node_to_solve->set_parent(this);
14276  }
14277  }
14278 
14279 
14280 
14281  ///
14282  /// SolutionExpression member functions definition
14283  ///
14284 
14285 
14286 
14287 
14288 
14289 
14290 
14291 
14293  /// use -> for pointer member
14294  solve_block->accept(v);
14295  (void)v;
14296  /// use -> for pointer member
14297  node_to_solve->accept(v);
14298  (void)v;
14299  }
14300 
14302  /// use -> for pointer member
14303  solve_block->accept(v);
14304  (void)v;
14305  /// use -> for pointer member
14306  node_to_solve->accept(v);
14307  (void)v;
14308  }
14309 
14311  v.visit_solution_expression(*this);
14312  }
14313 
14315  v.visit_solution_expression(*this);
14316  }
14317 
14318 
14320  : solve_block(solve_block), node_to_solve(node_to_solve) { set_parent_in_children(); }
14321 
14322 
14323  SolutionExpression::SolutionExpression(std::shared_ptr<SolveBlock> solve_block, std::shared_ptr<Expression> node_to_solve)
14324  : solve_block(solve_block), node_to_solve(node_to_solve) { set_parent_in_children(); }
14325 
14326 
14327  /// copy constructor implementation
14329  /// pointer member must be reseted with the new copy
14330  if (obj.solve_block) {
14331  this->solve_block.reset(obj.solve_block->clone());
14332  }
14333  /// pointer member must be reseted with the new copy
14334  if (obj.node_to_solve) {
14335  this->node_to_solve.reset(obj.node_to_solve->clone());
14336  }
14337 
14338  /// if there is a token, make copy
14339  if (obj.token) {
14340  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14341  }
14342 
14343  /// set parents
14345  }
14346 
14347 
14348  /// set this parent in the children
14350 
14351  /// optional member could be nullptr
14352  if (solve_block) {
14353  solve_block->set_parent(this);
14354  }
14355  /// optional member could be nullptr
14356  if (node_to_solve) {
14357  node_to_solve->set_parent(this);
14358  }
14359 
14360  }
14361 
14362 
14363 
14364  void SolutionExpression::set_solve_block(std::shared_ptr<SolveBlock>&& solve_block) {
14365  this->solve_block = solve_block;
14366  // set parents
14367  if (solve_block) {
14368  solve_block->set_parent(this);
14369  }
14370  }
14371 
14372  void SolutionExpression::set_solve_block(const std::shared_ptr<SolveBlock>& solve_block) {
14373  this->solve_block = solve_block;
14374  // set parents
14375  if (solve_block) {
14376  solve_block->set_parent(this);
14377  }
14378  }
14379 
14380 
14381  void SolutionExpression::set_node_to_solve(std::shared_ptr<Expression>&& node_to_solve) {
14382  this->node_to_solve = node_to_solve;
14383  // set parents
14384  if (node_to_solve) {
14385  node_to_solve->set_parent(this);
14386  }
14387  }
14388 
14389  void SolutionExpression::set_node_to_solve(const std::shared_ptr<Expression>& node_to_solve) {
14390  this->node_to_solve = node_to_solve;
14391  // set parents
14392  if (node_to_solve) {
14393  node_to_solve->set_parent(this);
14394  }
14395  }
14396 
14397 
14398 
14399  ///
14400  /// UpdateDt member functions definition
14401  ///
14402 
14403 
14404 
14405 
14406 
14408  /// use -> for pointer member
14409  value->accept(v);
14410  (void)v;
14411  }
14412 
14414  /// use -> for pointer member
14415  value->accept(v);
14416  (void)v;
14417  }
14418 
14420  v.visit_update_dt(*this);
14421  }
14422 
14424  v.visit_update_dt(*this);
14425  }
14426 
14427 
14430 
14431 
14432  UpdateDt::UpdateDt(std::shared_ptr<Double> value)
14434 
14435 
14436  /// copy constructor implementation
14438  /// pointer member must be reseted with the new copy
14439  if (obj.value) {
14440  this->value.reset(obj.value->clone());
14441  }
14442 
14443  /// if there is a token, make copy
14444  if (obj.token) {
14445  this-> token = std::shared_ptr<ModToken>(obj.token->clone());
14446  }
14447 
14448  /// set parents
14450  }
14451 
14452 
14453  /// set this parent in the children
14455 
14456  /// optional member could be nullptr
14457  if (value) {
14458  value->set_parent(this);
14459  }
14460 
14461  }
14462 
14463 
14464 
14465  void UpdateDt::set_value(std::shared_ptr<Double>&& value) {
14466  this->value = value;
14467  // set parents
14468  if (value) {
14469  value->set_parent(this);
14470  }
14471  }
14472 
14473  void UpdateDt::set_value(const std::shared_ptr<Double>& value) {
14474  this->value = value;
14475  // set parents
14476  if (value) {
14477  value->set_parent(this);
14478  }
14479  }
14480 
14481 
14482 } // namespace nmodl::ast
14483 
Auto generated AST classes declaration.
Represent token returned by scanner.
Definition: modtoken.hpp:50
Represents a AFTER block in NMODL.
Definition: after_block.hpp:51
std::shared_ptr< ModToken > token
token with location information
Definition: after_block.hpp:56
std::shared_ptr< BABlock > bablock
Block to be called after.
Definition: after_block.hpp:54
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4863
AfterBlock(BABlock *bablock)
Definition: ast.cpp:4837
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4828
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4816
void set_bablock(std::shared_ptr< BABlock > &&bablock)
Setter for member variable AfterBlock::bablock (rvalue reference)
Definition: ast.cpp:4874
Represents an argument to functions and procedures.
Definition: argument.hpp:48
Argument(Identifier *name, Unit *unit)
Definition: ast.cpp:1326
std::shared_ptr< Identifier > name
Name of the argument.
Definition: argument.hpp:51
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1317
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1295
std::shared_ptr< Unit > unit
Unit of the argument.
Definition: argument.hpp:53
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1356
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable Argument::unit (rvalue reference)
Definition: ast.cpp:1388
std::shared_ptr< ModToken > token
token with location information
Definition: argument.hpp:55
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1288
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable Argument::name (rvalue reference)
Definition: ast.cpp:1371
Represents a ASSIGNED block in the NMODL.
AssignedDefinitionVector::const_iterator insert_assigned_definition(AssignedDefinitionVector::const_iterator position, const std::shared_ptr< AssignedDefinition > &n)
Insert member to definitions.
Definition: ast.cpp:2627
void emplace_back_assigned_definition(AssignedDefinition *n)
Add member to definitions by raw pointer.
Definition: ast.cpp:2570
void set_definitions(AssignedDefinitionVector &&definitions)
Setter for member variable AssignedBlock::definitions (rvalue reference)
Definition: ast.cpp:2715
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2655
void reset_assigned_definition(AssignedDefinitionVector::const_iterator position, AssignedDefinition *n)
Reset member to definitions.
Definition: ast.cpp:2635
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2703
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2671
std::shared_ptr< ModToken > token
token with location information
AssignedDefinitionVector::const_iterator erase_assigned_definition(AssignedDefinitionVector::const_iterator first)
Erase member to definitions.
Definition: ast.cpp:2589
AssignedDefinitionVector definitions
Vector of assigned variables.
AssignedBlock(const AssignedDefinitionVector &definitions)
Definition: ast.cpp:2680
Represents a statement in ASSIGNED or STATE block.
void set_start(std::shared_ptr< Number > &&start)
Setter for member variable AssignedDefinition::start (rvalue reference)
Definition: ast.cpp:8854
void set_to(std::shared_ptr< Number > &&to)
Setter for member variable AssignedDefinition::to (rvalue reference)
Definition: ast.cpp:8837
std::shared_ptr< Integer > length
Length in case of array.
void set_from(std::shared_ptr< Number > &&from)
Setter for member variable AssignedDefinition::from (rvalue reference)
Definition: ast.cpp:8820
std::shared_ptr< Unit > unit
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8620
void set_abstol(std::shared_ptr< Double > &&abstol)
Setter for member variable AssignedDefinition::abstol (rvalue reference)
Definition: ast.cpp:8888
void set_length(std::shared_ptr< Integer > &&length)
Setter for member variable AssignedDefinition::length (rvalue reference)
Definition: ast.cpp:8803
std::shared_ptr< Double > abstol
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8692
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8598
std::shared_ptr< Number > start
TODO.
std::shared_ptr< Number > to
TODO.
std::shared_ptr< ModToken > token
token with location information
AssignedDefinition(Identifier *name, Integer *length, Number *from, Number *to, Number *start, Unit *unit, Double *abstol)
Definition: ast.cpp:8701
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable AssignedDefinition::unit (rvalue reference)
Definition: ast.cpp:8871
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable AssignedDefinition::name (rvalue reference)
Definition: ast.cpp:8786
std::shared_ptr< Identifier > name
Name of the variable.
std::shared_ptr< Number > from
TODO.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8751
Represents a block to be executed before or after another block.
Definition: ba_block.hpp:40
void set_type(std::shared_ptr< BABlockType > &&type)
Setter for member variable BABlock::type (rvalue reference)
Definition: ast.cpp:4975
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: ba_block.hpp:45
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4903
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable BABlock::statement_block (rvalue reference)
Definition: ast.cpp:4992
BABlock(BABlockType *type, StatementBlock *statement_block)
Definition: ast.cpp:4930
std::shared_ptr< ModToken > token
token with location information
Definition: ba_block.hpp:47
std::shared_ptr< BABlockType > type
Type of NMODL block.
Definition: ba_block.hpp:43
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4960
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4921
Type to represent different block types for before/after block.
void set_value(BAType value)
Setter for member variable BABlockType::value.
Definition: ast.cpp:7355
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7348
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7312
BAType value
block type
BABlockType(BAType value)
Definition: ast.cpp:7327
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7318
Represents BBCOREPOINTER statement in NMODL.
std::shared_ptr< ModToken > token
token with location information
void set_variables(BbcorePointerVarVector &&variables)
Setter for member variable BbcorePointer::variables (rvalue reference)
Definition: ast.cpp:12353
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12341
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12293
BbcorePointer(const BbcorePointerVarVector &variables)
Definition: ast.cpp:12318
BbcorePointerVarVector variables
Vector of bbcore pointer variables.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12309
Represent a single variable of type BBCOREPOINTER.
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable BbcorePointerVar::name (rvalue reference)
Definition: ast.cpp:2286
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2275
BbcorePointerVar(Name *name)
Definition: ast.cpp:2249
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2240
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
Variable name.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2228
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2224
Represents a BEFORE block in NMODL.
std::shared_ptr< BABlock > bablock
Block to be called before.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4732
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4779
void set_bablock(std::shared_ptr< BABlock > &&bablock)
Setter for member variable BeforeBlock::bablock (rvalue reference)
Definition: ast.cpp:4790
BeforeBlock(BABlock *bablock)
Definition: ast.cpp:4753
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4744
Represents binary expression in the NMODL.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6576
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable BinaryExpression::lhs (rvalue reference)
Definition: ast.cpp:6592
std::shared_ptr< ModToken > token
token with location information
BinaryOperator op
Operator.
std::shared_ptr< Expression > lhs
LHS of the binary expression.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6511
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable BinaryExpression::rhs (rvalue reference)
Definition: ast.cpp:6618
BinaryExpression(Expression *lhs, const BinaryOperator &op, Expression *rhs)
Definition: ast.cpp:6544
void set_op(BinaryOperator &&op)
Setter for member variable BinaryExpression::op (rvalue reference)
Definition: ast.cpp:6609
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6535
std::shared_ptr< Expression > rhs
RHS of the binary expression.
Operator used in ast::BinaryExpression.
void set_value(BinaryOp value)
Setter for member variable BinaryOperator::value.
Definition: ast.cpp:6287
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6280
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6250
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6244
Represents a multi-line comment in NMODL.
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable BlockComment::statement (rvalue reference)
Definition: ast.cpp:12713
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12702
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12667
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12655
BlockComment(String *statement)
Definition: ast.cpp:12676
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< String > statement
comment text
Base class for all block scoped nodes.
Definition: block.hpp:41
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:400
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:394
Represents a boolean variable.
Definition: boolean.hpp:42
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:776
void set_value(int value)
Setter for member variable Boolean::value.
Definition: ast.cpp:783
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:740
std::shared_ptr< ModToken > token
token with location information
Definition: boolean.hpp:47
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:746
Boolean(int value)
Definition: ast.cpp:755
int value
Value of boolean.
Definition: boolean.hpp:45
Represents a BREAKPOINT block in NMODL.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable BreakpointBlock::statement_block (rvalue reference)
Definition: ast.cpp:4706
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4648
BreakpointBlock(StatementBlock *statement_block)
Definition: ast.cpp:4669
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4660
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4695
Represent COMPARTMENT statement in NMODL.
Definition: compartment.hpp:39
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10359
std::shared_ptr< Name > index_name
Name of the index variable in volume expression.
Definition: compartment.hpp:42
std::shared_ptr< Expression > volume
The volume of the compartment.
Definition: compartment.hpp:44
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10316
Compartment(Name *index_name, Expression *volume, const NameVector &species)
Definition: ast.cpp:10325
NameVector species
The names of the species that reside in this compartment.
Definition: compartment.hpp:46
void set_index_name(std::shared_ptr< Name > &&index_name)
Setter for member variable Compartment::index_name (rvalue reference)
Definition: ast.cpp:10379
std::shared_ptr< ModToken > token
token with location information
Definition: compartment.hpp:48
void set_species(NameVector &&species)
Setter for member variable Compartment::species (rvalue reference)
Definition: ast.cpp:10413
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10284
void set_volume(std::shared_ptr< Expression > &&volume)
Setter for member variable Compartment::volume (rvalue reference)
Definition: ast.cpp:10396
Represents CONDUCTANCE statement in NMODL.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8939
void set_ion(std::shared_ptr< Name > &&ion)
Setter for member variable ConductanceHint::ion (rvalue reference)
Definition: ast.cpp:9010
void set_conductance(std::shared_ptr< Name > &&conductance)
Setter for member variable ConductanceHint::conductance (rvalue reference)
Definition: ast.cpp:8993
std::shared_ptr< Name > ion
Ion name.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8978
ConductanceHint(Name *conductance, Name *ion)
Definition: ast.cpp:8948
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > conductance
Conductance variable.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8917
Represent CONSERVE statement in NMODL.
Definition: conserve.hpp:38
void set_react(std::shared_ptr< Expression > &&react)
Setter for member variable Conserve::react (rvalue reference)
Definition: ast.cpp:10235
std::shared_ptr< Expression > expr
TODO.
Definition: conserve.hpp:43
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10220
Conserve(Expression *react, Expression *expr)
Definition: ast.cpp:10190
std::shared_ptr< ModToken > token
token with location information
Definition: conserve.hpp:45
std::shared_ptr< Expression > react
TODO.
Definition: conserve.hpp:41
void set_expr(std::shared_ptr< Expression > &&expr)
Setter for member variable Conserve::expr (rvalue reference)
Definition: ast.cpp:10252
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10163
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10181
Represent CONSTANT block in the mod file.
ConstantStatementVector statements
Vector of constant statements.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5402
void set_statements(ConstantStatementVector &&statements)
Setter for member variable ConstantBlock::statements (rvalue reference)
Definition: ast.cpp:5446
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5386
ConstantBlock(const ConstantStatementVector &statements)
Definition: ast.cpp:5411
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5434
Represent statement in CONSTANT block of NMODL.
ConstantStatement(ConstantVar *constant)
Definition: ast.cpp:10954
void set_constant(std::shared_ptr< ConstantVar > &&constant)
Setter for member variable ConstantStatement::constant (rvalue reference)
Definition: ast.cpp:10991
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10980
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10945
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10933
std::shared_ptr< ConstantVar > constant
single constant variable
Represents a variable in the ast::ConstantBlock.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:6084
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6165
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ConstantVar::name (rvalue reference)
Definition: ast.cpp:6184
ConstantVar(Name *name, Number *value, Unit *unit)
Definition: ast.cpp:6131
std::shared_ptr< Unit > unit
Unit for the variable.
std::shared_ptr< Number > value
Value of the constant.
std::shared_ptr< Name > name
Name of the variable.
void set_value(std::shared_ptr< Number > &&value)
Setter for member variable ConstantVar::value (rvalue reference)
Definition: ast.cpp:6201
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ConstantVar::unit (rvalue reference)
Definition: ast.cpp:6218
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6094
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6122
Represents a CONSTRUCTOR block in the NMODL.
ConstructorBlock(StatementBlock *statement_block)
Definition: ast.cpp:2932
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ConstructorBlock::statement_block (rvalue reference)
Definition: ast.cpp:2969
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2923
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2911
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2958
std::shared_ptr< ModToken > token
token with location information
Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks.
Definition: cvode_block.hpp:38
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:13924
std::shared_ptr< Name > name
Name of the block.
Definition: cvode_block.hpp:41
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
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13820
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable CvodeBlock::name (rvalue reference)
Definition: ast.cpp:13890
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:13777
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13867
void set_stiff_block(std::shared_ptr< StatementBlock > &&stiff_block)
Setter for member variable CvodeBlock::stiff_block (rvalue reference)
Definition: ast.cpp:13941
std::shared_ptr< Integer > n_odes
number of ODEs to solve
Definition: cvode_block.hpp:43
CvodeBlock(Name *name, Integer *n_odes, StatementBlock *non_stiff_block, StatementBlock *stiff_block)
Definition: ast.cpp:13829
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
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13790
std::shared_ptr< ModToken > token
token with location information
Definition: cvode_block.hpp:49
void set_n_odes(std::shared_ptr< Integer > &&n_odes)
Setter for member variable CvodeBlock::n_odes (rvalue reference)
Definition: ast.cpp:13907
Represents a DEFINE statement in NMODL.
Definition: define.hpp:38
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8219
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Define::name (rvalue reference)
Definition: ast.cpp:8234
Define(Name *name, Integer *value)
Definition: ast.cpp:8189
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8162
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8180
std::shared_ptr< ModToken > token
token with location information
Definition: define.hpp:45
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8155
std::shared_ptr< Integer > value
Value of the macro.
Definition: define.hpp:43
std::shared_ptr< Name > name
Name of the macro.
Definition: define.hpp:41
void set_value(std::shared_ptr< Integer > &&value)
Setter for member variable Define::value (rvalue reference)
Definition: ast.cpp:8251
Represents DERIVATIVE block in the NMODL.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3255
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3248
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3273
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
Name of the derivative block.
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DerivativeBlock::statement_block (rvalue reference)
Definition: ast.cpp:3344
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable DerivativeBlock::name (rvalue reference)
Definition: ast.cpp:3327
DerivativeBlock(Name *name, StatementBlock *statement_block)
Definition: ast.cpp:3282
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3312
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Represent a callback to NEURON's derivimplicit solver.
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14217
DerivimplicitCallback(Block *node_to_solve)
Definition: ast.cpp:14226
std::shared_ptr< Block > node_to_solve
Block to be solved (typically derivative)
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:14263
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14205
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14252
Represents a DESTRUCTOR block in the NMODL.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3042
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DestructorBlock::statement_block (rvalue reference)
Definition: ast.cpp:3053
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2995
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3007
DestructorBlock(StatementBlock *statement_block)
Definition: ast.cpp:3016
std::shared_ptr< ModToken > token
token with location information
Represents differential equation in DERIVATIVE block.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6644
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6656
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< BinaryExpression > expression
Differential Expression.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6691
DiffEqExpression(BinaryExpression *expression)
Definition: ast.cpp:6665
void set_expression(std::shared_ptr< BinaryExpression > &&expression)
Setter for member variable DiffEqExpression::expression (rvalue reference)
Definition: ast.cpp:6702
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable DiscreteBlock::name (rvalue reference)
Definition: ast.cpp:3765
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3750
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
std::shared_ptr< Name > name
Name of the discrete block.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3693
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable DiscreteBlock::statement_block (rvalue reference)
Definition: ast.cpp:3782
DiscreteBlock(Name *name, StatementBlock *statement_block)
Definition: ast.cpp:3720
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3686
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3711
Represents a double variable.
Definition: double.hpp:53
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:687
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:681
void set_value(std::string value)
Setter for member variable Double::value.
Definition: ast.cpp:724
std::shared_ptr< ModToken > token
token with location information
Definition: double.hpp:58
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:717
std::string value
Value of double.
Definition: double.hpp:56
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable DoubleUnit::value (rvalue reference)
Definition: ast.cpp:5721
std::shared_ptr< Double > value
TODO.
Definition: double_unit.hpp:41
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable DoubleUnit::unit (rvalue reference)
Definition: ast.cpp:5738
DoubleUnit(Double *value, Unit *unit)
Definition: ast.cpp:5676
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5667
std::shared_ptr< ModToken > token
token with location information
Definition: double_unit.hpp:45
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5706
std::shared_ptr< Unit > unit
TODO.
Definition: double_unit.hpp:43
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5645
Represent linear solver solution block based on Eigen.
std::shared_ptr< StatementBlock > setup_x_block
update X from states
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13480
std::shared_ptr< StatementBlock > initialize_block
Statement block to be executed before calling linear solver.
std::shared_ptr< StatementBlock > finalize_block
Statement block to be executed after calling linear solver.
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:13511
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:13579
std::shared_ptr< StatementBlock > update_states_block
update back states from X
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13383
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13425
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:13562
void set_finalize_block(std::shared_ptr< StatementBlock > &&finalize_block)
Setter for member variable EigenLinearSolverBlock::finalize_block (rvalue reference)
Definition: ast.cpp:13596
std::shared_ptr< StatementBlock > variable_block
Statements to be declared in the functor.
std::shared_ptr< ModToken > token
token with location information
void set_variable_block(std::shared_ptr< StatementBlock > &&variable_block)
Setter for member variable EigenLinearSolverBlock::variable_block (rvalue reference)
Definition: ast.cpp:13528
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:13434
void set_initialize_block(std::shared_ptr< StatementBlock > &&initialize_block)
Setter for member variable EigenLinearSolverBlock::initialize_block (rvalue reference)
Definition: ast.cpp:13545
std::shared_ptr< Integer > n_state_vars
number of state vars used in solve
Represent newton solver solution block based on Eigen.
std::shared_ptr< StatementBlock > setup_x_block
update X from states
void set_functor_block(std::shared_ptr< StatementBlock > &&functor_block)
Setter for member variable EigenNewtonSolverBlock::functor_block (rvalue reference)
Definition: ast.cpp:13308
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:13291
std::shared_ptr< StatementBlock > functor_block
odes as functor for eigen
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13146
std::shared_ptr< ModToken > token
token with location information
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:13155
void set_variable_block(std::shared_ptr< StatementBlock > &&variable_block)
Setter for member variable EigenNewtonSolverBlock::variable_block (rvalue reference)
Definition: ast.cpp:13257
std::shared_ptr< Integer > n_state_vars
number of state vars used in solve
void set_initialize_block(std::shared_ptr< StatementBlock > &&initialize_block)
Setter for member variable EigenNewtonSolverBlock::initialize_block (rvalue reference)
Definition: ast.cpp:13274
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:13325
std::shared_ptr< StatementBlock > finalize_block
Statement block to be executed after calling newton solver.
void set_finalize_block(std::shared_ptr< StatementBlock > &&finalize_block)
Setter for member variable EigenNewtonSolverBlock::finalize_block (rvalue reference)
Definition: ast.cpp:13342
std::shared_ptr< StatementBlock > initialize_block
Statement block to be executed before calling newton solver.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13205
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13098
std::shared_ptr< StatementBlock > variable_block
Statements to be declared in the functor.
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:13240
std::shared_ptr< StatementBlock > update_states_block
update back states from X
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1845
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
TODO.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1794
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1810
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ElectrodeCurVar::name (rvalue reference)
Definition: ast.cpp:1856
ElectrodeCurVar(Name *name)
Definition: ast.cpp:1819
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1798
Represents ELECTRODE_CURRENT variables statement in NMODL.
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11741
ElectrodeCurVarVector currents
Vector of electrode current variables.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11709
void set_currents(ElectrodeCurVarVector &&currents)
Setter for member variable ElectrodeCurrent::currents (rvalue reference)
Definition: ast.cpp:11753
ElectrodeCurrent(const ElectrodeCurVarVector &currents)
Definition: ast.cpp:11718
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11693
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ElseIfStatement::statement_block (rvalue reference)
Definition: ast.cpp:9835
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9764
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable ElseIfStatement::condition (rvalue reference)
Definition: ast.cpp:9818
std::shared_ptr< StatementBlock > statement_block
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9746
ElseIfStatement(Expression *condition, StatementBlock *statement_block)
Definition: ast.cpp:9773
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9803
std::shared_ptr< Expression > condition
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9861
ElseStatement(StatementBlock *statement_block)
Definition: ast.cpp:9882
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< StatementBlock > statement_block
TODO.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9908
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ElseStatement::statement_block (rvalue reference)
Definition: ast.cpp:9919
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9873
Base class for all expressions in the NMODL.
Definition: expression.hpp:43
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:372
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:378
std::shared_ptr< Expression > expression
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9036
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9048
ExpressionStatement(Expression *expression)
Definition: ast.cpp:9057
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ExpressionStatement::expression (rvalue reference)
Definition: ast.cpp:9094
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9083
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2361
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2310
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2326
std::shared_ptr< Name > name
TODO.
Definition: extern_var.hpp:41
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ExternVar::name (rvalue reference)
Definition: ast.cpp:2372
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2314
ExternVar(Name *name)
Definition: ast.cpp:2335
std::shared_ptr< ModToken > token
token with location information
Definition: extern_var.hpp:43
This construct is deprecated and no longer supported in the NMODL.
Definition: external.hpp:39
External(const ExternVarVector &variables)
Definition: ast.cpp:12404
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12379
std::shared_ptr< ModToken > token
token with location information
Definition: external.hpp:44
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12427
ExternVarVector variables
Vector of external variables.
Definition: external.hpp:42
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12395
void set_variables(ExternVarVector &&variables)
Setter for member variable External::variables (rvalue reference)
Definition: ast.cpp:12439
void set_unit1(std::shared_ptr< Unit > &&unit1)
Setter for member variable FactorDef::unit1 (rvalue reference)
Definition: ast.cpp:7665
std::shared_ptr< Name > name
TODO.
Definition: factor_def.hpp:41
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FactorDef::name (rvalue reference)
Definition: ast.cpp:7631
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7604
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable FactorDef::value (rvalue reference)
Definition: ast.cpp:7648
std::shared_ptr< ModToken > token
token with location information
Definition: factor_def.hpp:51
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7505
std::shared_ptr< Double > value
TODO.
Definition: factor_def.hpp:43
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7489
std::shared_ptr< Unit > unit2
TODO.
Definition: factor_def.hpp:49
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7553
void set_gt(std::shared_ptr< Boolean > &&gt)
Setter for member variable FactorDef::gt (rvalue reference)
Definition: ast.cpp:7682
void set_unit2(std::shared_ptr< Unit > &&unit2)
Setter for member variable FactorDef::unit2 (rvalue reference)
Definition: ast.cpp:7699
std::shared_ptr< Boolean > gt
Todo: Michael : rename variable gt as well.
Definition: factor_def.hpp:47
std::shared_ptr< Unit > unit1
TODO.
Definition: factor_def.hpp:45
Represents a float variable.
Definition: float.hpp:44
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:622
std::string value
Value of float.
Definition: float.hpp:47
void set_value(std::string value)
Setter for member variable Float::value.
Definition: ast.cpp:665
std::shared_ptr< ModToken > token
token with location information
Definition: float.hpp:49
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:658
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:628
Float(const std::string &value)
Definition: ast.cpp:637
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ForNetcon::statement_block (rvalue reference)
Definition: ast.cpp:5115
void set_parameters(ArgumentVector &&parameters)
Setter for member variable ForNetcon::parameters (rvalue reference)
Definition: ast.cpp:5098
ForNetcon(const ArgumentVector &parameters, StatementBlock *statement_block)
Definition: ast.cpp:5052
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
Definition: for_netcon.hpp:44
ArgumentVector parameters
Arguments to the for netcon block.
Definition: for_netcon.hpp:42
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5082
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5021
std::shared_ptr< ModToken > token
token with location information
Definition: for_netcon.hpp:46
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5043
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9258
std::shared_ptr< ModToken > token
token with location information
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FromStatement::name (rvalue reference)
Definition: ast.cpp:9336
void set_to(std::shared_ptr< Expression > &&to)
Setter for member variable FromStatement::to (rvalue reference)
Definition: ast.cpp:9370
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9218
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable FromStatement::statement_block (rvalue reference)
Definition: ast.cpp:9404
std::shared_ptr< Name > name
TODO.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:9202
std::shared_ptr< Expression > increment
TODO.
FromStatement(Name *name, Expression *from, Expression *to, Expression *increment, StatementBlock *statement_block)
Definition: ast.cpp:9267
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9309
std::shared_ptr< Expression > to
TODO.
std::shared_ptr< StatementBlock > statement_block
TODO.
void set_from(std::shared_ptr< Expression > &&from)
Setter for member variable FromStatement::from (rvalue reference)
Definition: ast.cpp:9353
void set_increment(std::shared_ptr< Expression > &&increment)
Setter for member variable FromStatement::increment (rvalue reference)
Definition: ast.cpp:9387
std::shared_ptr< Expression > from
TODO.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3969
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
ArgumentVector parameters
Vector of the parameters.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4067
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionBlock::name (rvalue reference)
Definition: ast.cpp:4091
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable FunctionBlock::unit (rvalue reference)
Definition: ast.cpp:4125
FunctionBlock(Name *name, const ArgumentVector &parameters, Unit *unit, StatementBlock *statement_block)
Definition: ast.cpp:4029
std::shared_ptr< Name > name
Name of the function.
std::shared_ptr< Unit > unit
Unit if specified.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4020
void set_parameters(ArgumentVector &&parameters)
Setter for member variable FunctionBlock::parameters (rvalue reference)
Definition: ast.cpp:4108
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable FunctionBlock::statement_block (rvalue reference)
Definition: ast.cpp:4142
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3982
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7067
ExpressionVector arguments
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7096
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionCall::name (rvalue reference)
Definition: ast.cpp:7151
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7074
std::shared_ptr< Name > name
TODO.
void set_arguments(ExpressionVector &&arguments)
Setter for member variable FunctionCall::arguments (rvalue reference)
Definition: ast.cpp:7168
FunctionCall(Name *name, const ExpressionVector &arguments)
Definition: ast.cpp:7105
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7135
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable FunctionTableBlock::unit (rvalue reference)
Definition: ast.cpp:3945
void set_parameters(ArgumentVector &&parameters)
Setter for member variable FunctionTableBlock::parameters (rvalue reference)
Definition: ast.cpp:3928
std::shared_ptr< ModToken > token
token with location information
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable FunctionTableBlock::name (rvalue reference)
Definition: ast.cpp:3911
ArgumentVector parameters
Vector of the parameters.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3806
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3816
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3891
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3848
std::shared_ptr< Unit > unit
Unit if specified.
FunctionTableBlock(Name *name, const ArgumentVector &parameters, Unit *unit)
Definition: ast.cpp:3857
std::shared_ptr< Name > name
Name of the function table block.
Represents GLOBAL statement in NMODL.
Definition: global.hpp:39
GlobalVarVector variables
Vector of global variables.
Definition: global.hpp:42
GlobalVarVector::const_iterator insert_global_var(GlobalVarVector::const_iterator position, const std::shared_ptr< GlobalVar > &n)
Insert member to variables.
Definition: ast.cpp:11922
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11950
void emplace_back_global_var(GlobalVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:11865
void reset_global_var(GlobalVarVector::const_iterator position, GlobalVar *n)
Reset member to variables.
Definition: ast.cpp:11930
void set_variables(GlobalVarVector &&variables)
Setter for member variable Global::variables (rvalue reference)
Definition: ast.cpp:12010
Global(const GlobalVarVector &variables)
Definition: ast.cpp:11975
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11998
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11966
GlobalVarVector::const_iterator erase_global_var(GlobalVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:11884
std::shared_ptr< ModToken > token
token with location information
Definition: global.hpp:44
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1982
std::shared_ptr< Name > name
TODO.
Definition: global_var.hpp:41
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1966
std::shared_ptr< ModToken > token
token with location information
Definition: global_var.hpp:43
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2017
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable GlobalVar::name (rvalue reference)
Definition: ast.cpp:2028
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1970
GlobalVar(Name *name)
Definition: ast.cpp:1991
Base class for all identifiers.
Definition: identifier.hpp:41
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:416
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:422
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9642
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable IfStatement::statement_block (rvalue reference)
Definition: ast.cpp:9683
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable IfStatement::condition (rvalue reference)
Definition: ast.cpp:9666
IfStatement(Expression *condition, StatementBlock *statement_block, const ElseIfStatementVector &elseifs, ElseStatement *elses)
Definition: ast.cpp:9604
std::shared_ptr< ElseStatement > elses
TODO.
std::shared_ptr< Expression > condition
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9557
std::shared_ptr< StatementBlock > statement_block
TODO.
ElseIfStatementVector elseifs
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9595
std::shared_ptr< ModToken > token
token with location information
void set_elseifs(ElseIfStatementVector &&elseifs)
Setter for member variable IfStatement::elseifs (rvalue reference)
Definition: ast.cpp:9700
void set_elses(std::shared_ptr< ElseStatement > &&elses)
Setter for member variable IfStatement::elses (rvalue reference)
Definition: ast.cpp:9717
Represents an INCLUDE statement in NMODL.
Definition: include.hpp:39
NodeVector blocks
AST of the included file.
Definition: include.hpp:44
Include(String *filename, const NodeVector &blocks)
Definition: ast.cpp:8311
void set_blocks(NodeVector &&blocks)
Setter for member variable Include::blocks (rvalue reference)
Definition: ast.cpp:8374
std::shared_ptr< String > filename
path to the file to include
Definition: include.hpp:42
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8341
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8280
std::shared_ptr< ModToken > token
token with location information
Definition: include.hpp:46
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8302
void set_filename(std::shared_ptr< String > &&filename)
Setter for member variable Include::filename (rvalue reference)
Definition: ast.cpp:8357
Represents a INDEPENDENT block in the NMODL.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2532
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2484
IndependentBlock(const NameVector &variables)
Definition: ast.cpp:2509
NameVector variables
List of variable that should be independent.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2500
void set_variables(NameVector &&variables)
Setter for member variable IndependentBlock::variables (rvalue reference)
Definition: ast.cpp:2544
std::shared_ptr< ModToken > token
token with location information
Represents specific element of an array variable.
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable IndexedName::name (rvalue reference)
Definition: ast.cpp:1085
std::shared_ptr< Identifier > name
Name of array variable.
std::shared_ptr< ModToken > token
token with location information
void set_length(std::shared_ptr< Expression > &&length)
Setter for member variable IndexedName::length (rvalue reference)
Definition: ast.cpp:1102
std::shared_ptr< Expression > length
length of an array or index position
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1006
IndexedName(Identifier *name, Expression *length)
Definition: ast.cpp:1040
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1013
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1031
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1070
Represents a INITIAL block in the NMODL.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
InitialBlock(StatementBlock *statement_block)
Definition: ast.cpp:2848
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2839
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2874
std::shared_ptr< ModToken > token
token with location information
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable InitialBlock::statement_block (rvalue reference)
Definition: ast.cpp:2885
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2827
Represents an integer variable.
Definition: integer.hpp:49
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:525
std::shared_ptr< Name > macro
if integer is a macro then it's name
Definition: integer.hpp:54
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:541
void set_macro(std::shared_ptr< Name > &&macro)
Setter for member variable Integer::macro (rvalue reference)
Definition: ast.cpp:596
std::shared_ptr< ModToken > token
token with location information
Definition: integer.hpp:56
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:578
int value
Value of integer.
Definition: integer.hpp:52
void set_value(int value)
Setter for member variable Integer::value.
Definition: ast.cpp:589
KineticBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:5186
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5139
NameVector solvefor
Solve for specification (TODO)
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable KineticBlock::name (rvalue reference)
Definition: ast.cpp:5240
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5177
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable KineticBlock::statement_block (rvalue reference)
Definition: ast.cpp:5274
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5149
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
Name of the kinetic block.
void set_solvefor(NameVector &&solvefor)
Setter for member variable KineticBlock::solvefor (rvalue reference)
Definition: ast.cpp:5257
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5220
Represents a LAG statement in the mod file.
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable LagStatement::name (rvalue reference)
Definition: ast.cpp:10890
void set_byname(std::shared_ptr< Name > &&byname)
Setter for member variable LagStatement::byname (rvalue reference)
Definition: ast.cpp:10907
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10875
LagStatement(Identifier *name, Name *byname)
Definition: ast.cpp:10845
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10836
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10818
std::shared_ptr< Identifier > name
Name of the variable (TODO)
std::shared_ptr< Name > byname
Name of the variable (TODO)
void set_max(std::shared_ptr< Number > &&max)
Setter for member variable Limits::max (rvalue reference)
Definition: ast.cpp:5942
std::shared_ptr< Number > max
TODO.
Definition: limits.hpp:43
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5910
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5871
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5853
void set_min(std::shared_ptr< Number > &&min)
Setter for member variable Limits::min (rvalue reference)
Definition: ast.cpp:5925
Limits(Number *min, Number *max)
Definition: ast.cpp:5880
std::shared_ptr< Number > min
TODO.
Definition: limits.hpp:41
std::shared_ptr< ModToken > token
token with location information
Definition: limits.hpp:45
One equation in a system of equations tha collectively form a LINEAR block.
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable LinEquation::lhs (rvalue reference)
Definition: ast.cpp:7026
std::shared_ptr< Expression > rhs
Right-hand-side of the equation.
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7011
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable LinEquation::rhs (rvalue reference)
Definition: ast.cpp:7043
LinEquation(Expression *lhs, Expression *rhs)
Definition: ast.cpp:6981
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6954
std::shared_ptr< Expression > lhs
Left-hand-side of the equation.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6972
Represents a one line comment in NMODL.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12618
LineComment(String *statement)
Definition: ast.cpp:12592
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12583
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable LineComment::statement (rvalue reference)
Definition: ast.cpp:12629
std::shared_ptr< String > statement
comment text
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12571
Represents LINEAR block in the NMODL.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void set_solvefor(NameVector &&solvefor)
Setter for member variable LinearBlock::solvefor (rvalue reference)
Definition: ast.cpp:3486
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable LinearBlock::statement_block (rvalue reference)
Definition: ast.cpp:3503
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3406
NameVector solvefor
TODO.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3368
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3449
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable LinearBlock::name (rvalue reference)
Definition: ast.cpp:3469
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
Name of the linear block.
LinearBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:3415
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3378
LocalVarVector::const_iterator insert_local_var(LocalVarVector::const_iterator position, const std::shared_ptr< LocalVar > &n)
Insert member to variables.
Definition: ast.cpp:7959
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7987
void reset_local_var(LocalVarVector::const_iterator position, LocalVar *n)
Reset member to variables.
Definition: ast.cpp:7967
LocalVarVector::const_iterator erase_local_var(LocalVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:7921
void set_variables(LocalVarVector &&variables)
Setter for member variable LocalListStatement::variables (rvalue reference)
Definition: ast.cpp:8047
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8035
void emplace_back_local_var(LocalVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:7902
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8003
LocalListStatement(const LocalVarVector &variables)
Definition: ast.cpp:8012
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5762
std::shared_ptr< Identifier > name
TODO.
Definition: local_var.hpp:41
std::shared_ptr< ModToken > token
token with location information
Definition: local_var.hpp:43
LocalVar(Identifier *name)
Definition: ast.cpp:5787
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5766
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable LocalVar::name (rvalue reference)
Definition: ast.cpp:5824
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5813
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5778
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Definition: lon_diffuse.hpp:39
std::shared_ptr< ModToken > token
token with location information
Definition: lon_diffuse.hpp:48
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10477
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10520
std::shared_ptr< Expression > rate
Diffusion coefficient/rate.
Definition: lon_diffuse.hpp:44
void set_rate(std::shared_ptr< Expression > &&rate)
Setter for member variable LonDiffuse::rate (rvalue reference)
Definition: ast.cpp:10557
LonDiffuse(Name *index_name, Expression *rate, const NameVector &species)
Definition: ast.cpp:10486
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10445
NameVector species
Names of the diffusing species.
Definition: lon_diffuse.hpp:46
void set_index_name(std::shared_ptr< Name > &&index_name)
Setter for member variable LonDiffuse::index_name (rvalue reference)
Definition: ast.cpp:10540
std::shared_ptr< Name > index_name
Index variable name.
Definition: lon_diffuse.hpp:42
void set_species(NameVector &&species)
Setter for member variable LonDiffuse::species (rvalue reference)
Definition: ast.cpp:10574
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable LongitudinalDiffusionBlock::name (rvalue reference)
Definition: ast.cpp:14061
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13999
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:13965
LongitudinalDiffusionBlock(Name *name, StatementBlock *longitudinal_diffusion_statements, StatementBlock *compartment_statements)
Definition: ast.cpp:14008
void set_compartment_statements(std::shared_ptr< StatementBlock > &&compartment_statements)
Setter for member variable LongitudinalDiffusionBlock::compartment_statements (rvalue reference)
Definition: ast.cpp:14095
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:14078
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14042
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13975
std::shared_ptr< StatementBlock > longitudinal_diffusion_statements
All LONGITUDINAL_DIFFUSION statements in the KINETIC block.
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< StatementBlock > compartment_statements
All (required) COMPARTMENT statements in the KINETIC block.
std::shared_ptr< Name > name
Name of the longitudinal diffusion block.
Represent matexp solver solution block based on Eigen.
void set_conserve(ConserveVector &&conserve)
Setter for member variable MatexpBlock::conserve (rvalue reference)
Definition: ast.cpp:13753
ConserveVector conserve
Conserve statements found in jacobian block.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13656
MatexpBlock(Boolean *steadystate, StatementBlock *jacobian_block, const ConserveVector &conserve)
Definition: ast.cpp:13665
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13699
void set_jacobian_block(std::shared_ptr< StatementBlock > &&jacobian_block)
Setter for member variable MatexpBlock::jacobian_block (rvalue reference)
Definition: ast.cpp:13736
std::shared_ptr< Boolean > steadystate
If true then find steadystate solution, else advance by dt.
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:13628
std::shared_ptr< StatementBlock > jacobian_block
Block of statements that assign to the Jacobian matrix.
void set_steadystate(std::shared_ptr< Boolean > &&steadystate)
Setter for member variable MatexpBlock::steadystate (rvalue reference)
Definition: ast.cpp:13719
Model(String *title)
Definition: ast.cpp:8094
std::shared_ptr< String > title
TODO.
Definition: model.hpp:41
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8085
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8120
void set_title(std::shared_ptr< String > &&title)
Setter for member variable Model::title (rvalue reference)
Definition: ast.cpp:8131
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8073
std::shared_ptr< ModToken > token
token with location information
Definition: model.hpp:43
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10113
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10119
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10135
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10141
Represents a name.
Definition: name.hpp:44
void set_value(std::shared_ptr< String > &&value)
Setter for member variable Name::value (rvalue reference)
Definition: ast.cpp:862
void set_name(const std::string &name) override
Set name for the current ast node.
Definition: ast.cpp:846
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:851
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:813
std::shared_ptr< ModToken > token
token with location information
Definition: name.hpp:49
std::shared_ptr< String > value
Value of name.
Definition: name.hpp:47
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:797
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:801
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NetReceiveBlock::statement_block (rvalue reference)
Definition: ast.cpp:4462
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4429
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4368
void set_parameters(ArgumentVector &&parameters)
Setter for member variable NetReceiveBlock::parameters (rvalue reference)
Definition: ast.cpp:4445
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4390
ArgumentVector parameters
Parameters to the net receive block.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
NetReceiveBlock(const ArgumentVector &parameters, StatementBlock *statement_block)
Definition: ast.cpp:4399
Represent NEURON block in the mod file.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5472
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5519
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5484
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NeuronBlock::statement_block (rvalue reference)
Definition: ast.cpp:5530
NeuronBlock(StatementBlock *statement_block)
Definition: ast.cpp:5493
Base class for all AST node.
Definition: node.hpp:40
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:328
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:334
One equation in a system of equations that collectively make a NONLINEAR block.
std::shared_ptr< Expression > rhs
Right-hand-side of the equation.
void set_rhs(std::shared_ptr< Expression > &&rhs)
Setter for member variable NonLinEquation::rhs (rvalue reference)
Definition: ast.cpp:6925
std::shared_ptr< Expression > lhs
Left-hand-side of the equation.
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6836
NonLinEquation(Expression *lhs, Expression *rhs)
Definition: ast.cpp:6863
void set_lhs(std::shared_ptr< Expression > &&lhs)
Setter for member variable NonLinEquation::lhs (rvalue reference)
Definition: ast.cpp:6908
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6854
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6893
Represents NONLINEAR block in the NMODL.
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:3527
NonLinearBlock(Name *name, const NameVector &solvefor, StatementBlock *statement_block)
Definition: ast.cpp:3574
NameVector solvefor
Name of the integration method.
std::shared_ptr< ModToken > token
token with location information
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable NonLinearBlock::name (rvalue reference)
Definition: ast.cpp:3628
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3608
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3537
std::shared_ptr< Name > name
Name of the non-linear block.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3565
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable NonLinearBlock::statement_block (rvalue reference)
Definition: ast.cpp:3662
void set_solvefor(NameVector &&solvefor)
Setter for member variable NonLinearBlock::solvefor (rvalue reference)
Definition: ast.cpp:3645
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1759
NonspecificCurVar(Name *name)
Definition: ast.cpp:1733
std::shared_ptr< Name > name
TODO.
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable NonspecificCurVar::name (rvalue reference)
Definition: ast.cpp:1770
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1708
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1712
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1724
std::shared_ptr< ModToken > token
token with location information
Represents NONSPECIFIC_CURRENT variables statement in NMODL.
Definition: nonspecific.hpp:39
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11607
Nonspecific(const NonspecificCurVarVector &currents)
Definition: ast.cpp:11632
void set_currents(NonspecificCurVarVector &&currents)
Setter for member variable Nonspecific::currents (rvalue reference)
Definition: ast.cpp:11667
NonspecificCurVarVector currents
Vector of non specific variables.
Definition: nonspecific.hpp:42
std::shared_ptr< ModToken > token
token with location information
Definition: nonspecific.hpp:44
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11623
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11655
Represents the coreneuron nrn_state callback function.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:13010
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:13042
StatementVector solve_statements
solve blocks to be called or generated
NrnStateBlock(const StatementVector &solve_statements)
Definition: ast.cpp:13019
void set_solve_statements(StatementVector &&solve_statements)
Setter for member variable NrnStateBlock::solve_statements (rvalue reference)
Definition: ast.cpp:13054
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12994
Base class for all numbers.
Definition: number.hpp:39
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:438
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:444
void set_max(std::shared_ptr< Number > &&max)
Setter for member variable NumberRange::max (rvalue reference)
Definition: ast.cpp:6060
NumberRange(Number *min, Number *max)
Definition: ast.cpp:5998
std::shared_ptr< Number > min
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5989
void set_min(std::shared_ptr< Number > &&min)
Setter for member variable NumberRange::min (rvalue reference)
Definition: ast.cpp:6043
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6028
std::shared_ptr< Number > max
TODO.
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5971
Represents CURIE information in NMODL.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12786
std::shared_ptr< ModToken > token
token with location information
OntologyStatement(String *ontology_id)
Definition: ast.cpp:12760
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12739
std::shared_ptr< String > ontology_id
Ontology name.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12751
void set_ontology_id(std::shared_ptr< String > &&ontology_id)
Setter for member variable OntologyStatement::ontology_id (rvalue reference)
Definition: ast.cpp:12797
void set_value(std::shared_ptr< Number > &&value)
Setter for member variable ParamAssign::value (rvalue reference)
Definition: ast.cpp:8540
ParamAssign(Identifier *name, Number *value, Unit *unit, Limits *limit)
Definition: ast.cpp:8462
std::shared_ptr< ModToken > token
token with location information
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable ParamAssign::name (rvalue reference)
Definition: ast.cpp:8523
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:8453
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ParamAssign::unit (rvalue reference)
Definition: ast.cpp:8557
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:8411
std::shared_ptr< Limits > limit
TODO.
std::shared_ptr< Identifier > name
TODO.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:8500
void set_limit(std::shared_ptr< Limits > &&limit)
Setter for member variable ParamAssign::limit (rvalue reference)
Definition: ast.cpp:8574
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:8398
std::shared_ptr< Number > value
TODO.
std::shared_ptr< Unit > unit
TODO.
Represents a PARAMETER block in the NMODL.
Definition: param_block.hpp:53
ParamBlock(const ParamAssignVector &statements)
Definition: ast.cpp:2423
std::shared_ptr< ModToken > token
token with location information
Definition: param_block.hpp:58
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2446
ParamAssignVector statements
Vector of parameters.
Definition: param_block.hpp:56
void set_statements(ParamAssignVector &&statements)
Setter for member variable ParamBlock::statements (rvalue reference)
Definition: ast.cpp:2458
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2414
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2398
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6433
ParenExpression(Expression *expression)
Definition: ast.cpp:6442
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6421
std::shared_ptr< Expression > expression
TODO.
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ParenExpression::expression (rvalue reference)
Definition: ast.cpp:6479
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6468
Represents POINTER statement in NMODL.
Definition: pointer.hpp:39
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12255
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12207
void reset_pointer_var(PointerVarVector::const_iterator position, PointerVar *n)
Reset member to variables.
Definition: ast.cpp:12187
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12223
void emplace_back_pointer_var(PointerVar *n)
Add member to variables by raw pointer.
Definition: ast.cpp:12122
Pointer(const PointerVarVector &variables)
Definition: ast.cpp:12232
void set_variables(PointerVarVector &&variables)
Setter for member variable Pointer::variables (rvalue reference)
Definition: ast.cpp:12267
PointerVarVector::const_iterator insert_pointer_var(PointerVarVector::const_iterator position, const std::shared_ptr< PointerVar > &n)
Insert member to variables.
Definition: ast.cpp:12179
PointerVarVector variables
Vector of pointer variables.
Definition: pointer.hpp:42
std::shared_ptr< ModToken > token
token with location information
Definition: pointer.hpp:44
PointerVarVector::const_iterator erase_pointer_var(PointerVarVector::const_iterator first)
Erase member to variables.
Definition: ast.cpp:12141
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2056
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2103
PointerVar(Name *name)
Definition: ast.cpp:2077
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2068
std::shared_ptr< Name > name
TODO.
Definition: pointer_var.hpp:41
std::shared_ptr< ModToken > token
token with location information
Definition: pointer_var.hpp:43
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2052
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable PointerVar::name (rvalue reference)
Definition: ast.cpp:2114
Represents a prime variable (for ODE)
Definition: prime_name.hpp:48
void set_value(std::shared_ptr< String > &&value)
Setter for member variable PrimeName::value (rvalue reference)
Definition: ast.cpp:965
void set_order(std::shared_ptr< Integer > &&order)
Setter for member variable PrimeName::order (rvalue reference)
Definition: ast.cpp:982
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:893
std::shared_ptr< String > value
Name of prime variable.
Definition: prime_name.hpp:51
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:950
std::shared_ptr< ModToken > token
token with location information
Definition: prime_name.hpp:55
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:886
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:911
std::shared_ptr< Integer > order
order of ODE
Definition: prime_name.hpp:53
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Unit > unit
Unit if specified.
ProcedureBlock(Name *name, const ArgumentVector &parameters, Unit *unit, StatementBlock *statement_block)
Definition: ast.cpp:4226
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable ProcedureBlock::statement_block (rvalue reference)
Definition: ast.cpp:4339
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4179
std::shared_ptr< Name > name
Name of the procedure.
ArgumentVector parameters
Vector of the parameters.
void set_unit(std::shared_ptr< Unit > &&unit)
Setter for member variable ProcedureBlock::unit (rvalue reference)
Definition: ast.cpp:4322
std::shared_ptr< StatementBlock > statement_block
Block with statements vector.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4264
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:4166
void set_parameters(ArgumentVector &&parameters)
Setter for member variable ProcedureBlock::parameters (rvalue reference)
Definition: ast.cpp:4305
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4217
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ProcedureBlock::name (rvalue reference)
Definition: ast.cpp:4288
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
std::shared_ptr< ModToken > token
token with location information
Definition: program.hpp:44
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12924
NodeVector::const_iterator insert_node(NodeVector::const_iterator position, const std::shared_ptr< Node > &n)
Insert member to blocks.
Definition: ast.cpp:12880
void reset_node(NodeVector::const_iterator position, Node *n)
Reset member to blocks.
Definition: ast.cpp:12888
NodeVector blocks
Vector of top level blocks in the mod file.
Definition: program.hpp:42
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12956
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12908
void emplace_back_node(Node *n)
Add member to blocks by raw pointer.
Definition: ast.cpp:12823
NodeVector::const_iterator erase_node(NodeVector::const_iterator first)
Erase member to blocks.
Definition: ast.cpp:12842
void set_blocks(NodeVector &&blocks)
Setter for member variable Program::blocks (rvalue reference)
Definition: ast.cpp:12968
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9167
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable ProtectStatement::expression (rvalue reference)
Definition: ast.cpp:9178
ProtectStatement(Expression *expression)
Definition: ast.cpp:9141
std::shared_ptr< ModToken > token
token with location information
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9120
std::shared_ptr< Expression > expression
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9132
Single variable of type RANDOM.
Definition: random_var.hpp:38
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2189
RandomVar(Name *name)
Definition: ast.cpp:2163
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2142
std::shared_ptr< ModToken > token
token with location information
Definition: random_var.hpp:43
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2154
std::shared_ptr< Name > name
Name of the a RANDOM variable.
Definition: random_var.hpp:41
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:2138
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable RandomVar::name (rvalue reference)
Definition: ast.cpp:2200
Represents RANDOM statement in NMODL.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12084
void set_variables(RandomVarVector &&variables)
Setter for member variable RandomVarList::variables (rvalue reference)
Definition: ast.cpp:12096
std::shared_ptr< ModToken > token
token with location information
RandomVarVector variables
Vector of random variables.
RandomVarList(const RandomVarVector &variables)
Definition: ast.cpp:12061
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12052
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12036
Represents RANGE variables statement in NMODL.
Definition: range.hpp:39
Range(const RangeVarVector &variables)
Definition: ast.cpp:11804
RangeVarVector variables
Vector of range variables.
Definition: range.hpp:42
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11779
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11795
void set_variables(RangeVarVector &&variables)
Setter for member variable Range::variables (rvalue reference)
Definition: ast.cpp:11839
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11827
std::shared_ptr< ModToken > token
token with location information
Definition: range.hpp:44
std::shared_ptr< ModToken > token
token with location information
Definition: range_var.hpp:43
RangeVar(Name *name)
Definition: ast.cpp:1905
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1931
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1880
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1896
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1884
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable RangeVar::name (rvalue reference)
Definition: ast.cpp:1942
std::shared_ptr< Name > name
TODO.
Definition: range_var.hpp:41
std::shared_ptr< VarName > name
TODO.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1441
void set_value(std::shared_ptr< Integer > &&value)
Setter for member variable ReactVarName::value (rvalue reference)
Definition: ast.cpp:1495
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1480
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1419
ReactVarName(Integer *value, VarName *name)
Definition: ast.cpp:1450
std::shared_ptr< Integer > value
TODO.
void set_name(std::shared_ptr< VarName > &&name)
Setter for member variable ReactVarName::name (rvalue reference)
Definition: ast.cpp:1512
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1415
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6398
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6368
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6362
void set_value(ReactionOp value)
Setter for member variable ReactionOperator::value.
Definition: ast.cpp:6405
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10656
std::shared_ptr< Expression > expression2
TODO.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10705
void set_op(ReactionOperator &&op)
Setter for member variable ReactionStatement::op (rvalue reference)
Definition: ast.cpp:10746
void set_reaction2(std::shared_ptr< Expression > &&reaction2)
Setter for member variable ReactionStatement::reaction2 (rvalue reference)
Definition: ast.cpp:10755
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Expression > reaction2
TODO.
std::shared_ptr< Expression > expression1
TODO.
std::shared_ptr< Expression > reaction1
TODO.
void set_expression2(std::shared_ptr< Expression > &&expression2)
Setter for member variable ReactionStatement::expression2 (rvalue reference)
Definition: ast.cpp:10789
void set_reaction1(std::shared_ptr< Expression > &&reaction1)
Setter for member variable ReactionStatement::reaction1 (rvalue reference)
Definition: ast.cpp:10729
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10612
void set_expression1(std::shared_ptr< Expression > &&expression1)
Setter for member variable ReactionStatement::expression1 (rvalue reference)
Definition: ast.cpp:10772
ReactionStatement(Expression *reaction1, const ReactionOperator &op, Expression *reaction2, Expression *expression1, Expression *expression2)
Definition: ast.cpp:10665
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1552
std::shared_ptr< ModToken > token
token with location information
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable ReadIonVar::name (rvalue reference)
Definition: ast.cpp:1598
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1587
ReadIonVar(Name *name)
Definition: ast.cpp:1561
std::shared_ptr< Name > name
TODO.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1536
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1540
Represent solution of a block in the AST.
void set_solve_block(std::shared_ptr< SolveBlock > &&solve_block)
Setter for member variable SolutionExpression::solve_block (rvalue reference)
Definition: ast.cpp:14364
std::shared_ptr< Expression > node_to_solve
Block to be solved (callback node or solution node itself)
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:14381
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14292
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14349
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14310
std::shared_ptr< SolveBlock > solve_block
SolutionExpression(SolveBlock *solve_block, Expression *node_to_solve)
Definition: ast.cpp:14319
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:4526
void set_block_name(std::shared_ptr< Name > &&block_name)
Setter for member variable SolveBlock::block_name (rvalue reference)
Definition: ast.cpp:4588
std::shared_ptr< Name > block_name
Name of the block to solve.
Definition: solve_block.hpp:41
std::shared_ptr< Name > method
Name of the integration method.
Definition: solve_block.hpp:43
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:4494
void set_method(std::shared_ptr< Name > &&method)
Setter for member variable SolveBlock::method (rvalue reference)
Definition: ast.cpp:4605
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:4569
SolveBlock(Name *block_name, Name *method, Name *steadystate)
Definition: ast.cpp:4535
std::shared_ptr< ModToken > token
token with location information
Definition: solve_block.hpp:47
void set_steadystate(std::shared_ptr< Name > &&steadystate)
Setter for member variable SolveBlock::steadystate (rvalue reference)
Definition: ast.cpp:4622
std::shared_ptr< Name > steadystate
Name of the integration method.
Definition: solve_block.hpp:45
Represents a STATE block in the NMODL.
Definition: state_block.hpp:52
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:2789
StateBlock(const AssignedDefinitionVector &definitions)
Definition: ast.cpp:2766
void set_definitions(AssignedDefinitionVector &&definitions)
Setter for member variable StateBlock::definitions (rvalue reference)
Definition: ast.cpp:2801
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:2757
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:2741
std::shared_ptr< ModToken > token
token with location information
Definition: state_block.hpp:57
AssignedDefinitionVector definitions
Vector of state variables.
Definition: state_block.hpp:55
Represents block encapsulating list of statements.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:3212
void reset_statement(StatementVector::const_iterator position, Statement *n)
Reset member to statements.
Definition: ast.cpp:3144
void set_statements(StatementVector &&statements)
Setter for member variable StatementBlock::statements (rvalue reference)
Definition: ast.cpp:3224
StatementBlock(const StatementVector &statements)
Definition: ast.cpp:3189
std::shared_ptr< ModToken > token
token with location information
void emplace_back_statement(Statement *n)
Add member to statements by raw pointer.
Definition: ast.cpp:3079
StatementVector statements
Vector of statements.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3164
StatementVector::const_iterator insert_statement(StatementVector::const_iterator position, const std::shared_ptr< Statement > &n)
Insert member to statements.
Definition: ast.cpp:3136
StatementVector::const_iterator erase_statement(StatementVector::const_iterator first)
Erase member to statements.
Definition: ast.cpp:3098
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:3180
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:350
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:356
Represents a string.
Definition: string.hpp:52
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:463
void set_value(std::string value)
Setter for member variable String::value.
Definition: ast.cpp:506
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:469
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:499
std::string value
Value of string.
Definition: string.hpp:55
std::shared_ptr< ModToken > token
token with location information
Definition: string.hpp:57
Represents SUFFIX statement in NMODL.
Definition: suffix.hpp:38
void set_type(std::shared_ptr< Name > &&type)
Setter for member variable Suffix::type (rvalue reference)
Definition: ast.cpp:11324
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Suffix::name (rvalue reference)
Definition: ast.cpp:11341
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11252
std::shared_ptr< ModToken > token
token with location information
Definition: suffix.hpp:45
Suffix(Name *type, Name *name)
Definition: ast.cpp:11279
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11270
std::shared_ptr< Name > type
type of channel
Definition: suffix.hpp:41
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11309
std::shared_ptr< Name > name
Name of the channel.
Definition: suffix.hpp:43
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:11248
Represents TABLE statement in NMODL.
TableStatement(const NameVector &table_vars, const NameVector &depend_vars, Expression *from, Expression *to, Integer *with)
Definition: ast.cpp:11082
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11073
std::shared_ptr< Integer > with
an increment factor
void set_with(std::shared_ptr< Integer > &&with)
Setter for member variable TableStatement::with (rvalue reference)
Definition: ast.cpp:11221
NameVector depend_vars
dependent variables
std::shared_ptr< Expression > to
to values
void set_depend_vars(NameVector &&depend_vars)
Setter for member variable TableStatement::depend_vars (rvalue reference)
Definition: ast.cpp:11170
void set_to(std::shared_ptr< Expression > &&to)
Setter for member variable TableStatement::to (rvalue reference)
Definition: ast.cpp:11204
NameVector table_vars
Variables in the table.
std::shared_ptr< Expression > from
from value
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11029
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11124
void set_from(std::shared_ptr< Expression > &&from)
Setter for member variable TableStatement::from (rvalue reference)
Definition: ast.cpp:11187
void set_table_vars(NameVector &&table_vars)
Setter for member variable TableStatement::table_vars (rvalue reference)
Definition: ast.cpp:11153
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12462
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12468
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable UnaryExpression::expression (rvalue reference)
Definition: ast.cpp:6807
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6731
std::shared_ptr< Expression > expression
TODO.
UnaryExpression(const UnaryOperator &op, Expression *expression)
Definition: ast.cpp:6758
void set_op(UnaryOperator &&op)
Setter for member variable UnaryExpression::op (rvalue reference)
Definition: ast.cpp:6798
std::shared_ptr< ModToken > token
token with location information
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6786
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6749
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:6309
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:6303
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:6339
void set_value(UnaryOp value)
Setter for member variable UnaryOperator::value.
Definition: ast.cpp:6346
std::shared_ptr< ModToken > token
token with location information
ExpressionVector definitions
Vector of unit statements.
Definition: unit_block.hpp:42
std::shared_ptr< ModToken > token
token with location information
Definition: unit_block.hpp:44
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5316
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5300
void set_definitions(ExpressionVector &&definitions)
Setter for member variable UnitBlock::definitions (rvalue reference)
Definition: ast.cpp:5360
UnitBlock(const ExpressionVector &definitions)
Definition: ast.cpp:5325
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5348
std::shared_ptr< Unit > unit1
TODO.
Definition: unit_def.hpp:41
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7376
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7394
UnitDef(Unit *unit1, Unit *unit2)
Definition: ast.cpp:7403
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7433
void set_unit2(std::shared_ptr< Unit > &&unit2)
Setter for member variable UnitDef::unit2 (rvalue reference)
Definition: ast.cpp:7465
std::shared_ptr< Unit > unit2
TODO.
Definition: unit_def.hpp:43
void set_unit1(std::shared_ptr< Unit > &&unit1)
Setter for member variable UnitDef::unit1 (rvalue reference)
Definition: ast.cpp:7448
std::shared_ptr< ModToken > token
token with location information
Definition: unit_def.hpp:45
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7369
std::shared_ptr< ModToken > token
token with location information
Definition: unit.hpp:43
Unit(String *name)
Definition: ast.cpp:5579
void set_name(std::shared_ptr< String > &&name)
Setter for member variable Unit::name (rvalue reference)
Definition: ast.cpp:5616
std::shared_ptr< String > name
TODO.
Definition: unit.hpp:41
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:5605
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:5554
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:5558
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:5570
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7843
std::shared_ptr< ModToken > token
token with location information
Definition: unit_state.hpp:43
void set_value(UnitStateType value)
Setter for member variable UnitState::value.
Definition: ast.cpp:7886
UnitState(UnitStateType value)
Definition: ast.cpp:7858
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7849
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7879
UnitStateType value
TODO.
Definition: unit_state.hpp:41
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14407
std::shared_ptr< ModToken > token
token with location information
Definition: update_dt.hpp:43
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14454
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14419
std::shared_ptr< Double > value
Value of new timestep.
Definition: update_dt.hpp:41
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable UpdateDt::value (rvalue reference)
Definition: ast.cpp:14465
UpdateDt(Double *value)
Definition: ast.cpp:14428
Represents USEION statement in NMODL.
Definition: useion.hpp:40
void set_valence(std::shared_ptr< Valence > &&valence)
Setter for member variable Useion::valence (rvalue reference)
Definition: ast.cpp:11564
std::shared_ptr< Valence > valence
(TODO)
Definition: useion.hpp:49
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:11484
void set_writelist(WriteIonVarVector &&writelist)
Setter for member variable Useion::writelist (rvalue reference)
Definition: ast.cpp:11547
void set_ontology_id(std::shared_ptr< String > &&ontology_id)
Setter for member variable Useion::ontology_id (rvalue reference)
Definition: ast.cpp:11581
Useion(Name *name, const ReadIonVarVector &readlist, const WriteIonVarVector &writelist, Valence *valence, String *ontology_id)
Definition: ast.cpp:11442
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable Useion::name (rvalue reference)
Definition: ast.cpp:11513
WriteIonVarVector writelist
Variables being written.
Definition: useion.hpp:47
std::shared_ptr< String > ontology_id
Ontology to indicate the chemical ion.
Definition: useion.hpp:51
std::shared_ptr< Name > name
Name of ion.
Definition: useion.hpp:43
ReadIonVarVector readlist
Variables being read.
Definition: useion.hpp:45
void set_readlist(ReadIonVarVector &&readlist)
Setter for member variable Useion::readlist (rvalue reference)
Definition: ast.cpp:11530
std::shared_ptr< ModToken > token
token with location information
Definition: useion.hpp:53
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:11365
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:11433
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:11381
void set_value(std::shared_ptr< Double > &&value)
Setter for member variable Valence::value (rvalue reference)
Definition: ast.cpp:7817
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7746
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7785
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7728
std::shared_ptr< Double > value
TODO.
Definition: valence.hpp:43
void set_type(std::shared_ptr< Name > &&type)
Setter for member variable Valence::type (rvalue reference)
Definition: ast.cpp:7800
Valence(Name *type, Double *value)
Definition: ast.cpp:7755
std::shared_ptr< Name > type
TODO.
Definition: valence.hpp:41
std::shared_ptr< ModToken > token
token with location information
Definition: valence.hpp:45
Represents a variable.
Definition: var_name.hpp:43
void set_name(std::shared_ptr< Identifier > &&name)
Setter for member variable VarName::name (rvalue reference)
Definition: ast.cpp:1230
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1168
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1136
VarName(Identifier *name, Integer *at, Expression *index)
Definition: ast.cpp:1177
std::shared_ptr< ModToken > token
token with location information
Definition: var_name.hpp:52
std::shared_ptr< Expression > index
index value in case of array
Definition: var_name.hpp:50
void set_index(std::shared_ptr< Expression > &&index)
Setter for member variable VarName::index (rvalue reference)
Definition: ast.cpp:1264
std::shared_ptr< Identifier > name
Name of variable.
Definition: var_name.hpp:46
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1211
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1126
void set_at(std::shared_ptr< Integer > &&at)
Setter for member variable VarName::at (rvalue reference)
Definition: ast.cpp:1247
std::shared_ptr< Integer > at
Value specified with @
Definition: var_name.hpp:48
Represents a C code block.
Definition: verbatim.hpp:38
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12487
void set_statement(std::shared_ptr< String > &&statement)
Setter for member variable Verbatim::statement (rvalue reference)
Definition: ast.cpp:12545
std::shared_ptr< ModToken > token
token with location information
Definition: verbatim.hpp:43
std::shared_ptr< String > statement
C code as a string.
Definition: verbatim.hpp:41
Verbatim(String *statement)
Definition: ast.cpp:12508
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:12534
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:12499
Watch(Expression *expression, Expression *value)
Definition: ast.cpp:7224
std::shared_ptr< ModToken > token
token with location information
Definition: watch.hpp:45
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable Watch::expression (rvalue reference)
Definition: ast.cpp:7269
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:7254
std::shared_ptr< Expression > value
TODO.
Definition: watch.hpp:43
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:7197
std::shared_ptr< Expression > expression
TODO.
Definition: watch.hpp:41
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:7215
void set_value(std::shared_ptr< Expression > &&value)
Setter for member variable Watch::value (rvalue reference)
Definition: ast.cpp:7286
Represent WATCH statement in NMODL.
WatchVector::const_iterator erase_watch(WatchVector::const_iterator first)
Erase member to statements.
Definition: ast.cpp:9964
std::shared_ptr< ModToken > token
token with location information
void reset_watch(WatchVector::const_iterator position, Watch *n)
Reset member to statements.
Definition: ast.cpp:10010
void emplace_back_watch(Watch *n)
Add member to statements by raw pointer.
Definition: ast.cpp:9945
WatchVector statements
Vector of watch statements.
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:10046
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:10030
WatchStatement(const WatchVector &statements)
Definition: ast.cpp:10055
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:10078
WatchVector::const_iterator insert_watch(WatchVector::const_iterator position, const std::shared_ptr< Watch > &n)
Insert member to statements.
Definition: ast.cpp:10002
void set_statements(WatchVector &&statements)
Setter for member variable WatchStatement::statements (rvalue reference)
Definition: ast.cpp:10090
std::shared_ptr< Expression > condition
TODO.
void set_condition(std::shared_ptr< Expression > &&condition)
Setter for member variable WhileStatement::condition (rvalue reference)
Definition: ast.cpp:9505
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:9490
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< StatementBlock > statement_block
TODO.
void set_statement_block(std::shared_ptr< StatementBlock > &&statement_block)
Setter for member variable WhileStatement::statement_block (rvalue reference)
Definition: ast.cpp:9522
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9433
WhileStatement(Expression *condition, StatementBlock *statement_block)
Definition: ast.cpp:9460
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:9451
Wrap any other expression type.
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:14168
void set_expression(std::shared_ptr< Expression > &&expression)
Setter for member variable WrappedExpression::expression (rvalue reference)
Definition: ast.cpp:14179
std::shared_ptr< Expression > expression
Expression that is being wrapped.
std::shared_ptr< ModToken > token
token with location information
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:14133
WrappedExpression(Expression *expression)
Definition: ast.cpp:14142
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:14121
WriteIonVar(Name *name)
Definition: ast.cpp:1647
void set_parent_in_children()
Set this object as parent for all the children.
Definition: ast.cpp:1673
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1638
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:1622
void set_name(std::shared_ptr< Name > &&name)
Setter for member variable WriteIonVar::name (rvalue reference)
Definition: ast.cpp:1684
std::shared_ptr< ModToken > token
token with location information
std::shared_ptr< Name > name
TODO.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1626
Represent symbol table for a NMODL block.
Abstract base class for all constant visitors implementation.
Definition: visitor.hpp:304
Abstract base class for all visitors implementation.
Definition: visitor.hpp:39
#define v
Definition: md1redef.h:11
static double order(void *v)
Definition: cvodeobj.cpp:218
static double abstol(void *v)
Definition: cvodeobj.cpp:165
virtual bool is_while_statement() const noexcept
Check if the ast node is an instance of ast::WhileStatement.
Definition: ast.cpp:232
virtual bool is_constant_var() const noexcept
Check if the ast node is an instance of ast::ConstantVar.
Definition: ast.cpp:178
virtual bool is_for_netcon() const noexcept
Check if the ast node is an instance of ast::ForNetcon.
Definition: ast.cpp:158
virtual bool is_watch() const noexcept
Check if the ast node is an instance of ast::Watch.
Definition: ast.cpp:200
virtual bool is_wrapped_expression() const noexcept
Check if the ast node is an instance of ast::WrappedExpression.
Definition: ast.cpp:304
virtual bool is_function_block() const noexcept
Check if the ast node is an instance of ast::FunctionBlock.
Definition: ast.cpp:142
virtual bool is_electrode_cur_var() const noexcept
Check if the ast node is an instance of ast::ElectrodeCurVar.
Definition: ast.cpp:102
virtual bool is_external() const noexcept
Check if the ast node is an instance of ast::External.
Definition: ast.cpp:278
virtual bool is_table_statement() const noexcept
Check if the ast node is an instance of ast::TableStatement.
Definition: ast.cpp:258
virtual bool is_nonspecific() const noexcept
Check if the ast node is an instance of ast::Nonspecific.
Definition: ast.cpp:264
virtual bool is_update_dt() const noexcept
Check if the ast node is an instance of ast::UpdateDt.
Definition: ast.cpp:310
virtual bool is_number() const noexcept
Check if the ast node is an instance of ast::Number.
Definition: ast.cpp:72
virtual bool is_param_block() const noexcept
Check if the ast node is an instance of ast::ParamBlock.
Definition: ast.cpp:116
virtual bool is_lin_equation() const noexcept
Check if the ast node is an instance of ast::LinEquation.
Definition: ast.cpp:196
virtual bool is_random_var_list() const noexcept
Check if the ast node is an instance of ast::RandomVarList.
Definition: ast.cpp:272
virtual bool is_useion() const noexcept
Check if the ast node is an instance of ast::Useion.
Definition: ast.cpp:262
virtual bool is_after_block() const noexcept
Check if the ast node is an instance of ast::AfterBlock.
Definition: ast.cpp:154
virtual bool is_verbatim() const noexcept
Check if the ast node is an instance of ast::Verbatim.
Definition: ast.cpp:282
virtual bool is_conductance_hint() const noexcept
Check if the ast node is an instance of ast::ConductanceHint.
Definition: ast.cpp:224
virtual bool is_constant_statement() const noexcept
Check if the ast node is an instance of ast::ConstantStatement.
Definition: ast.cpp:256
virtual bool is_solution_expression() const noexcept
Check if the ast node is an instance of ast::SolutionExpression.
Definition: ast.cpp:308
virtual bool is_string() const noexcept
Check if the ast node is an instance of ast::String.
Definition: ast.cpp:74
virtual bool is_global_var() const noexcept
Check if the ast node is an instance of ast::GlobalVar.
Definition: ast.cpp:106
virtual bool is_mutex_lock() const noexcept
Check if the ast node is an instance of ast::MutexLock.
Definition: ast.cpp:242
virtual bool is_react_var_name() const noexcept
Check if the ast node is an instance of ast::ReactVarName.
Definition: ast.cpp:94
virtual bool is_unary_expression() const noexcept
Check if the ast node is an instance of ast::UnaryExpression.
Definition: ast.cpp:192
virtual bool is_ontology_statement() const noexcept
Check if the ast node is an instance of ast::OntologyStatement.
Definition: ast.cpp:288
virtual bool is_expression_statement() const noexcept
Check if the ast node is an instance of ast::ExpressionStatement.
Definition: ast.cpp:226
virtual bool is_indexed_name() const noexcept
Check if the ast node is an instance of ast::IndexedName.
Definition: ast.cpp:88
virtual bool is_else_statement() const noexcept
Check if the ast node is an instance of ast::ElseStatement.
Definition: ast.cpp:238
virtual bool is_function_table_block() const noexcept
Check if the ast node is an instance of ast::FunctionTableBlock.
Definition: ast.cpp:140
virtual bool is_discrete_block() const noexcept
Check if the ast node is an instance of ast::DiscreteBlock.
Definition: ast.cpp:138
virtual bool is_range_var() const noexcept
Check if the ast node is an instance of ast::RangeVar.
Definition: ast.cpp:104
virtual bool is_integer() const noexcept
Check if the ast node is an instance of ast::Integer.
Definition: ast.cpp:76
virtual bool is_matexp_block() const noexcept
Check if the ast node is an instance of ast::MatexpBlock.
Definition: ast.cpp:298
virtual bool is_ast() const noexcept
Check if the ast node is an instance of ast::Ast.
Definition: ast.cpp:60
virtual const ModToken * get_token() const
Return associated token for the AST node.
Definition: ast.cpp:36
virtual bool is_derivimplicit_callback() const noexcept
Check if the ast node is an instance of ast::DerivimplicitCallback.
Definition: ast.cpp:306
virtual bool is_random_var() const noexcept
Check if the ast node is an instance of ast::RandomVar.
Definition: ast.cpp:110
virtual bool is_unary_operator() const noexcept
Check if the ast node is an instance of ast::UnaryOperator.
Definition: ast.cpp:182
virtual bool is_name() const noexcept
Check if the ast node is an instance of ast::Name.
Definition: ast.cpp:84
virtual bool is_var_name() const noexcept
Check if the ast node is an instance of ast::VarName.
Definition: ast.cpp:90
virtual bool is_pointer_var() const noexcept
Check if the ast node is an instance of ast::PointerVar.
Definition: ast.cpp:108
virtual bool is_derivative_block() const noexcept
Check if the ast node is an instance of ast::DerivativeBlock.
Definition: ast.cpp:132
virtual Ast * clone() const
Create a copy of the current node.
Definition: ast.cpp:26
virtual bool is_independent_block() const noexcept
Check if the ast node is an instance of ast::IndependentBlock.
Definition: ast.cpp:118
virtual bool is_watch_statement() const noexcept
Check if the ast node is an instance of ast::WatchStatement.
Definition: ast.cpp:240
virtual bool is_protect_statement() const noexcept
Check if the ast node is an instance of ast::ProtectStatement.
Definition: ast.cpp:228
virtual bool is_range() const noexcept
Check if the ast node is an instance of ast::Range.
Definition: ast.cpp:268
virtual symtab::SymbolTable * get_symbol_table() const
Return associated symbol table for the AST node.
Definition: ast.cpp:38
virtual std::shared_ptr< StatementBlock > get_statement_block() const
Return associated statement block for the AST node.
Definition: ast.cpp:32
virtual bool is_extern_var() const noexcept
Check if the ast node is an instance of ast::ExternVar.
Definition: ast.cpp:114
virtual bool is_block_comment() const noexcept
Check if the ast node is an instance of ast::BlockComment.
Definition: ast.cpp:286
virtual bool is_nrn_state_block() const noexcept
Check if the ast node is an instance of ast::NrnStateBlock.
Definition: ast.cpp:292
virtual void set_symbol_table(symtab::SymbolTable *symtab)
Set symbol table for the AST node.
Definition: ast.cpp:42
virtual bool is_eigen_linear_solver_block() const noexcept
Check if the ast node is an instance of ast::EigenLinearSolverBlock.
Definition: ast.cpp:296
virtual bool is_suffix() const noexcept
Check if the ast node is an instance of ast::Suffix.
Definition: ast.cpp:260
virtual bool is_paren_expression() const noexcept
Check if the ast node is an instance of ast::ParenExpression.
Definition: ast.cpp:186
virtual bool is_local_list_statement() const noexcept
Check if the ast node is an instance of ast::LocalListStatement.
Definition: ast.cpp:212
virtual bool is_solve_block() const noexcept
Check if the ast node is an instance of ast::SolveBlock.
Definition: ast.cpp:148
virtual bool is_statement_block() const noexcept
Check if the ast node is an instance of ast::StatementBlock.
Definition: ast.cpp:130
virtual bool is_net_receive_block() const noexcept
Check if the ast node is an instance of ast::NetReceiveBlock.
Definition: ast.cpp:146
virtual bool is_pointer() const noexcept
Check if the ast node is an instance of ast::Pointer.
Definition: ast.cpp:274
virtual bool is_state_block() const noexcept
Check if the ast node is an instance of ast::StateBlock.
Definition: ast.cpp:122
virtual bool is_write_ion_var() const noexcept
Check if the ast node is an instance of ast::WriteIonVar.
Definition: ast.cpp:98
virtual void negate()
Negate the value of AST node.
Definition: ast.cpp:50
virtual Ast * get_parent() const
Parent getter.
Definition: ast.cpp:313
virtual bool is_bbcore_pointer_var() const noexcept
Check if the ast node is an instance of ast::BbcorePointerVar.
Definition: ast.cpp:112
virtual bool is_nonspecific_cur_var() const noexcept
Check if the ast node is an instance of ast::NonspecificCurVar.
Definition: ast.cpp:100
virtual bool is_initial_block() const noexcept
Check if the ast node is an instance of ast::InitialBlock.
Definition: ast.cpp:124
virtual bool is_diff_eq_expression() const noexcept
Check if the ast node is an instance of ast::DiffEqExpression.
Definition: ast.cpp:190
virtual bool is_reaction_operator() const noexcept
Check if the ast node is an instance of ast::ReactionOperator.
Definition: ast.cpp:184
virtual bool is_longitudinal_diffusion_block() const noexcept
Check if the ast node is an instance of ast::LongitudinalDiffusionBlock.
Definition: ast.cpp:302
virtual bool is_double_unit() const noexcept
Check if the ast node is an instance of ast::DoubleUnit.
Definition: ast.cpp:170
virtual bool is_conserve() const noexcept
Check if the ast node is an instance of ast::Conserve.
Definition: ast.cpp:246
virtual bool is_cvode_block() const noexcept
Check if the ast node is an instance of ast::CvodeBlock.
Definition: ast.cpp:300
virtual bool is_lon_diffuse() const noexcept
Check if the ast node is an instance of ast::LonDiffuse.
Definition: ast.cpp:250
virtual bool is_node() const noexcept
Check if the ast node is an instance of ast::Node.
Definition: ast.cpp:62
virtual bool is_limits() const noexcept
Check if the ast node is an instance of ast::Limits.
Definition: ast.cpp:174
virtual bool is_if_statement() const noexcept
Check if the ast node is an instance of ast::IfStatement.
Definition: ast.cpp:234
virtual bool is_param_assign() const noexcept
Check if the ast node is an instance of ast::ParamAssign.
Definition: ast.cpp:220
virtual bool is_unit_block() const noexcept
Check if the ast node is an instance of ast::UnitBlock.
Definition: ast.cpp:162
virtual bool is_argument() const noexcept
Check if the ast node is an instance of ast::Argument.
Definition: ast.cpp:92
virtual bool is_expression() const noexcept
Check if the ast node is an instance of ast::Expression.
Definition: ast.cpp:66
virtual bool is_line_comment() const noexcept
Check if the ast node is an instance of ast::LineComment.
Definition: ast.cpp:284
virtual bool is_statement() const noexcept
Check if the ast node is an instance of ast::Statement.
Definition: ast.cpp:64
virtual bool is_binary_operator() const noexcept
Check if the ast node is an instance of ast::BinaryOperator.
Definition: ast.cpp:180
virtual bool is_function_call() const noexcept
Check if the ast node is an instance of ast::FunctionCall.
Definition: ast.cpp:198
virtual bool is_lag_statement() const noexcept
Check if the ast node is an instance of ast::LagStatement.
Definition: ast.cpp:254
virtual bool is_non_lin_equation() const noexcept
Check if the ast node is an instance of ast::NonLinEquation.
Definition: ast.cpp:194
virtual bool is_identifier() const noexcept
Check if the ast node is an instance of ast::Identifier.
Definition: ast.cpp:70
virtual bool is_define() const noexcept
Check if the ast node is an instance of ast::Define.
Definition: ast.cpp:216
virtual bool is_non_linear_block() const noexcept
Check if the ast node is an instance of ast::NonLinearBlock.
Definition: ast.cpp:136
virtual bool is_unit_state() const noexcept
Check if the ast node is an instance of ast::UnitState.
Definition: ast.cpp:210
virtual bool is_constant_block() const noexcept
Check if the ast node is an instance of ast::ConstantBlock.
Definition: ast.cpp:164
virtual bool is_unit_def() const noexcept
Check if the ast node is an instance of ast::UnitDef.
Definition: ast.cpp:204
virtual bool is_boolean() const noexcept
Check if the ast node is an instance of ast::Boolean.
Definition: ast.cpp:82
virtual std::string get_node_name() const
Return name of of the node.
Definition: ast.cpp:28
virtual bool is_neuron_block() const noexcept
Check if the ast node is an instance of ast::NeuronBlock.
Definition: ast.cpp:166
Ast * parent
Generic pointer to the parent.
Definition: ast.hpp:75
virtual bool is_block() const noexcept
Check if the ast node is an instance of ast::Block.
Definition: ast.cpp:68
virtual bool is_else_if_statement() const noexcept
Check if the ast node is an instance of ast::ElseIfStatement.
Definition: ast.cpp:236
virtual bool is_global() const noexcept
Check if the ast node is an instance of ast::Global.
Definition: ast.cpp:270
virtual bool is_reaction_statement() const noexcept
Check if the ast node is an instance of ast::ReactionStatement.
Definition: ast.cpp:252
virtual bool is_program() const noexcept
Check if the ast node is an instance of ast::Program.
Definition: ast.cpp:290
virtual std::shared_ptr< Ast > get_shared_ptr()
get std::shared_ptr from this pointer of the AST node
Definition: ast.cpp:52
virtual bool is_procedure_block() const noexcept
Check if the ast node is an instance of ast::ProcedureBlock.
Definition: ast.cpp:144
virtual bool is_ba_block() const noexcept
Check if the ast node is an instance of ast::BABlock.
Definition: ast.cpp:156
virtual bool is_ba_block_type() const noexcept
Check if the ast node is an instance of ast::BABlockType.
Definition: ast.cpp:202
virtual void set_name(const std::string &name)
Set name for the AST node.
Definition: ast.cpp:46
virtual bool is_destructor_block() const noexcept
Check if the ast node is an instance of ast::DestructorBlock.
Definition: ast.cpp:128
virtual bool is_eigen_newton_solver_block() const noexcept
Check if the ast node is an instance of ast::EigenNewtonSolverBlock.
Definition: ast.cpp:294
virtual bool is_local_var() const noexcept
Check if the ast node is an instance of ast::LocalVar.
Definition: ast.cpp:172
virtual bool is_include() const noexcept
Check if the ast node is an instance of ast::Include.
Definition: ast.cpp:218
virtual bool is_breakpoint_block() const noexcept
Check if the ast node is an instance of ast::BreakpointBlock.
Definition: ast.cpp:150
virtual bool is_kinetic_block() const noexcept
Check if the ast node is an instance of ast::KineticBlock.
Definition: ast.cpp:160
virtual bool is_assigned_block() const noexcept
Check if the ast node is an instance of ast::AssignedBlock.
Definition: ast.cpp:120
virtual bool is_before_block() const noexcept
Check if the ast node is an instance of ast::BeforeBlock.
Definition: ast.cpp:152
virtual bool is_constructor_block() const noexcept
Check if the ast node is an instance of ast::ConstructorBlock.
Definition: ast.cpp:126
virtual void set_parent(Ast *p)
Parent setter.
Definition: ast.cpp:317
virtual bool is_number_range() const noexcept
Check if the ast node is an instance of ast::NumberRange.
Definition: ast.cpp:176
virtual bool is_from_statement() const noexcept
Check if the ast node is an instance of ast::FromStatement.
Definition: ast.cpp:230
virtual bool is_prime_name() const noexcept
Check if the ast node is an instance of ast::PrimeName.
Definition: ast.cpp:86
virtual bool is_model() const noexcept
Check if the ast node is an instance of ast::Model.
Definition: ast.cpp:214
virtual bool is_linear_block() const noexcept
Check if the ast node is an instance of ast::LinearBlock.
Definition: ast.cpp:134
virtual bool is_valence() const noexcept
Check if the ast node is an instance of ast::Valence.
Definition: ast.cpp:208
virtual bool is_float() const noexcept
Check if the ast node is an instance of ast::Float.
Definition: ast.cpp:78
virtual bool is_double() const noexcept
Check if the ast node is an instance of ast::Double.
Definition: ast.cpp:80
virtual bool is_unit() const noexcept
Check if the ast node is an instance of ast::Unit.
Definition: ast.cpp:168
virtual bool is_electrode_current() const noexcept
Check if the ast node is an instance of ast::ElectrodeCurrent.
Definition: ast.cpp:266
virtual bool is_read_ion_var() const noexcept
Check if the ast node is an instance of ast::ReadIonVar.
Definition: ast.cpp:96
virtual bool is_thread_safe() const noexcept
Check if the ast node is an instance of ast::ThreadSafe.
Definition: ast.cpp:280
virtual bool is_compartment() const noexcept
Check if the ast node is an instance of ast::Compartment.
Definition: ast.cpp:248
virtual bool is_mutex_unlock() const noexcept
Check if the ast node is an instance of ast::MutexUnlock.
Definition: ast.cpp:244
virtual bool is_factor_def() const noexcept
Check if the ast node is an instance of ast::FactorDef.
Definition: ast.cpp:206
virtual bool is_bbcore_pointer() const noexcept
Check if the ast node is an instance of ast::BbcorePointer.
Definition: ast.cpp:276
virtual bool is_assigned_definition() const noexcept
Check if the ast node is an instance of ast::AssignedDefinition.
Definition: ast.cpp:222
virtual bool is_binary_expression() const noexcept
Check if the ast node is an instance of ast::BinaryExpression.
Definition: ast.cpp:188
BinaryOp
enum Type for binary operators in NMODL
Definition: ast_common.hpp:47
ReactionOp
enum type used for Reaction statement
Definition: ast_common.hpp:92
UnitStateType
enum type used for UNIT_ON or UNIT_OFF state
Definition: ast_common.hpp:86
BAType
enum type to distinguish BEFORE or AFTER blocks
Definition: ast_common.hpp:80
UnaryOp
enum type for unary operators
Definition: ast_common.hpp:74
std::vector< std::shared_ptr< ElseIfStatement > > ElseIfStatementVector
Definition: ast_decl.hpp:390
std::vector< std::shared_ptr< Statement > > StatementVector
Definition: ast_decl.hpp:304
std::vector< std::shared_ptr< Argument > > ArgumentVector
Definition: ast_decl.hpp:318
std::vector< std::shared_ptr< RangeVar > > RangeVarVector
Definition: ast_decl.hpp:324
std::vector< std::shared_ptr< NonspecificCurVar > > NonspecificCurVarVector
Definition: ast_decl.hpp:322
std::vector< std::shared_ptr< WriteIonVar > > WriteIonVarVector
Definition: ast_decl.hpp:321
std::vector< std::shared_ptr< LocalVar > > LocalVarVector
Definition: ast_decl.hpp:358
std::vector< std::shared_ptr< BbcorePointerVar > > BbcorePointerVarVector
Definition: ast_decl.hpp:328
std::vector< std::shared_ptr< AssignedDefinition > > AssignedDefinitionVector
Definition: ast_decl.hpp:383
std::vector< std::shared_ptr< Name > > NameVector
Definition: ast_decl.hpp:314
std::vector< std::shared_ptr< RandomVar > > RandomVarVector
Definition: ast_decl.hpp:327
std::vector< std::shared_ptr< Watch > > WatchVector
Definition: ast_decl.hpp:372
std::vector< std::shared_ptr< Conserve > > ConserveVector
Definition: ast_decl.hpp:395
std::vector< std::shared_ptr< ExternVar > > ExternVarVector
Definition: ast_decl.hpp:329
std::vector< std::shared_ptr< ReadIonVar > > ReadIonVarVector
Definition: ast_decl.hpp:320
std::vector< std::shared_ptr< Node > > NodeVector
Definition: ast_decl.hpp:303
std::vector< std::shared_ptr< GlobalVar > > GlobalVarVector
Definition: ast_decl.hpp:325
std::vector< std::shared_ptr< ConstantStatement > > ConstantStatementVector
Definition: ast_decl.hpp:400
std::vector< std::shared_ptr< PointerVar > > PointerVarVector
Definition: ast_decl.hpp:326
std::vector< std::shared_ptr< Expression > > ExpressionVector
Definition: ast_decl.hpp:305
std::vector< std::shared_ptr< ElectrodeCurVar > > ElectrodeCurVarVector
Definition: ast_decl.hpp:323
std::vector< std::shared_ptr< ParamAssign > > ParamAssignVector
Definition: ast_decl.hpp:382
#define rhs
Definition: lineq.h:6
Item * title
Definition: model.cpp:40
const char * name
Definition: init.cpp:16
int ii
Definition: cellorder.cpp:631
Abstract Syntax Tree (AST) related implementations.
Definition: ast_common.hpp:29
List * currents
Definition: nocpout.cpp:124
int const size_t const size_t n
Definition: nrngsl.h:10
size_t p
short index
Definition: cabvars.h:11
short type
Definition: cabvars.h:10
static uint32_t value
Definition: scoprand.cpp:25
Base class for all Abstract Syntax Tree node types.
Definition: ast.hpp:52
Definition: units.h:2
Implement classes for representing symbol table at block and file scope.