with base_specific_domains; use base_specific_domains; with generator_support; use generator_support; -- ************************************************************************** -- Programmer Name : S. Phillips -- Program Name : abstract_interface_generator generic package specification -- Revision Number : Rev 1.0 -- Date Created : December 1, 1989 -- Function Description : This package specification contains generic -- instantiations which provide information needed to automatically -- generate the abstract interface (spec and body) and the concrete -- module. It is called by the abstract_interface description procedure -- written by the abstract interface programmer. --**************************************************************************** generic -- first parameter is name of the concrete_interface concrete_module_name : string; -- second parameter is name of the abstract_interface abstract_interface_name : string; dbms_specific_info_file : string; domain_package_names : domain_package_array; -- list of valid domain package names -- that apply to this interface type record_names is (<>); -- all records types to be declared type procedure_names is (<>); -- all procedures to be declared in the abstract interface spec type error_conditions_allowed is (<>); -- those errors expected from the database matching_sqlcode_values : num_errors; -- the implementation defined values of SQLCODE for those errors package abstract_interface_generator is -- the following generic is instantiated once for each -- record to be declared in the abstract interface specification generic type components_in_record is (<>); -- an enumerated list of all component names record_name : record_names; -- the records type is_string_indicator_record : boolean := false; -- if this is a record for holding only string indicators -- only component names are needed so no further instantiation -- is done package record_generator is -- The following generic is instantiated once for each component in the record generic component_name : components_in_record; -- one of the valid components of this record component_domain_type : base_specific_domain_types := null_domain_type; -- the type of this component .. must be -- a valid domain which pertains to this interface or null_domain_type when the record -- is being used to return string indicator values package component_generator is end component_generator; procedure generate_record; end record_generator; -- the following generic, procedure_with_parameters_generator, is instantiated -- once for each procecdure in the interface that has parameters type valid_error_array is array (positive range <>) of error_conditions_allowed; null_array : valid_error_array(1..1); generic procedure_name : procedure_names; -- one of the previously defined procedure names type parameters is (<>); -- list of all parameters for this procedure sql_statement_type : sql_statement_types; -- what type of SQL statement is this procedure mapped to sql_module_procedure_name : string; -- the module procedure name to call type params_to_concrete_procedure is (<>); -- List of the parameters to the concrete -- procedure. Validity of each parameter will -- be checked at runtime. This list must be -- in the order they will be sent to the concrete -- procedure. The sqlcode and indicator variables -- parameter will be generated automatically and are -- not contained in this list. Only those parameters -- that are record components or parameters to the -- abstract procedure are included here. valid_errors : valid_error_array := null_array; package procedure_with_parameters_generator is -- The following generics are instantiated for each parameter in a -- procedure. The type of the parameter will determine which -- generic is instantiated; generic params : parameters; -- one of the previously defined parameters for this procedure its_type : base_specific_domain_types; -- must be a type valid for this application -- Note simple parameters of a domain type are only of mode 'in' -- all out parameters are record components package params_of_domain_type_generator is end params_of_domain_type_generator; generic params : parameters; -- one of the previously defined parameters for this procedure -- Note record parameters are always mode 'in out' its_type : record_names; package params_of_record_type_generator is end params_of_record_type_generator; generic params : parameters; -- don't need its mode becuase result parameters are -- always out parameters package params_of_boolean_type_generator is end params_of_boolean_type_generator; generic params : parameters; -- don't need its mode becuase result parameters are -- always out parameters -- don't need its type because it is always of type -- "valid_status_result_type" package params_of_error_conditions_generator is end params_of_error_conditions_generator; procedure generate_procedure; -- procedure to actually generate the procedure declarations end procedure_with_parameters_generator; -- the following generic, procedure_without_parameters_generator, is instantiated -- once for each procecdure in the interface that has no parameters generic procedure_name : procedure_names; -- one of the previously defined procedure names sql_statement_type : sql_statement_types; sql_module_procedure_name : string; -- the module procedure name to call package procedure_without_parameters_generator is procedure generate_procedure; end procedure_without_parameters_generator; -- This procedure is the last call made by the interface programmers description -- program. It must be included in each interface description program. procedure generate_interface; end abstract_interface_generator;