|
GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis 111
|
This object provides access to the data stored on the data file. The first record on the file is the identifier given by the constant data_file_obj_id. The next record is the number of data sets (headers) stored on the file. After that the header of the first (if any) data set follows. More...
Public Member Functions | |
| procedure | open (this, path) |
| Opens the file for stream access given its path. If the file does not exist then a new one is created, otherwise the file is opened in the append mode and the existing headers for the data sets are read-in and printed out on screen. | |
| procedure | get_unit_no (this) |
| Returns the unit number associated with the file. | |
| procedure | get_file_name (this) |
| Returns the path associated with the file. | |
| procedure | start_record (this, header) |
| Writes a new header on the file and returns the value first_record which belongs to the new header. This value can be used by other routines to write the actual data to the file starting on the position first_record. Each record must be terminated by a call to close_record with the values corresponding to the starting and final positions of the actual data record. | |
| procedure | close_record (this, header, first_record, last_record) |
| Completes the given record given its header and the positions of the start and end of the data record. | |
| procedure | remove_last_record (this) |
| Removes the last header from the file: this can be useful when working with files that contain a broken last record. | |
| procedure | print_headers (this) |
| Prints on the screen the header data. | |
| procedure | find_header (this, header, first_record, last_record) |
| Attempts to find the specified header and returns the positions of start and end of the corresponding data record. | |
| procedure | get_header_containing (this, data_header, str1, str2) |
| Returns the header containing the specified strings. Returns 0 if a unique matching header has been found and returns a non-zero number (error number) if not. | |
| procedure | get_header (this, i, data_header) |
| Returns the header with the given sequence number. | |
| procedure | get_no_headers (this) |
| Returns the number of headers on the file. | |
| procedure | close (this) |
| Closes the data file. | |
Public Attributes | |
| character(len=line_len) | identifier |
| Data file version. | |
This object provides access to the data stored on the data file. The first record on the file is the identifier given by the constant data_file_obj_id. The next record is the number of data sets (headers) stored on the file. After that the header of the first (if any) data set follows.
| procedure data_file_gbl::data_file_obj::close | ( | class(data_file_obj) | this | ) |
Closes the data file.
| procedure data_file_gbl::data_file_obj::close_record | ( | class(data_file_obj) | this, |
| character(len=*), intent(in) | header, | ||
| integer, intent(in) | first_record, | ||
| integer, intent(in) | last_record ) |
Completes the given record given its header and the positions of the start and end of the data record.
| procedure data_file_gbl::data_file_obj::find_header | ( | class(data_file_obj) | this, |
| character(len=*), intent(in) | header, | ||
| integer, intent(out) | first_record, | ||
| integer, intent(out) | last_record ) |
Attempts to find the specified header and returns the positions of start and end of the corresponding data record.
| procedure data_file_gbl::data_file_obj::get_file_name | ( | class(data_file_obj) | this | ) |
Returns the path associated with the file.
| procedure data_file_gbl::data_file_obj::get_header | ( | class(data_file_obj) | this, |
| integer, intent(in) | i, | ||
| type(data_header_obj), intent(out) | data_header ) |
Returns the header with the given sequence number.
| procedure data_file_gbl::data_file_obj::get_header_containing | ( | class(data_file_obj) | this, |
| type(data_header_obj), intent(out) | data_header, | ||
| character(len=*), intent(in) | str1, | ||
| character(len=*), intent(in), optional | str2 ) |
Returns the header containing the specified strings. Returns 0 if a unique matching header has been found and returns a non-zero number (error number) if not.
| procedure data_file_gbl::data_file_obj::get_no_headers | ( | class(data_file_obj) | this | ) |
Returns the number of headers on the file.
| procedure data_file_gbl::data_file_obj::get_unit_no | ( | class(data_file_obj) | this | ) |
Returns the unit number associated with the file.
| procedure data_file_gbl::data_file_obj::open | ( | class(data_file_obj) | this, |
| character(len=*), intent(in) | path ) |
Opens the file for stream access given its path. If the file does not exist then a new one is created, otherwise the file is opened in the append mode and the existing headers for the data sets are read-in and printed out on screen.
| procedure data_file_gbl::data_file_obj::print_headers | ( | class(data_file_obj) | this | ) |
Prints on the screen the header data.
| procedure data_file_gbl::data_file_obj::remove_last_record | ( | class(data_file_obj) | this | ) |
Removes the last header from the file: this can be useful when working with files that contain a broken last record.
| procedure data_file_gbl::data_file_obj::start_record | ( | class(data_file_obj) | this, |
| character(len=*), intent(in) | header ) |
Writes a new header on the file and returns the value first_record which belongs to the new header. This value can be used by other routines to write the actual data to the file starting on the position first_record. Each record must be terminated by a call to close_record with the values corresponding to the starting and final positions of the actual data record.
| character(len=line_len) data_file_gbl::data_file_obj::identifier |
Data file version.