« lib/App/SeismicUnixGui/big_streams/pre_built_big_stream.pm
↑ Summary
lib/App/SeismicUnixGui/big_streams/iPick.pm »
| 1 | package App::SeismicUnixGui::misc::param_flow_neutral; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | =head2 SYNOPSIS | ||
| 6 | |||
| 7 | Perl package: param_flow_neutral.pm | ||
| 8 | AUTHOR: Juan Lorenzo | ||
| 9 | DATE: Aug 3 2017 | ||
| 10 | |||
| 11 | DESCRIPTION: | ||
| 12 | V 0.0.1 Aug 3 2017 | ||
| 13 | V 0.0.2 July 23 2018 | ||
| 14 | V 0.0.3 Oct 10 2018 allows numeric values = 0 | ||
| 15 | |||
| 16 | USED FOR: | ||
| 17 | |||
| 18 | BASED ON: | ||
| 19 | param_flow_neutral.pm | ||
| 20 | |||
| 21 | =cut | ||
| 22 | |||
| 23 | use Moose; | ||
| 24 | our $VERSION = '0.0.3'; | ||
| 25 | use Clone 'clone'; | ||
| 26 | |||
| 27 | =pod | ||
| 28 | |||
| 29 | private hash_ref | ||
| 30 | w for widgets | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | # arrays of arrays | ||
| 35 | my @program_names; | ||
| 36 | my @num_good_values; | ||
| 37 | my @num_good_labels; | ||
| 38 | my @good_labels; | ||
| 39 | my @good_values; | ||
| 40 | |||
| 41 | my @names; | ||
| 42 | my @values; | ||
| 43 | my @checkbuttons; | ||
| 44 | |||
| 45 | # 32 | ||
| 46 | my $param_flow_neutral = { | ||
| 47 | _checkbuttons_aref => '', | ||
| 48 | _checkbuttons_aref2 => '', | ||
| 49 | _destination_index => '', | ||
| 50 | _end => '', | ||
| 51 | _first_idx => 0, # not a string | ||
| 52 | _flow_prog_names_aref => '', | ||
| 53 | _good_checkbuttons_aref2 => '', | ||
| 54 | _good_labels_aref2 => '', | ||
| 55 | _good_values_aref2 => '', | ||
| 56 | _index2move => '', | ||
| 57 | _index4flow => -1, | ||
| 58 | _index4checkbuttons => -1, | ||
| 59 | _index4names => -1, | ||
| 60 | _index4values => -1, | ||
| 61 | _indices => -1, | ||
| 62 | _label_boxes_w => '', | ||
| 63 | _length => '', | ||
| 64 | _names_aref => '', # equiv. to 'labels' | ||
| 65 | _names_aref2 => '', | ||
| 66 | _num_good_values_aref => 0, | ||
| 67 | _num_good_labels_aref => 0, | ||
| 68 | _num_items => 0, | ||
| 69 | _num_items4flow => 0, | ||
| 70 | _num_items4checkbuttons => 0, | ||
| 71 | _num_items4names => 0, | ||
| 72 | _num_items4values => 0, | ||
| 73 | _prog_names_aref => '', | ||
| 74 | _prog_version_aref => '', | ||
| 75 | _selection_index => '', | ||
| 76 | _start => 0, | ||
| 77 | _values_aref => '', | ||
| 78 | _values_aref2 => '', | ||
| 79 | }; | ||
| 80 | |||
| 81 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 82 | |||
| 83 | my $get = L_SU_global_constants->new(); | ||
| 84 | |||
| 85 | my $var = $get->var(); | ||
| 86 | my $on = $var->{_on}; | ||
| 87 | my $off = $var->{_off}; | ||
| 88 | my $nu = $var->{_nu}; | ||
| 89 | |||
| 90 | my $empty_string = $var->{_empty_string}; | ||
| 91 | |||
| 92 | =head2 sub _get_good_length4item | ||
| 93 | |||
| 94 | =cut | ||
| 95 | |||
| 96 | sub _get_good_length4item { | ||
| 97 | my ( $self, $index4flow ) = @_; | ||
| 98 | my $idx = $index4flow; | ||
| 99 | my $length = scalar @{ $param_flow_neutral->{_good_values_aref2}[$idx] }; | ||
| 100 | return ($length); | ||
| 101 | } | ||
| 102 | |||
| 103 | =head2 sub _get_names_aref | ||
| 104 | |||
| 105 | |||
| 106 | =cut | ||
| 107 | |||
| 108 | sub _get_names_aref { | ||
| 109 | my ($item_index) = @_; | ||
| 110 | |||
| 111 | if ( $item_index >= 0 ) { | ||
| 112 | my ( $i, $j, $length ); | ||
| 113 | my ( @names_aref, @names ); | ||
| 114 | @names_aref = | ||
| 115 | @{ @{ $param_flow_neutral->{_names_aref2} }[$item_index] }; | ||
| 116 | |||
| 117 | # print("param_flow_neutral, _get_names_aref, | ||
| 118 | #@names_aref, index=$item_index\n"); | ||
| 119 | return ( \@names_aref ); | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | =head2 sub _get_values_aref | ||
| 124 | |||
| 125 | find reference for array of values | ||
| 126 | |||
| 127 | =cut | ||
| 128 | |||
| 129 | sub _get_values_aref { | ||
| 130 | my ($item_index) = @_; | ||
| 131 | |||
| 132 | if ( $item_index >= 0 ) { | ||
| 133 | my ( $i, $j, $length ); | ||
| 134 | my ( @values_aref, @values ); | ||
| 135 | @values_aref = | ||
| 136 | @{ @{ $param_flow_neutral->{_values_aref2} }[$item_index] }; | ||
| 137 | |||
| 138 | #print("param_flow_neutral, _get_values_aref, $values_aref[0], index=$item_index\n"); | ||
| 139 | return ( \@values_aref ); | ||
| 140 | } | ||
| 141 | } | ||
| 142 | |||
| 143 | =head2 sub _set_good_labels4item | ||
| 144 | |||
| 145 | my $num_items4flow = $param_flow_neutral->{_num_items4flow}; | ||
| 146 | Oct 10. 2018 allow numbers=0 | ||
| 147 | |||
| 148 | =cut | ||
| 149 | |||
| 150 | sub _set_good_labels4item { | ||
| 151 | my ($index4flow) = @_; | ||
| 152 | |||
| 153 | # print("param_flow_neutral,set_good_indices4item, | ||
| 154 | # self,index4flow: $self,$index4flow\n"); | ||
| 155 | my $idx = $index4flow; | ||
| 156 | my (@good); | ||
| 157 | my ($j); | ||
| 158 | |||
| 159 | # print("1. param_flow_neutral,_set_good_labels4item, | ||
| 160 | # flow index:$idx, prog name: | ||
| 161 | # @{$param_flow_neutral->{_prog_names_aref}}[$idx] \n"); | ||
| 162 | |||
| 163 | # good values determine names and checkbuttons | ||
| 164 | my $values_aref = _get_values_aref($idx); | ||
| 165 | my $length = scalar @$values_aref; | ||
| 166 | |||
| 167 | for ( my $i = 0, $j = 0; $i < $length; $i++ ) { | ||
| 168 | |||
| 169 | # print("param_flow_neutral, _set_good_labels4item: | ||
| 170 | # values_aref is @$values_aref[$i]\n"); | ||
| 171 | |||
| 172 | # only if values are either numeric or strings | ||
| 173 | # don't use the following values: 'nu' , empty | ||
| 174 | |||
| 175 | if ( defined( @{$values_aref}[$i] ) | ||
| 176 | && ( @{$values_aref}[$i] ne $empty_string ) ) | ||
| 177 | { | ||
| 178 | |||
| 179 | if ( @$values_aref[$i] ne "'nu'" ) { # | ||
| 180 | |||
| 181 | my $name = | ||
| 182 | ${ @{ $param_flow_neutral->{_names_aref2} }[$idx] }[$i]; | ||
| 183 | |||
| 184 | # print("2. param_flow_neutral,_set_good_labels4item, | ||
| 185 | # good index #$i, name:$name \n"); | ||
| 186 | $good[$j] = $name; | ||
| 187 | $j++; | ||
| 188 | |||
| 189 | } | ||
| 190 | else { | ||
| 191 | print( "param_flow_neutral, _set_good_labels_4item: unexpected ending\n" ); | ||
| 192 | } | ||
| 193 | |||
| 194 | } | ||
| 195 | else { | ||
| 196 | # NADAprint("param_flow_neutral, _set_good_labels_4item: no values are present, can not be saved\n"); | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | $num_good_labels[$idx] = $j; | ||
| 201 | |||
| 202 | # print("param_flow_neutral,_set_good_labels4item, | ||
| 203 | # good_labels=@good \n"); | ||
| 204 | |||
| 205 | $param_flow_neutral->{_num_good_labels_aref} = \@num_good_labels; | ||
| 206 | $good_labels[$idx] = \@good; | ||
| 207 | $param_flow_neutral->{_good_labels_aref2} = \@good_labels; | ||
| 208 | |||
| 209 | #print(" 3. param_flow_neutral,_set_good_labels4item, | ||
| 210 | #num_good_labels= $num_good_labels[$idx] , | ||
| 211 | #labels/names are: @{@{$param_flow_neutral->{_good_labels_aref2}}[$idx]}\n"); | ||
| 212 | |||
| 213 | return (); | ||
| 214 | } | ||
| 215 | |||
| 216 | =head2 sub _set_good_values4item | ||
| 217 | |||
| 218 | Set good values privately for a single item (program name) | ||
| 219 | within a flow | ||
| 220 | only non-empty values will be used | ||
| 221 | |||
| 222 | my $num_items4flow = $param_flow_neutral->{_num_items4flow}; | ||
| 223 | |||
| 224 | =cut | ||
| 225 | |||
| 226 | sub _set_good_values4item { | ||
| 227 | my ($index4flow) = @_; | ||
| 228 | |||
| 229 | # print("param_flow_neutral,set_good_indices4item,index4flow: $index4flow \n"); | ||
| 230 | |||
| 231 | my $idx = $index4flow; # program sequence in flow | ||
| 232 | my (@good); | ||
| 233 | my ($j); | ||
| 234 | |||
| 235 | # print("1. param_flow_neutral,_set_good_values4item, flow index:$idx, prog name:@{$param_flow_neutral->{_prog_names_aref}}[$idx] \n"); | ||
| 236 | |||
| 237 | my $values_aref = _get_values_aref($idx); | ||
| 238 | my $length = scalar @$values_aref; | ||
| 239 | |||
| 240 | # print("2. param_flow_neutral,_set_good_values4item, length: $length\n"); | ||
| 241 | |||
| 242 | for ( my $i = 0, $j = 0; $i < $length; $i++ ) { | ||
| 243 | |||
| 244 | # print("param_flow_neutral, _set_good_values_4item: values_aref is @$values_aref[$i]\n"); | ||
| 245 | if ( defined( @{$values_aref}[$i] ) | ||
| 246 | && ( @{$values_aref}[$i] ne $empty_string ) ) | ||
| 247 | { | ||
| 248 | |||
| 249 | if ( @$values_aref[$i] ne "'nu'" ) { | ||
| 250 | |||
| 251 | my $value = | ||
| 252 | ${ @{ $param_flow_neutral->{_values_aref2} }[$idx] }[$i]; | ||
| 253 | |||
| 254 | # print("2. param_flow_neutral,_set_good_values4item,good index #$i\n"); | ||
| 255 | # print("2. param_flow_neutral,_set_good_values4item,value:$value \n"); | ||
| 256 | $good[$j] = $value; | ||
| 257 | $j++; | ||
| 258 | |||
| 259 | } | ||
| 260 | else { | ||
| 261 | print( "param_flow_neutral, _set_good_values_4item: unexpected ending\n" ); | ||
| 262 | } | ||
| 263 | |||
| 264 | } | ||
| 265 | else { | ||
| 266 | # print("param_flow_neutral, _set_good_values_4item: no values are present, can not be saved\n"); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | $num_good_values[$idx] = $j; | ||
| 271 | |||
| 272 | # print("param_flow_neutral,_set_good_values4item,good_values=@good \n"); | ||
| 273 | |||
| 274 | $param_flow_neutral->{_num_good_values_aref} = \@num_good_values; | ||
| 275 | |||
| 276 | $good_values[$idx] = \@good; | ||
| 277 | $param_flow_neutral->{_good_values_aref2} = \@good_values; | ||
| 278 | |||
| 279 | # print(" 3. param_flow_neutral,_set_good_values4item,num_good_values= $num_good_values[$idx], values are: @{@{$param_flow_neutral->{_good_values_aref2}}[$idx]}\n"); | ||
| 280 | return (); | ||
| 281 | } | ||
| 282 | |||
| 283 | =head2 sub clear | ||
| 284 | |||
| 285 | clear from memory any existing values in the namespace | ||
| 286 | = 31 | ||
| 287 | |||
| 288 | =cut | ||
| 289 | |||
| 290 | sub clear { | ||
| 291 | |||
| 292 | my ($self) = @_; | ||
| 293 | |||
| 294 | $param_flow_neutral->{_checkbuttons_aref} = ''; | ||
| 295 | $param_flow_neutral->{_checkbuttons_aref2} = ''; | ||
| 296 | $param_flow_neutral->{_destination_index} = ''; | ||
| 297 | $param_flow_neutral->{_end} = ''; | ||
| 298 | $param_flow_neutral->{_first_idx} = 0; | ||
| 299 | $param_flow_neutral->{_flow_prog_names_aref} = ''; | ||
| 300 | $param_flow_neutral->{_good_checkbuttons_aref2} = ''; | ||
| 301 | $param_flow_neutral->{_good_labels_aref2} = ''; | ||
| 302 | $param_flow_neutral->{_good_values_aref2} = ''; | ||
| 303 | $param_flow_neutral->{_index2move} = ''; | ||
| 304 | $param_flow_neutral->{_index4flow} = -1; | ||
| 305 | $param_flow_neutral->{_index4checkbuttons} = -1; | ||
| 306 | $param_flow_neutral->{_index4names} = -1; | ||
| 307 | $param_flow_neutral->{_index4values} = -1; | ||
| 308 | $param_flow_neutral->{_indices} = -1; | ||
| 309 | $param_flow_neutral->{_label_boxes_w} = ''; | ||
| 310 | $param_flow_neutral->{_length} = ''; | ||
| 311 | $param_flow_neutral->{_names_aref} = ''; | ||
| 312 | $param_flow_neutral->{_names_aref2} = ''; | ||
| 313 | $param_flow_neutral->{_num_good_values_aref} = 0; | ||
| 314 | $param_flow_neutral->{_num_good_labels_aref} = 0; | ||
| 315 | $param_flow_neutral->{_num_items} = 0; | ||
| 316 | $param_flow_neutral->{_num_items4flow} = 0; | ||
| 317 | $param_flow_neutral->{_num_items4checkbuttons} = 0; | ||
| 318 | $param_flow_neutral->{_num_items4names} = 0; | ||
| 319 | $param_flow_neutral->{_num_items4values} = 0; | ||
| 320 | $param_flow_neutral->{_prog_names_aref} = ''; | ||
| 321 | $param_flow_neutral->{_prog_version_aref} = ''; | ||
| 322 | $param_flow_neutral->{_selection_index} = ''; | ||
| 323 | $param_flow_neutral->{_start} = 0; | ||
| 324 | $param_flow_neutral->{_values_aref} = ''; | ||
| 325 | $param_flow_neutral->{_values_aref2} = ''; | ||
| 326 | @program_names = (); | ||
| 327 | @num_good_values = (); | ||
| 328 | @num_good_labels = (); | ||
| 329 | @good_labels = (); | ||
| 330 | @good_values = (); | ||
| 331 | @names = (); | ||
| 332 | @values = (); | ||
| 333 | @checkbuttons = (); | ||
| 334 | |||
| 335 | return (); | ||
| 336 | |||
| 337 | } | ||
| 338 | |||
| 339 | =head2 sub clear_flow_items_version_aref | ||
| 340 | |||
| 341 | clear version array reference | ||
| 342 | |||
| 343 | =cut | ||
| 344 | |||
| 345 | sub clear_flow_items_version_aref { | ||
| 346 | |||
| 347 | my ($self) = @_; | ||
| 348 | |||
| 349 | if ( $param_flow_neutral->{_prog_version_aref} ) { | ||
| 350 | |||
| 351 | $param_flow_neutral->{_prog_version_aref} = ''; | ||
| 352 | |||
| 353 | # if ($param_flow_neutral->{_prog_version_aref} eq '') { | ||
| 354 | |||
| 355 | # print("param_flow_neutral, clear_flow_items_version_aref, param_flow_neutral->{_prog_version_aref} = '' \n"); | ||
| 356 | # } | ||
| 357 | |||
| 358 | } | ||
| 359 | else { | ||
| 360 | print( "param_flow_neutral, clear_flow_items_version_aref, missing program_version_aref\n" ); | ||
| 361 | } | ||
| 362 | |||
| 363 | } | ||
| 364 | |||
| 365 | =head2 sub delete_selection | ||
| 366 | |||
| 367 | delete parameter names and values | ||
| 368 | of on one selected item | ||
| 369 | |||
| 370 | =cut | ||
| 371 | |||
| 372 | sub delete_selection { | ||
| 373 | |||
| 374 | my ( $self, $index2delete ) = @_; | ||
| 375 | my $end = $param_flow_neutral->{_indices}; | ||
| 376 | my $num_items = $param_flow_neutral->{_num_items}; | ||
| 377 | my $first = 0; | ||
| 378 | $param_flow_neutral->{_index2delete} = $index2delete; | ||
| 379 | |||
| 380 | # print("\nparam_flow_neutral,delete_selection B4 deletion,idx2delete=$index2delete\n"); | ||
| 381 | # view_data($index2delete); | ||
| 382 | |||
| 383 | # CASE 1: delete end item but not the last one | ||
| 384 | if ( $index2delete == $end && $num_items > 1 ) { # final item but more than one item | ||
| 385 | # print("index2delete = end, idx $index2delete\n"); | ||
| 386 | # empty end index of array | ||
| 387 | pop @{ $param_flow_neutral->{_checkbuttons_aref2} }; | ||
| 388 | pop @{ $param_flow_neutral->{_names_aref2} }; | ||
| 389 | pop @{ $param_flow_neutral->{_values_aref2} }; | ||
| 390 | pop @{ $param_flow_neutral->{_prog_names_aref} }; | ||
| 391 | |||
| 392 | # no $index_after; | ||
| 393 | } | ||
| 394 | |||
| 395 | # CASE 2: GENERAL CASE | ||
| 396 | # listbox has 3 items or more | ||
| 397 | # I can delete any but final | ||
| 398 | if ( $index2delete >= 0 && $index2delete < $end ) { | ||
| 399 | my $index_after = $index2delete + 1; | ||
| 400 | |||
| 401 | # print("index2delete >= 0 , idx2delete=$index2delete end=$end \n"); | ||
| 402 | # print("index_after $index_after \n"); | ||
| 403 | |||
| 404 | for ( my $i = $index_after, my $j = $index2delete; $i <= $end; $i++, $j++ ) { | ||
| 405 | |||
| 406 | # print("Prog names B4 delete @{$param_flow_neutral->{_prog_names_aref}} \n"); | ||
| 407 | |||
| 408 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$j] } = | ||
| 409 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$i] }; | ||
| 410 | @{ @{ $param_flow_neutral->{_names_aref2} }[$j] } = | ||
| 411 | @{ @{ $param_flow_neutral->{_names_aref2} }[$i] }; | ||
| 412 | @{ @{ $param_flow_neutral->{_values_aref2} }[$j] } = | ||
| 413 | @{ @{ $param_flow_neutral->{_values_aref2} }[$i] }; | ||
| 414 | @{ $param_flow_neutral->{_prog_names_aref} }[$j] = | ||
| 415 | @{ $param_flow_neutral->{_prog_names_aref} }[$i]; | ||
| 416 | } | ||
| 417 | |||
| 418 | # empty end index of array | ||
| 419 | # - OK JL | ||
| 420 | pop @{ $param_flow_neutral->{_checkbuttons_aref2} }; | ||
| 421 | pop @{ $param_flow_neutral->{_names_aref2} }; | ||
| 422 | pop @{ $param_flow_neutral->{_values_aref2} }; | ||
| 423 | pop @{ $param_flow_neutral->{_prog_names_aref} }; | ||
| 424 | |||
| 425 | # print("Prog names After delete @{$param_flow_neutral->{_prog_names_aref}} \n"); | ||
| 426 | } | ||
| 427 | |||
| 428 | # CASE 3: listbox has only 1 and final item left | ||
| 429 | if ( $index2delete == 0 && $num_items == 1 ) { | ||
| 430 | |||
| 431 | # print("index2delete = 0 and num_items=1, idx $index2delete\n"); | ||
| 432 | # empty end index of array | ||
| 433 | pop @{ $param_flow_neutral->{_checkbuttons_aref2} }; | ||
| 434 | pop @{ $param_flow_neutral->{_names_aref2} }; | ||
| 435 | pop @{ $param_flow_neutral->{_values_aref2} }; | ||
| 436 | pop @{ $param_flow_neutral->{_prog_names_aref} }; | ||
| 437 | |||
| 438 | # no $index_after; | ||
| 439 | } | ||
| 440 | |||
| 441 | $param_flow_neutral->{_num_items}--; | ||
| 442 | $param_flow_neutral->{_num_items4flow}--; | ||
| 443 | $param_flow_neutral->{_num_items4values}--; | ||
| 444 | $param_flow_neutral->{_num_items4names}--; | ||
| 445 | $param_flow_neutral->{_num_items4checkbuttons}--; | ||
| 446 | |||
| 447 | $param_flow_neutral->{_indices}--; | ||
| 448 | $param_flow_neutral->{_index4values}--; | ||
| 449 | $param_flow_neutral->{_index4names}--; | ||
| 450 | $param_flow_neutral->{_index4checkbuttons}--; | ||
| 451 | |||
| 452 | $param_flow_neutral->{_index4flow}--; | ||
| 453 | |||
| 454 | # print("\nAfter delete_selection, index2delete was $index2delete\n"); | ||
| 455 | #view_data($index2delete); | ||
| 456 | |||
| 457 | return (); | ||
| 458 | } | ||
| 459 | |||
| 460 | =head2 sub first_idx | ||
| 461 | |||
| 462 | first usable index is set to 0 | ||
| 463 | |||
| 464 | =cut | ||
| 465 | |||
| 466 | sub first_idx { | ||
| 467 | my ($self) = @_; | ||
| 468 | |||
| 469 | $param_flow_neutral->{_first_idx} = 0; | ||
| 470 | return ( $param_flow_neutral->{_first_idx} ); | ||
| 471 | |||
| 472 | } | ||
| 473 | |||
| 474 | =head2 sub get_check_buttons_settings | ||
| 475 | |||
| 476 | my ($i,$j, $length); | ||
| 477 | my @on_off; | ||
| 478 | my @values_aref; | ||
| 479 | |||
| 480 | @values_aref = @{@{$param_flow_neutral->{_checkbuttons_aref2}}[$index]}; | ||
| 481 | $length = scalar @values_aref; | ||
| 482 | |||
| 483 | print("param_flow_neutral,get_check_buttons_settings: is @values_aref\n"); | ||
| 484 | |||
| 485 | #for ($i=1,$j=0; $i < $length; $i=$i+2,$j++ ) { | ||
| 486 | for ($i=0; $i < $length; $i++ ) { | ||
| 487 | #$values[$j] = $values_aref[$i]; | ||
| 488 | #print("param_flow_neutral, get_check_buttons_settings :index $j values: $values[$j]\n"); | ||
| 489 | if($values_aref[$i] eq $nu || ) { | ||
| 490 | $on_off[$i] = $off; | ||
| 491 | # print(" 1. param_flow_neutral, get_check_buttons_settings,$on_off[$i]\n"); | ||
| 492 | } | ||
| 493 | else { | ||
| 494 | $on_off[$i] = $on; | ||
| 495 | # print(" 2. param_flow_neutral, get_check_buttons_settings,$on_off[$i]\n"); | ||
| 496 | } | ||
| 497 | # print("param_flow_neutral: get_check_buttons_settings :index $i setting $nu is: $on_off[$i]\n"); | ||
| 498 | } | ||
| 499 | |||
| 500 | =cut | ||
| 501 | |||
| 502 | sub get_check_buttons_settings { | ||
| 503 | my $self = @_; | ||
| 504 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 505 | my @on_off; | ||
| 506 | |||
| 507 | if ( $index >= 0 ) { | ||
| 508 | my @on_off = | ||
| 509 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$index] }; | ||
| 510 | |||
| 511 | # print("param_flow_neutral,get_check_buttons_settings: is @on_off\n"); | ||
| 512 | |||
| 513 | return ( \@on_off ); | ||
| 514 | } | ||
| 515 | return (); | ||
| 516 | } | ||
| 517 | |||
| 518 | =head2 sub get_flow_index | ||
| 519 | |||
| 520 | get current program index | ||
| 521 | |||
| 522 | =cut | ||
| 523 | |||
| 524 | sub get_flow_index { | ||
| 525 | my ($self) = @_; | ||
| 526 | my $current_idx = $param_flow_neutral->{_index4flow}; | ||
| 527 | |||
| 528 | # print("param_flow_neutral, get flow_index, | ||
| 529 | # current_idx is $param_flow_neutral->{_index4flow}\n"); | ||
| 530 | return ($current_idx); | ||
| 531 | } | ||
| 532 | |||
| 533 | =head2 sub get_flow_prog_names_aref | ||
| 534 | |||
| 535 | extract sequential program names in flow | ||
| 536 | |||
| 537 | =cut | ||
| 538 | |||
| 539 | sub get_flow_prog_names_aref { | ||
| 540 | my ($self) = @_; | ||
| 541 | |||
| 542 | if ( $param_flow_neutral->{_prog_names_aref} ne $empty_string ) { | ||
| 543 | |||
| 544 | # print("param_flow_neutral, get_flow_prog_names_aref, | ||
| 545 | # @{$param_flow_neutral->{_prog_names_aref}}\n"); | ||
| 546 | |||
| 547 | my $hash->{_prog_names_aref} = $param_flow_neutral->{_prog_names_aref}; | ||
| 548 | return ( $hash->{_prog_names_aref} ); | ||
| 549 | |||
| 550 | } | ||
| 551 | else { | ||
| 552 | print("param_flow_neutral, no program names exist \n"); | ||
| 553 | } | ||
| 554 | } | ||
| 555 | |||
| 556 | =head2 sub get_flow_items_version_aref | ||
| 557 | |||
| 558 | o/p is array ref of the version of each program name | ||
| 559 | |||
| 560 | =cut | ||
| 561 | |||
| 562 | sub get_flow_items_version_aref { | ||
| 563 | my ($self) = @_; | ||
| 564 | my $program_version_aref = $param_flow_neutral->{_prog_version_aref}; | ||
| 565 | |||
| 566 | # print("param_flow_neutral, get_flow_items_version_aref | ||
| 567 | # @{$param_flow_neutral->{_prog_version_aref}}\n"); | ||
| 568 | |||
| 569 | return ($program_version_aref); | ||
| 570 | } | ||
| 571 | |||
| 572 | =head2 sub get_good_labels_aref2 | ||
| 573 | |||
| 574 | =cut | ||
| 575 | |||
| 576 | sub get_good_labels_aref2 { | ||
| 577 | my ($self) = @_; | ||
| 578 | |||
| 579 | if ( $param_flow_neutral->{_good_labels_aref2} ) { | ||
| 580 | my $good_labels_aref2 = $param_flow_neutral->{_good_labels_aref2}; | ||
| 581 | |||
| 582 | # print(" param_flow_neutral,get_good_labels_aref2, | ||
| 583 | # good_labels for index 0= | ||
| 584 | # @{@{$param_flow_neutral->{_good_labels_aref2}}[0]}\n"); | ||
| 585 | return ($good_labels_aref2); | ||
| 586 | } | ||
| 587 | return (); | ||
| 588 | } | ||
| 589 | |||
| 590 | =head2 sub get_good_values_aref2 | ||
| 591 | |||
| 592 | =cut | ||
| 593 | |||
| 594 | sub get_good_values_aref2 { | ||
| 595 | my ($self) = @_; | ||
| 596 | |||
| 597 | if ( $param_flow_neutral->{_good_values_aref2} ) { | ||
| 598 | my $good_values_aref2 = $param_flow_neutral->{_good_values_aref2}; | ||
| 599 | |||
| 600 | # print(" param_flow_neutral,get_good_values_aref2, | ||
| 601 | # good_values for index 0= : | ||
| 602 | # @{@{$param_flow_neutral->{_good_values_aref2}}[0]}\n"); | ||
| 603 | return ($good_values_aref2); | ||
| 604 | } | ||
| 605 | return (); | ||
| 606 | } | ||
| 607 | |||
| 608 | =head2 sub get_names_aref | ||
| 609 | |||
| 610 | |||
| 611 | =cut | ||
| 612 | |||
| 613 | sub get_names_aref { | ||
| 614 | my ($self) = @_; | ||
| 615 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 616 | |||
| 617 | # print(" param_flow_neutral, get_name_aref names: index is $index\n"); | ||
| 618 | |||
| 619 | if ( $index >= 0 ) { | ||
| 620 | my @names_aref; | ||
| 621 | my ($length); | ||
| 622 | |||
| 623 | @names_aref = @{ @{ $param_flow_neutral->{_names_aref2} }[$index] }; | ||
| 624 | $length = scalar @names_aref; | ||
| 625 | |||
| 626 | # print(" param_flow_neutral, get_names_aref: @names_aref, index is $index\n"); | ||
| 627 | return ( \@names_aref ); | ||
| 628 | } | ||
| 629 | else { | ||
| 630 | print(" param_flow_neutral, get_names names:index <0 \n"); | ||
| 631 | } | ||
| 632 | } | ||
| 633 | |||
| 634 | =head2 sub get_num_good_labels_aref | ||
| 635 | |||
| 636 | =cut | ||
| 637 | |||
| 638 | sub get_num_good_labels_aref { | ||
| 639 | my ($self) = @_; | ||
| 640 | |||
| 641 | if ( $param_flow_neutral->{_num_good_labels_aref} ) { | ||
| 642 | my $num_good_labels_aref = $param_flow_neutral->{_num_good_labels_aref}; | ||
| 643 | return ($num_good_labels_aref); | ||
| 644 | } | ||
| 645 | return (); | ||
| 646 | } | ||
| 647 | |||
| 648 | =head2 sub get_num_good_values_aref | ||
| 649 | |||
| 650 | =cut | ||
| 651 | |||
| 652 | sub get_num_good_values_aref { | ||
| 653 | my ($self) = @_; | ||
| 654 | |||
| 655 | if ( $param_flow_neutral->{_num_good_values_aref} ) { | ||
| 656 | my $num_good_values_aref = $param_flow_neutral->{_num_good_values_aref}; | ||
| 657 | return ($num_good_values_aref); | ||
| 658 | } | ||
| 659 | return (); | ||
| 660 | } | ||
| 661 | |||
| 662 | =head2 sub get_num_items | ||
| 663 | |||
| 664 | Number of programs in the flow | ||
| 665 | Should increment every time that add2flow is run | ||
| 666 | in a superflowstack_names_aref2 | ||
| 667 | |||
| 668 | =cut | ||
| 669 | |||
| 670 | sub get_num_items { | ||
| 671 | my ($self) = @_; | ||
| 672 | |||
| 673 | if ( $param_flow_neutral->{_num_items} >= 0 ) { | ||
| 674 | my $num_items = $param_flow_neutral->{_num_items4flow}; | ||
| 675 | |||
| 676 | # print("param_flow_neutral,get_num_items, num_items = $param_flow_neutral->{_num_items} \n"); | ||
| 677 | return ($num_items); | ||
| 678 | |||
| 679 | } | ||
| 680 | else { | ||
| 681 | # print("param_flow_neutral,get_num_items,- no number of items \n"); | ||
| 682 | return (); | ||
| 683 | } | ||
| 684 | |||
| 685 | } | ||
| 686 | |||
| 687 | =head2 sub get_values_aref | ||
| 688 | |||
| 689 | |||
| 690 | =cut | ||
| 691 | |||
| 692 | sub get_values_aref { | ||
| 693 | my ($self) = @_; | ||
| 694 | |||
| 695 | # print("param_flow_neutral, get_values :_selection_index $param_flow_neutral->{_selection_index}\n"); | ||
| 696 | |||
| 697 | if ( ( $param_flow_neutral->{_selection_index} >= 0 ) | ||
| 698 | && $param_flow_neutral->{_values_aref2} ) | ||
| 699 | { | ||
| 700 | |||
| 701 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 702 | |||
| 703 | # print("param_flow_neutral, get_values :_values_aref2:@{@{$param_flow_neutral->{_values_aref2}}[$index]}\n"); | ||
| 704 | my ( $i, $j, $length ); | ||
| 705 | my ( @values_aref, @values ); | ||
| 706 | |||
| 707 | # print("param_flow_neutral, get_values :index $index\n"); | ||
| 708 | |||
| 709 | @values_aref = @{ @{ $param_flow_neutral->{_values_aref2} }[$index] }; | ||
| 710 | $length = scalar @values_aref; | ||
| 711 | |||
| 712 | # print("param_flow_neutral,get_values :values_aref is @values_aref\n"); | ||
| 713 | |||
| 714 | for ( $i = 1, $j = 0; $i < $length; $i = $i + 2, $j++ ) { | ||
| 715 | $values[$j] = $values_aref[$i]; | ||
| 716 | |||
| 717 | # print("param_flow_neutral, get_values :index $j values: $values[$j]\n"); | ||
| 718 | } | ||
| 719 | return ( \@values_aref ); | ||
| 720 | |||
| 721 | } | ||
| 722 | else { | ||
| 723 | print( "param_flow_neutral,get_values_aref :selection_index <=0 or values_aref2\n" ); | ||
| 724 | return (); | ||
| 725 | } | ||
| 726 | } | ||
| 727 | |||
| 728 | =head2 sub insert_selection | ||
| 729 | |||
| 730 | delete parameter names and values | ||
| 731 | of on one selected item | ||
| 732 | |||
| 733 | =cut | ||
| 734 | |||
| 735 | sub insert_selection { | ||
| 736 | my ($self) = @_; | ||
| 737 | my $first = 0; | ||
| 738 | my $idx2mv = $param_flow_neutral->{_index2move}; | ||
| 739 | my $destn_idx = $param_flow_neutral->{_destination_index}; | ||
| 740 | my $end = $param_flow_neutral->{_indices}; | ||
| 741 | my $num_items = $param_flow_neutral->{_num_items}; | ||
| 742 | |||
| 743 | # # print("param_flow_neutral,insert_selection start is $idx2mv\n"); | ||
| 744 | # print("param_flow_neutral,insert_selection,destn_id is $destn_idx\n"); | ||
| 745 | # print("param_flow_neutral,insert_selection, last index is $end\n"); | ||
| 746 | |||
| 747 | # print("before insertion\n"); | ||
| 748 | # view_data(); | ||
| 749 | # STEP 1 arrays for the mobile item | ||
| 750 | my ( @tmp_names_aref, @tmp_values_aref, @tmp_checkbuttons_aref ); | ||
| 751 | my ($tmp_prog_name); | ||
| 752 | my ( @swap_names_aref, @swap_values_aref, @swap_checkbuttons_aref ); | ||
| 753 | my (@swap_prog_names); | ||
| 754 | |||
| 755 | $tmp_prog_name = @{ $param_flow_neutral->{_prog_names_aref} }[$idx2mv]; | ||
| 756 | @tmp_names_aref = @{ @{ $param_flow_neutral->{_names_aref2} }[$idx2mv] }; | ||
| 757 | @tmp_values_aref = @{ @{ $param_flow_neutral->{_values_aref2} }[$idx2mv] }; | ||
| 758 | @tmp_checkbuttons_aref = | ||
| 759 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$idx2mv] }; | ||
| 760 | |||
| 761 | # print(" param_flow_neutral,insert_selection,mobile prog name: $tmp_prog_name \n"); | ||
| 762 | # print(" mobile names originally at index $idx2mv is @tmp_names_aref\n"); | ||
| 763 | # print(" values: @tmp_values_aref \n"); | ||
| 764 | # print(" checkbuttons: @tmp_checkbuttons_aref \n"); | ||
| 765 | |||
| 766 | # STEP 2 intermediate vector containing everything except mobile item | ||
| 767 | # swap files have one less item than the original array | ||
| 768 | if ( $idx2mv > $first ) { | ||
| 769 | |||
| 770 | for ( my $i = $first, my $j = $first; $j < $idx2mv; $i++, $j++ ) { | ||
| 771 | $swap_prog_names[$i] = | ||
| 772 | @{ $param_flow_neutral->{_prog_names_aref} }[$j]; | ||
| 773 | $swap_names_aref[$i] = | ||
| 774 | clone( \@{ @{ $param_flow_neutral->{_names_aref2} }[$j] } ); | ||
| 775 | $swap_values_aref[$i] = | ||
| 776 | clone( \@{ @{ $param_flow_neutral->{_values_aref2} }[$j] } ); | ||
| 777 | $swap_checkbuttons_aref[$i] = clone( \@{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$j] } ); | ||
| 778 | |||
| 779 | # print(" 1. filling swap vector at index $i with @{$swap_names_aref[$i]}\n"); | ||
| 780 | # print(" 1. filling swap vector values t index $i with @{$swap_values_aref[$i]}\n"); | ||
| 781 | #print(" 1. filling swap vector values t index $i with $swap_prog_names[$i]\n"); | ||
| 782 | } | ||
| 783 | for ( my $i = $idx2mv, my $j = ( $idx2mv + 1 ); $j <= $end; $i++, $j++ ) { | ||
| 784 | $swap_prog_names[$i] = | ||
| 785 | @{ $param_flow_neutral->{_prog_names_aref} }[$j]; | ||
| 786 | $swap_names_aref[$i] = | ||
| 787 | clone( \@{ @{ $param_flow_neutral->{_names_aref2} }[$j] } ); | ||
| 788 | $swap_values_aref[$i] = | ||
| 789 | clone( \@{ @{ $param_flow_neutral->{_values_aref2} }[$j] } ); | ||
| 790 | $swap_checkbuttons_aref[$i] = clone( \@{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$j] } ); | ||
| 791 | |||
| 792 | # print(" 2. filling swap vector at index $i with @{$swap_names_aref[$i]}\n"); | ||
| 793 | } | ||
| 794 | } | ||
| 795 | else { # assume $idx2mv=0 | ||
| 796 | for ( my $i = $first, my $j = ( $first + 1 ); $j <= $end; $i++, $j++ ) { # idx2mv=0 | ||
| 797 | |||
| 798 | $swap_prog_names[$i] = | ||
| 799 | @{ $param_flow_neutral->{_prog_names_aref} }[$j]; | ||
| 800 | $swap_names_aref[$i] = | ||
| 801 | clone( \@{ @{ $param_flow_neutral->{_names_aref2} }[$j] } ); | ||
| 802 | $swap_values_aref[$i] = | ||
| 803 | clone( \@{ @{ $param_flow_neutral->{_values_aref2} }[$j] } ); | ||
| 804 | $swap_checkbuttons_aref[$i] = clone( \@{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$j] } ); | ||
| 805 | |||
| 806 | # print(" 3. filling intermediate vector at int. index $i with @{$swap_names_aref[$i]}\n"); | ||
| 807 | } | ||
| 808 | } | ||
| 809 | |||
| 810 | # STEP 3 insert all but mobile item | ||
| 811 | # into the final destination container | ||
| 812 | if ( $destn_idx > $first ) { # assume $destn_idx > 0 | ||
| 813 | |||
| 814 | for ( my $i = $first, my $j = $first; $i < $destn_idx; $i++, $j++ ) { | ||
| 815 | @{ $param_flow_neutral->{_prog_names_aref} }[$i] = | ||
| 816 | $swap_prog_names[$j]; | ||
| 817 | @{ @{ $param_flow_neutral->{_names_aref2} }[$i] } = | ||
| 818 | @{ $swap_names_aref[$j] }; | ||
| 819 | @{ @{ $param_flow_neutral->{_values_aref2} }[$i] } = | ||
| 820 | @{ $swap_values_aref[$j] }; | ||
| 821 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$i] } = | ||
| 822 | @{ $swap_checkbuttons_aref[$j] }; | ||
| 823 | |||
| 824 | # print(" 1. final vector at new index $i uses swap @{$swap_names_aref[$j]}\n"); | ||
| 825 | # print(" 1. final vector at new index $i is @{@{$param_flow_neutral->{_names_aref2}}[$i]}\n"); | ||
| 826 | } | ||
| 827 | |||
| 828 | for ( my $i = ( $destn_idx + 1 ), my $j = $destn_idx; $i <= $end; $i++, $j++ ) { | ||
| 829 | @{ $param_flow_neutral->{_prog_names_aref} }[$i] = | ||
| 830 | $swap_prog_names[$j]; | ||
| 831 | @{ @{ $param_flow_neutral->{_names_aref2} }[$i] } = | ||
| 832 | @{ $swap_names_aref[$j] }; | ||
| 833 | @{ @{ $param_flow_neutral->{_values_aref2} }[$i] } = | ||
| 834 | @{ $swap_values_aref[$j] }; | ||
| 835 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$i] } = | ||
| 836 | @{ $swap_checkbuttons_aref[$j] }; | ||
| 837 | |||
| 838 | # print(" 2. final vector at new index $i with swap @{$swap_names_aref[$j]}\n"); | ||
| 839 | |||
| 840 | } | ||
| 841 | } | ||
| 842 | else { # assume $destn_idx = 0 | ||
| 843 | # swap files have one less item than the original array | ||
| 844 | # print(" 2A. destn_idx = $destn_idx\n"); | ||
| 845 | # print(" 4. swap vector index=0 with @{$swap_names_aref[0]}\n"); | ||
| 846 | # print(" 4. swap vector index=1 with @{$swap_names_aref[1]}\n"); | ||
| 847 | # print(" 4. swap vector index=2 with @{$swap_names_aref[2]}\n\n"); | ||
| 848 | |||
| 849 | for ( my $i = ( $first + 1 ), my $j = $first; $j < $end; $i++, $j++ ) { | ||
| 850 | my @swp_nam_tr = @{ $swap_names_aref[$j] }; | ||
| 851 | |||
| 852 | # print(" 4. swap vector at swap index j=$j has value of @swp_nam_tr \n"); | ||
| 853 | @{ $param_flow_neutral->{_prog_names_aref} }[$i] = | ||
| 854 | $swap_prog_names[$j]; | ||
| 855 | @{ @{ $param_flow_neutral->{_names_aref2} }[$i] } = @swp_nam_tr; | ||
| 856 | @{ @{ $param_flow_neutral->{_values_aref2} }[$i] } = | ||
| 857 | @{ $swap_values_aref[$j] }; | ||
| 858 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$i] } = | ||
| 859 | @{ $swap_checkbuttons_aref[$j] }; | ||
| 860 | |||
| 861 | #print(" 3. swap vector at index $j, @{$swap_names_aref[$j]} names final vector at new index $i \n"); | ||
| 862 | #print(" 3. swap vector at index $j, @{$swap_values_aref[$j]} values final vector at new index $i \n"); | ||
| 863 | #print(" 3. swap vector at index $j, $swap_prog_names[$j] prog names final vector at new index $i \n"); | ||
| 864 | } | ||
| 865 | } | ||
| 866 | |||
| 867 | #STEP 4 insert the mobile item | ||
| 868 | @{ $param_flow_neutral->{_prog_names_aref} }[$destn_idx] = $tmp_prog_name; | ||
| 869 | @{ @{ $param_flow_neutral->{_names_aref2} }[$destn_idx] } = @tmp_names_aref; | ||
| 870 | @{ @{ $param_flow_neutral->{_values_aref2} }[$destn_idx] } = | ||
| 871 | @tmp_values_aref; | ||
| 872 | @{ @{ $param_flow_neutral->{_checkbuttons_aref2} }[$destn_idx] } = | ||
| 873 | @tmp_checkbuttons_aref; | ||
| 874 | |||
| 875 | # print(" 4. final vector at new index $destn_idx with temp vector @tmp_names_aref\n"); | ||
| 876 | |||
| 877 | #print("data after insertion\n"); | ||
| 878 | #view_data(); | ||
| 879 | return (); | ||
| 880 | } | ||
| 881 | |||
| 882 | =head2 sub length | ||
| 883 | |||
| 884 | last item number (not last index) | ||
| 885 | last item number is equivalent to length | ||
| 886 | because values and labels are stored in the same | ||
| 887 | array, the length is twice the number of values or | ||
| 888 | labels individually. | ||
| 889 | Hence we also have subroutines to extract and set | ||
| 890 | "half-lengths" with respect to the stored configuration | ||
| 891 | parameters. | ||
| 892 | |||
| 893 | =cut | ||
| 894 | |||
| 895 | sub length { | ||
| 896 | my ($self) = @_; | ||
| 897 | |||
| 898 | my ( $length, $index ); | ||
| 899 | my @values_aref; | ||
| 900 | |||
| 901 | $index = $param_flow_neutral->{_selection_index}; | ||
| 902 | if ( $index >= 0 ) { | ||
| 903 | @values_aref = @{ @{ $param_flow_neutral->{_values_aref2} }[$index] }; | ||
| 904 | $length = scalar @values_aref; | ||
| 905 | |||
| 906 | # print("param_flow_neutral, length, num values: $length\n"); | ||
| 907 | # print("param_flow_neutral, index: $index\n"); | ||
| 908 | return ($length); | ||
| 909 | } | ||
| 910 | else { | ||
| 911 | print("param_flow_neutral,length, index does not exist\n"); | ||
| 912 | print("param_flow_neutral, length, num values: $length\n"); | ||
| 913 | return (); | ||
| 914 | } | ||
| 915 | } | ||
| 916 | |||
| 917 | =head2 sub set_check_buttons_settings | ||
| 918 | |||
| 919 | set check_buttons by user from outside | ||
| 920 | |||
| 921 | =cut | ||
| 922 | |||
| 923 | sub set_check_buttons_settings_aref { | ||
| 924 | my ( $self, $check_buttons_settings_aref ) = @_; | ||
| 925 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 926 | my $chkbut_aref = $check_buttons_settings_aref; | ||
| 927 | |||
| 928 | if ( $index >= 0 ) { | ||
| 929 | my ( $i, $j, $length ); | ||
| 930 | my @on_off; | ||
| 931 | my @values_aref; | ||
| 932 | |||
| 933 | @{ $param_flow_neutral->{_checkbuttons_aref2} }[$index] = $chkbut_aref; | ||
| 934 | |||
| 935 | # $length = scalar @$chkbut_aref; | ||
| 936 | |||
| 937 | # print("param_flow_neutral,set_check_buttons_settings: is @$chkbut_aref\n"); | ||
| 938 | |||
| 939 | #for ($i=1,$j=0; $i < $length; $i=$i+2,$j++ ) { | ||
| 940 | #for ($i=0; $i < $length; $i++ ) { | ||
| 941 | #$values[$j] = $values_aref[$i]; | ||
| 942 | #print("param_flow_neutral, set_check_buttons_settings :index $j values: $values[$j]\n"); | ||
| 943 | #if(@$values_aref[$i] eq $nu) { | ||
| 944 | # $on_off[$i] = $off; | ||
| 945 | # print(" 1. param_flow_neutral, set_check_buttons_settings,$on_off[$i]\n"); | ||
| 946 | #} | ||
| 947 | #else { | ||
| 948 | # $on_off[$i] = $on; | ||
| 949 | # print(" 2. param_flow_neutral, set_check_buttons_settings,$on_off[$i]\n"); | ||
| 950 | #} | ||
| 951 | # print("param_flow_neutral: set_check_buttons_settings :index $i setting $nu is: $on_off[$i]\n"); | ||
| 952 | #} | ||
| 953 | #return(); | ||
| 954 | } | ||
| 955 | return (); | ||
| 956 | } | ||
| 957 | |||
| 958 | =head2 sub set_flow_items_version_aref | ||
| 959 | |||
| 960 | i/p is array ref of the version of each program name | ||
| 961 | |||
| 962 | =cut | ||
| 963 | |||
| 964 | sub set_flow_items_version_aref { | ||
| 965 | my ( $self, $program_version_aref ) = @_; | ||
| 966 | if ($program_version_aref) { | ||
| 967 | $param_flow_neutral->{_prog_version_aref} = $program_version_aref; | ||
| 968 | |||
| 969 | #print("param_flow_neutral, set_flow_items_version_aref @{$param_flow_neutral->{_prog_version_aref}}\n"); | ||
| 970 | } | ||
| 971 | } | ||
| 972 | |||
| 973 | =head2 sub set_insert_start | ||
| 974 | |||
| 975 | move paramter names and values | ||
| 976 | of one selected item into another | ||
| 977 | space | ||
| 978 | |||
| 979 | =cut | ||
| 980 | |||
| 981 | sub set_insert_start { | ||
| 982 | my ( $self, $start ) = @_; | ||
| 983 | $param_flow_neutral->{_index2move} = $start; | ||
| 984 | |||
| 985 | # print("param_flow_neutral,set_insert_start is $start\n"); | ||
| 986 | return (); | ||
| 987 | } | ||
| 988 | |||
| 989 | =head2 sub set_insert_end | ||
| 990 | |||
| 991 | move paramter names and values | ||
| 992 | of one selected item into another | ||
| 993 | space | ||
| 994 | |||
| 995 | =cut | ||
| 996 | |||
| 997 | sub set_insert_end { | ||
| 998 | my ( $self, $end ) = @_; | ||
| 999 | $param_flow_neutral->{_destination_index} = $end; | ||
| 1000 | |||
| 1001 | # print("param_flow_neutral,set_insert_end $end \n"); | ||
| 1002 | |||
| 1003 | return (); | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | =head2 sub set_flow_index | ||
| 1007 | |||
| 1008 | select an item for which to extract data | ||
| 1009 | print("param_flow_neutral, set flow_index, prog name is @{$param_flow_neutral->{_prog_names_aref}}[$index]\n"); | ||
| 1010 | |||
| 1011 | =cut | ||
| 1012 | |||
| 1013 | sub set_flow_index { | ||
| 1014 | my ( $self, $index ) = @_; | ||
| 1015 | |||
| 1016 | # print("param_flow_neutral, set_flow_index,index, $index\n"); | ||
| 1017 | if ( $index >= 0 ) { | ||
| 1018 | |||
| 1019 | $param_flow_neutral->{_selection_index} = $index; | ||
| 1020 | |||
| 1021 | } | ||
| 1022 | else { | ||
| 1023 | print("param_flow_neutral, set_flow_index,index does not exist, index:$index\n"); | ||
| 1024 | } | ||
| 1025 | return (); | ||
| 1026 | } | ||
| 1027 | |||
| 1028 | =head2 sub set_names_aref | ||
| 1029 | |||
| 1030 | |||
| 1031 | =cut | ||
| 1032 | |||
| 1033 | sub set_names_aref { | ||
| 1034 | my ( $self, $names_aref ) = @_; | ||
| 1035 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 1036 | |||
| 1037 | # print(" param_flow_neutral, set_names: @{$names_aref}, index is $index\n"); | ||
| 1038 | |||
| 1039 | if ( $index >= 0 ) { | ||
| 1040 | my @names_aref; | ||
| 1041 | my ($length); | ||
| 1042 | |||
| 1043 | @{ $param_flow_neutral->{_names_aref2} }[$index] = $names_aref; | ||
| 1044 | |||
| 1045 | # $length = scalar @names_aref; | ||
| 1046 | |||
| 1047 | return (); | ||
| 1048 | } | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | =head2 sub set_good_labels | ||
| 1052 | |||
| 1053 | select names with values | ||
| 1054 | |||
| 1055 | =cut | ||
| 1056 | |||
| 1057 | sub set_good_labels { | ||
| 1058 | |||
| 1059 | my ($self) = @_; | ||
| 1060 | my $length = $param_flow_neutral->{_num_items4flow}; | ||
| 1061 | |||
| 1062 | # print("param_flow_neutral,set_good_labels | ||
| 1063 | # num_items4flow: $param_flow_neutral->{_num_items4flow}\n"); | ||
| 1064 | |||
| 1065 | for ( my $i = 0; $i < $length; $i++ ) { | ||
| 1066 | _set_good_labels4item($i); | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | return (); | ||
| 1070 | |||
| 1071 | } | ||
| 1072 | |||
| 1073 | =head2 sub set_good_values | ||
| 1074 | |||
| 1075 | find good values for ALL programs in flow | ||
| 1076 | |||
| 1077 | =cut | ||
| 1078 | |||
| 1079 | sub set_good_values { | ||
| 1080 | |||
| 1081 | my ($self) = @_; | ||
| 1082 | my $length = $param_flow_neutral->{_num_items4flow}; # no. programs in flow | ||
| 1083 | |||
| 1084 | # print("param_flow_neutral,set_good_values num_items4flow: $param_flow_neutral->{_num_items4flow}\n"); | ||
| 1085 | |||
| 1086 | for ( my $i = 0; $i < $length; $i++ ) { | ||
| 1087 | _set_good_values4item($i); | ||
| 1088 | } | ||
| 1089 | |||
| 1090 | return (); | ||
| 1091 | } | ||
| 1092 | |||
| 1093 | =head2 sub set_good_labels4item | ||
| 1094 | |||
| 1095 | my $num_items4flow = $param_flow_neutral->{_num_items4flow}; | ||
| 1096 | |||
| 1097 | =cut | ||
| 1098 | |||
| 1099 | sub set_good_labels4item { | ||
| 1100 | my ( $self, $index4flow ) = @_; | ||
| 1101 | |||
| 1102 | # print("param_flow_neutral,set_good_labels4item, | ||
| 1103 | # self,index4flow: $self,$index4flow\n"); | ||
| 1104 | |||
| 1105 | my $idx = $index4flow; | ||
| 1106 | my ( @good, @good_labels ); | ||
| 1107 | my ( $num_good_labels, $j ); | ||
| 1108 | |||
| 1109 | # print("1. param_flow_neutral,set_good_labels4item, | ||
| 1110 | #flow index:$idx, prog name: | ||
| 1111 | # @{$param_flow_neutral->{_prog_names_aref}}[$idx] \n"); | ||
| 1112 | |||
| 1113 | # good values (not names) determine good names | ||
| 1114 | my $values_aref = _get_values_aref($idx); | ||
| 1115 | my $length = scalar @$values_aref; | ||
| 1116 | |||
| 1117 | for ( my $i = 0, $j = 0; $i < $length; $i++ ) { | ||
| 1118 | |||
| 1119 | # print("param_flow_neutral, set_good_labels4item: | ||
| 1120 | # values_aref is @$values_aref[$i]\n"); | ||
| 1121 | |||
| 1122 | if ( @$values_aref[$i] ne "'nu'" ) { | ||
| 1123 | my $name = ${ @{ $param_flow_neutral->{_names_aref2} }[$idx] }[$i]; | ||
| 1124 | |||
| 1125 | #print("2. param_flow_neutral,set_good_labels4item, | ||
| 1126 | #good index #$i, name:$name \n"); | ||
| 1127 | |||
| 1128 | $good[$j] = $name; | ||
| 1129 | $j++; | ||
| 1130 | } | ||
| 1131 | } | ||
| 1132 | |||
| 1133 | $num_good_labels = $j; | ||
| 1134 | |||
| 1135 | # print("param_flow_neutral,set_good_labels4item, | ||
| 1136 | # good_labels=@good \n"); | ||
| 1137 | |||
| 1138 | $good_labels[$idx] = \@good; | ||
| 1139 | $param_flow_neutral->{_good_labels_aref2} = \@good_labels; | ||
| 1140 | |||
| 1141 | # print(" 3. param_flow_neutral,set_good_,names4item, | ||
| 1142 | # num_good_labels= $num_good_labels , names are: | ||
| 1143 | # @{@{$param_flow_neutral->{_good_labels_aref2}}[$idx]}\n"); | ||
| 1144 | return (); | ||
| 1145 | } | ||
| 1146 | |||
| 1147 | =head2 sub set_good_values4item | ||
| 1148 | |||
| 1149 | my $num_items4flow = $param_flow_neutral->{_num_items4flow}; | ||
| 1150 | work on finding good values for one item | ||
| 1151 | |||
| 1152 | =cut | ||
| 1153 | |||
| 1154 | sub set_good_values4item { | ||
| 1155 | my ( $self, $index4flow ) = @_; | ||
| 1156 | |||
| 1157 | # print("param_flow_neutral,set_good_values4item, | ||
| 1158 | # self,index4flow: $self,$index4flow\n"); | ||
| 1159 | |||
| 1160 | my $idx = $index4flow; | ||
| 1161 | my ( @good, @good_values ); | ||
| 1162 | my ( $num_good_values, $j ); | ||
| 1163 | |||
| 1164 | # print("1. param_flow_neutral,set_good_values4item, | ||
| 1165 | # flow index:$idx, prog name: | ||
| 1166 | # @{$param_flow_neutral->{_prog_names_aref}}[$idx] \n"); | ||
| 1167 | |||
| 1168 | my $values_aref = _get_values_aref($idx); | ||
| 1169 | my $length = scalar @$values_aref; | ||
| 1170 | |||
| 1171 | for ( my $i = 0, $j = 0; $i < $length; $i++ ) { | ||
| 1172 | |||
| 1173 | # print("param_flow_neutral, set_good_values4item: | ||
| 1174 | # values_aref is @$values_aref[$i]\n"); | ||
| 1175 | |||
| 1176 | if ( @$values_aref[$i] ne "'nu'" ) { | ||
| 1177 | my $value = | ||
| 1178 | ${ @{ $param_flow_neutral->{_values_aref2} }[$idx] }[$i]; | ||
| 1179 | |||
| 1180 | # print("2. param_flow_neutral,set_good_values4item, | ||
| 1181 | # good index #$i, value:$value \n"); | ||
| 1182 | |||
| 1183 | $good[$j] = $value; | ||
| 1184 | $j++; | ||
| 1185 | } | ||
| 1186 | else { | ||
| 1187 | print( "param_flow_neutral,set_good_values4item, a bad value detected\n" ); | ||
| 1188 | |||
| 1189 | } | ||
| 1190 | } | ||
| 1191 | |||
| 1192 | $num_good_values = $j; | ||
| 1193 | |||
| 1194 | # print("param_flow_neutral,set_good_values4item, | ||
| 1195 | # good_values=@good \n"); | ||
| 1196 | |||
| 1197 | $good_values[$idx] = \@good; | ||
| 1198 | $param_flow_neutral->{_good_values_aref2} = \@good_values; | ||
| 1199 | |||
| 1200 | # print(" 3. param_flow_neutral,set_good_,values4item, | ||
| 1201 | # num_good_values= $num_good_values , values are: | ||
| 1202 | # @{@{$param_flow_neutral->{_good_values_aref2}}[$idx]}\n"); | ||
| 1203 | return (); | ||
| 1204 | } | ||
| 1205 | |||
| 1206 | =head2 sub set_values_aref | ||
| 1207 | |||
| 1208 | |||
| 1209 | =cut | ||
| 1210 | |||
| 1211 | sub set_values_aref { | ||
| 1212 | my ( $self, $values_aref ) = @_; | ||
| 1213 | |||
| 1214 | if ( $param_flow_neutral->{_selection_index} >= 0 ) { | ||
| 1215 | |||
| 1216 | my $index = $param_flow_neutral->{_selection_index}; | ||
| 1217 | if ( $index >= 0 ) { | ||
| 1218 | my ( $i, $j, $length ); | ||
| 1219 | my ( @values_aref, @values ); | ||
| 1220 | print("1. param_flow_neutral,set_values_aref :index is $index\n"); | ||
| 1221 | print("2. param_flow_neutral,set_values_aref :values_aref is @$values_aref\n"); | ||
| 1222 | print("5. param_flow_neutral,set_values_aref :values_aref2 is @{ $param_flow_neutral->{_values_aref2} }[$index] \n"); | ||
| 1223 | @{ $param_flow_neutral->{_values_aref2} }[$index] = $values_aref; | ||
| 1224 | |||
| 1225 | $length = scalar @values_aref; | ||
| 1226 | |||
| 1227 | print("2. param_flow_neutral,set_values :values_aref is @$values_aref\n"); | ||
| 1228 | |||
| 1229 | for ( $i = 1, $j = 0; $i < $length; $i = $i + 2, $j++ ) { | ||
| 1230 | $values[$j] = $values_aref[$i]; | ||
| 1231 | print( "param_flow_neutral, set_values :index $j values: $values[$j]\n" ); | ||
| 1232 | } | ||
| 1233 | } | ||
| 1234 | } | ||
| 1235 | else { | ||
| 1236 | print("param_flow_neutral, set_values_aref: missing selection index\n"); | ||
| 1237 | } | ||
| 1238 | |||
| 1239 | # print("param_flow_neutral,set_values_aref :values_aref are @$values_aref[0]\n"); | ||
| 1240 | # print("param_flow_neutral,set_values_aref, index: $index\n"); | ||
| 1241 | return (); | ||
| 1242 | } | ||
| 1243 | |||
| 1244 | =head2 sub stack_checkbuttons_aref2 | ||
| 1245 | |||
| 1246 | array of arrays | ||
| 1247 | One array if checkbuttons for each item | ||
| 1248 | DB | ||
| 1249 | #for (my $i=0; $i<=$index;$i++) { | ||
| 1250 | #print("param_flow_neutral,checkbuttons_aref,@{@{$param_flow_neutral->{_checkbuttons_aref2}}[$i]} index $i\n"); | ||
| 1251 | #} | ||
| 1252 | #print("param_flow_neutral, checkbuttons_aref2, num_items4checkbuttons $param_flow_neutral->{_num_items4checkbuttons}\n"); | ||
| 1253 | |||
| 1254 | =cut | ||
| 1255 | |||
| 1256 | sub stack_checkbuttons_aref2 { | ||
| 1257 | |||
| 1258 | my ( $self, $checkbuttons_aref ) = @_; | ||
| 1259 | my $index = $param_flow_neutral->{_index4checkbuttons} + 1; | ||
| 1260 | |||
| 1261 | $checkbuttons[$index] = $checkbuttons_aref; | ||
| 1262 | $param_flow_neutral->{_checkbuttons_aref2} = \@checkbuttons; | ||
| 1263 | |||
| 1264 | $param_flow_neutral->{_indices} = $index; | ||
| 1265 | $param_flow_neutral->{_index4checkbuttons}++; | ||
| 1266 | $param_flow_neutral->{_num_items4checkbuttons}++; | ||
| 1267 | $param_flow_neutral->{_num_items} = $param_flow_neutral->{_num_items4checkbuttons}; | ||
| 1268 | |||
| 1269 | # print("param_flow_neutral,stack_checkbuttons_aref2, @{$checkbuttons[$index]},idx $index num_items $param_flow_neutral->{_num_items}\n"); | ||
| 1270 | # print("param_flow_neutral,stack_checkbuttons_aref2, @{@{$param_flow_neutral->{_checkbuttons_aref2}}[$index]},idx $index num_items $param_flow_neutral->{_num_items}\n"); | ||
| 1271 | |||
| 1272 | return (); | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | =head2 sub stack_flow_item | ||
| 1276 | |||
| 1277 | i/p is scalar ref to a program name | ||
| 1278 | keep count and increment the number of items | ||
| 1279 | encapsulate internal counters and array | ||
| 1280 | from the array shared among the package subroutines | ||
| 1281 | |||
| 1282 | count items at start in case we don't return to the subroutine | ||
| 1283 | later | ||
| 1284 | print("param_flow_neutral, stack_flow_item @{$param_flow_neutral->{_prog_names_aref}}, num_items $param_flow_neutral->{_num_items}\n"); | ||
| 1285 | print("param_flow_neutral, stack_flow_item, index: $index\n"); | ||
| 1286 | |||
| 1287 | =cut | ||
| 1288 | |||
| 1289 | sub stack_flow_item { | ||
| 1290 | my ( $self, $program_name_sref ) = @_; | ||
| 1291 | if ($program_name_sref) { | ||
| 1292 | my $index = $param_flow_neutral->{_index4flow} + 1; | ||
| 1293 | |||
| 1294 | # print("param_flow_neutral, stack_flow_item, index: $index\n"); | ||
| 1295 | |||
| 1296 | $program_names[$index] = $$program_name_sref; | ||
| 1297 | $param_flow_neutral->{_prog_names_aref} = \@program_names; | ||
| 1298 | |||
| 1299 | $param_flow_neutral->{_indices} = $index; | ||
| 1300 | $param_flow_neutral->{_index4flow} = $index; | ||
| 1301 | $param_flow_neutral->{_num_items4flow}++; | ||
| 1302 | $param_flow_neutral->{_num_items}++; | ||
| 1303 | |||
| 1304 | } | ||
| 1305 | return (); | ||
| 1306 | } | ||
| 1307 | |||
| 1308 | =head2 sub stack_names_aref2 | ||
| 1309 | |||
| 1310 | i/p array ref for values in a program | ||
| 1311 | an array of arrays is created, one array for each item | ||
| 1312 | DrBN | ||
| 1313 | |||
| 1314 | #print("param_flow_neutral, names_aref2, num_items4names $param_flow_neutral->{_num_items4names}\n"); | ||
| 1315 | |||
| 1316 | #print("param_flow_neutral,names_aref,$names[$index],item $index\n"); | ||
| 1317 | # print("param_flow_neutral, stack_names_aref2, names in program# $index are @{$names[$index]}[0]\n"); | ||
| 1318 | for(my $i = 0; $i <=$index; $i++) { | ||
| 1319 | print("param_flow_neutral,stack_names_aref2, cumulative first names are: @{$names[$i]}[0], prog num =$i\n"); | ||
| 1320 | } | ||
| 1321 | |||
| 1322 | =cut | ||
| 1323 | |||
| 1324 | sub stack_names_aref2 { | ||
| 1325 | |||
| 1326 | my ( $self, $names_aref ) = @_; | ||
| 1327 | |||
| 1328 | if ($names_aref) { | ||
| 1329 | my $index = $param_flow_neutral->{_index4names} + 1; | ||
| 1330 | |||
| 1331 | # print("param_flow_neutral,names_aref2,index: $index\n"); | ||
| 1332 | $names[$index] = $names_aref; | ||
| 1333 | $param_flow_neutral->{_names_aref2} = \@names; | ||
| 1334 | $param_flow_neutral->{_indices} = $index; | ||
| 1335 | $param_flow_neutral->{_index4names}++; | ||
| 1336 | $param_flow_neutral->{_num_items4names}++; | ||
| 1337 | $param_flow_neutral->{_num_items} = $param_flow_neutral->{_num_items4names}; | ||
| 1338 | |||
| 1339 | # | ||
| 1340 | # for (my $i=0; $i<=$index;$i++) { | ||
| 1341 | # print("param_flow_neutral,stack_names_aref2, an accumulating array of arrays: @{$param_flow_neutral->{_names_aref2}} item $i\n"); | ||
| 1342 | # } | ||
| 1343 | |||
| 1344 | } | ||
| 1345 | else { | ||
| 1346 | print("param_flow_neutral,stack_names_aref2 missing names_aref \n"); | ||
| 1347 | } | ||
| 1348 | return (); | ||
| 1349 | } | ||
| 1350 | |||
| 1351 | =head2 sub stack_values_aref2 | ||
| 1352 | |||
| 1353 | i/p array ref for values in a program | ||
| 1354 | an array of arrays is created, one array for each item | ||
| 1355 | |||
| 1356 | DB | ||
| 1357 | #for (my $i=0; $i<=$index;$i++) { | ||
| 1358 | # print("param_flow_neutral,values_aref2,@{@{$param_flow_neutral->{_values_aref2}}[$i]} index $i\n"); | ||
| 1359 | #} | ||
| 1360 | #print("param_flow_neutral,values_aref2,num_items=$param_flow_neutral->{_num_items}\n"); | ||
| 1361 | # print("param_flow_neutral,values_aref2, index $index\n"); | ||
| 1362 | |||
| 1363 | =cut | ||
| 1364 | |||
| 1365 | sub stack_values_aref2 { | ||
| 1366 | |||
| 1367 | my ( $self, $values_aref ) = @_; | ||
| 1368 | |||
| 1369 | if ($values_aref) { | ||
| 1370 | |||
| 1371 | my $index = $param_flow_neutral->{_index4values} + 1; | ||
| 1372 | |||
| 1373 | $values[$index] = $values_aref; | ||
| 1374 | $param_flow_neutral->{_values_aref2} = \@values; | ||
| 1375 | |||
| 1376 | $param_flow_neutral->{_indices} = $index; | ||
| 1377 | $param_flow_neutral->{_index4values}++; | ||
| 1378 | $param_flow_neutral->{_num_items4values}++; | ||
| 1379 | $param_flow_neutral->{_num_items} = $param_flow_neutral->{_num_items4values}; | ||
| 1380 | |||
| 1381 | # print("param_flow_neutral,stack_values_aref2, values: @{$values[$index]},idx $index num_items $param_flow_neutral->{_num_items}\n"); | ||
| 1382 | |||
| 1383 | # for (my $i=0; $i<=$index;$i++) { | ||
| 1384 | # print("param_flow_neutral,stack_values_aref2, an accumulating array of arrays: @{$param_flow_neutral->{_values_aref2}} item $i\n"); | ||
| 1385 | # } | ||
| 1386 | |||
| 1387 | } | ||
| 1388 | else { | ||
| 1389 | print("param_flow_neutral,stack_values_aref2 missing values_aref \n"); | ||
| 1390 | } | ||
| 1391 | return (); | ||
| 1392 | } | ||
| 1393 | |||
| 1394 | =head2 sub view_data | ||
| 1395 | |||
| 1396 | Data viewer for debugging | ||
| 1397 | print("B4 delete: names are $param_flow_neutral->{_names_aref2}\n"); # ref_Array | ||
| 1398 | print("B4 delete: names are @{$param_flow_neutral->{_names_aref2}}\n"); # [ref_array0 ref_array1 .... | ||
| 1399 | print("B4 delete: names are @{$param_flow_neutral->{_names_aref2}}[0]\n"); # ref_array0 | ||
| 1400 | |||
| 1401 | print("B4 delete: names are @{$param_flow_neutral->{_names_aref2}}[1]\n"); #ref_array1 | ||
| 1402 | |||
| 1403 | print("B4 delete: names are @{@{$param_flow_neutral->{_names_aref2}}[0]}\n"); # all names in ref_array 0 | ||
| 1404 | print("B4 delete: names are @{@{$param_flow_neutral->{_names_aref2}}[1]}[0]\n"); # first name in ref_array | ||
| 1405 | print("param_flow_neutral,view_data: list for each item\n"); | ||
| 1406 | |||
| 1407 | =cut | ||
| 1408 | |||
| 1409 | sub view_data { | ||
| 1410 | my ($self) = @_; | ||
| 1411 | my @num_progs; | ||
| 1412 | |||
| 1413 | my $indices = $param_flow_neutral->{_indices}; | ||
| 1414 | $num_progs[0] = $param_flow_neutral->{_num_items}; | ||
| 1415 | |||
| 1416 | # $num_progs[1] = scalar ( @{$param_flow_neutral->{_names_aref2}} ); | ||
| 1417 | # $num_progs[3] = scalar ( @{$param_flow_neutral->{_values_aref2}} ); | ||
| 1418 | # $num_progs[4] = scalar ( @{$param_flow_neutral->{_checkbuttons_aref2}}); | ||
| 1419 | # $num_progs[5] = scalar ( @{$param_flow_neutral->{_prog_names_aref}}); | ||
| 1420 | |||
| 1421 | # print( "\n param_flow_neutral,_prog_names @{$param_flow_neutral->{_prog_names_aref}}\n" ); | ||
| 1422 | |||
| 1423 | # print("\nparam_flow_neutral,view_data:number of items in list in 4-5 different ways @num_progs \n"); | ||
| 1424 | # print("param_flow_neutral,view_data:max index = $indices \n\n"); | ||
| 1425 | |||
| 1426 | # print("param_flow_neutral,view_data, param_flow_neutral_ has hash=$param_flow_neutral\n "); | ||
| 1427 | |||
| 1428 | # print( "param_flow_neutral,view_data: prog_names: @{$param_flow_neutral->{_prog_names_aref}}\n" ); | ||
| 1429 | # for ( my $i = 0; $i <= $indices; $i++ ) { | ||
| 1430 | # print( "param_flow_neutral,view_data: names: @{@{$param_flow_neutral->{_names_aref2}}[$i]}\n" ); | ||
| 1431 | # print( "param_flow_neutral,view_data: values: @{@{$param_flow_neutral->{_values_aref2}}[$i]}\n" ); | ||
| 1432 | # | ||
| 1433 | # # print("param_flow_neutral,view_data: checkbuttons: @{@{$param_flow_neutral->{_checkbuttons_aref2}}[$i]}\n\n"); | ||
| 1434 | # } | ||
| 1435 | } | ||
| 1436 | |||
| 1437 | 1; |