DOCUMENTATION
SYNOPSIS
Perl package: config_superflows.pm
AUTHOR: Juan Lorenzo
DATE: June 22 2017
DESCRIPTION:
V 0.1 June 22 2017
V 0.2 June 23 2017
change class name from sunix.pm
USED FOR:
BASED ON: param_sunix
inherits from: param_sunix (e.g., sub first_idx)
TODO: fully inherit from param_sunix
private hash_ref
for widgets
sub _get_program_name
sub length
length is not the last index but one beyond
print("config_superflows, lengthis $config_superflows->{_length}\n");
print("config_superflows, length (x2) is $config_superflows->{_length}\n");
TODO: subroutine will fail unless _defaults are first called
export all the private hash references
sub _local_or_defaults
Read a default specification file
If default specification file# does not exist locally,
which is in PL_SEISMIC for general superflow conguration files
and and in legacy cases for Project.config
If Project.config is not found check the user's configuration area: .LSU/configuration/active/Project.config
and if not,
then use the default one defined under global libs
Similary if a general superflow.configuration file is not found under PL_SEISMIC
check for one default case under global libs
Debug with
print ("self is $self,program is $program_name\n");
print("params are @$ref_CFG\n");
program name is a hash
print("params are @$ref_cfg\n");
print ("self is $self,program is $program_name\n");
print("config_superflows,_local_or_defaults,program_name:$$program_name_sref\n");
print("config_superflows,_local_or_defaults,program_name:$$name_sref\n");
print("config_superflows,_local_or_defaults,program_name:$$program_name_sref\n");
sub get_local_or_defaults
via big_streams_param:
Read a default specification file
1) If default specification file does not exist locally (PL_SEISMIC),
2) then check the user's configuration area: .LSU/configuration/active/Project.config
and if if still does not exist there,
3) then use the default one defined under global libs.
Debug with
print ("self is $self,program is $program_name\n");
print("params are @$ref_CFG\n");
program name is a hash
print("params are @$ref_cfg\n");
print ("self is $self,program is $program_name\n");
print("config_superflows,get_local_or_defaults,program_name:$$program_name_sref\n");
print("config_superflows,get_local_or_defaults,program_name:$$name_sref\n");
print("config_superflows,get_local_or_defaults,program_name:$$program_name_sref\n");
print("config_superflows,get_local_or_defaults, length:$config_superflows->{_length}\n");
sub save
i/p: has a reference with the names values and program name
names are in an array reference
values are too
no need for checkbuttons
# print("config_superflows,save\nprog_name: ${$out_hash_ref->{_prog_name}}");
# print(" labels: @{$out_hash_ref->{_ref_labels}}\n");
# print(" values: @{$out_hash_ref->{_ref_values}}\n");
sub set_program_name
i/p is scalar ref
o/p is scalar ref
print("config_superflows, program_name,:$alias->{ProjectVariables}\n");
sub first_idx
first usable index is set to 0
sub set_prog_name_config
needs $config_superflows->{_program_name_sref}
sub inbound
print("config_superflows, inbound, prog_name: $prog_name\n");
print("config_superflows, inbound, outbound: $config_superflows->{_program_name_config}\n");
print("config_superflows, inbound, outbound: $config_superflows->{_inbound}\n");
sub check2read
needs $config_superflows->{_inbound} first look in $PL_SEISMIC and then look in the default global library