buds
0.1
FORTRAN reference counted types
|
Perform file operations such as open/close/delete etc.
Exposes functionality regarding files. It allows interaction with the files in a standard way by opening, closing, deleting files in a simple and clean interface.
Modules | |
module | bud_file |
Data Types | |
type | file |
File bud. More... | |
interface | new |
Create a new file bud. More... | |
interface | new_file |
See interface new More... | |
interface | open |
Open file via object. More... | |
interface | close |
Close file via object. More... | |
interface | rewind |
Rewind file to the beginning of the file. More... | |
interface | backspace |
Backspace the file. More... | |
interface | unopened_unit |
Retrieve new unused unit (global function) More... | |
interface | filename |
Query filename of the file bud. More... | |
interface | get_unit |
Unit of opened file bud. More... | |
interface | unit |
See interface #get_unit More... | |
interface | is_open |
Query whether file is open. More... | |
interface | exists |
Query whether file exists. More... | |
interface | is_direct |
Query file opened in DIRECT mode. More... | |
interface | is_sequential |
Query file opened in SEQUENTIAL mode. More... | |
interface | is_formatted |
Query file opened in FORMATTED mode. More... | |
interface | is_unformatted |
Query file opened in UNFORMATTED mode. More... | |
interface | get_stat |
Status of the latest action with iostat. More... | |
interface | file_delete |
Delete file on disk. More... | |
interface | |
Print, to std-out, some basic information of the data-container. More... | |
interface | assignment(=) |
Assignment of bud to another bud. More... | |
interface | initialize |
Initialization of data container. More... | |
interface | is_initialized |
Query whether bud is associated with any data. More... | |
interface | initialized |
See interface is_initialized More... | |
interface | is_initd |
See interface is_initialized More... | |
interface | is_same |
Check whether two buds point to the same data (function) More... | |
interface | same |
See interface #is_same More... | |
interface | delete |
Deletes the bud by decreasing references to the underlying data. More... | |
interface | nullify |
Nullifies the current bud. More... | |
interface | references |
Query number of references to the bud. More... | |
interface | refs |
See interface #references More... | |
Functions/Subroutines | |
procedure, public | delete => delete_ |
See interface delete More... | |
procedure, public | nullify => nullify_ |
See interface nullify More... | |
procedure, public | initialize => initialize_ |
See interface initialize More... | |
procedure, public | is_initialized => is_initialized_ |
See interface is_initialized More... | |
procedure, public | is_initd => is_initialized_ |
See interface is_initialized More... | |
procedure, public | initialized => is_initialized_ |
See interface is_initialized More... | |
procedure, public | is_same => is_same_ |
See interface is_same More... | |
procedure, public | same => is_same_ |
See interface is_same More... | |
procedure, public | references => references_ |
See interface references More... | |
procedure, public | refs => references_ |
See interface references More... | |
procedure, public | print => print_ |
See interface print More... | |
procedure, public | new => new_ |
See interface new More... | |
procedure, public | open => open_ |
See interface open More... | |
procedure, public | close => close_ |
See interface close More... | |
procedure, public | rewind => rewind_ |
See interface rewind More... | |
procedure, public | backspace => backspace_ |
See interface backspace More... | |
procedure, public | file => filename_ |
See interface filename More... | |
procedure, public | name => filename_ |
See interface filename More... | |
procedure, public | filename => filename_ |
See interface filename More... | |
procedure, public | unit => get_unit_ |
See interface get_unit More... | |
procedure, nopass, public | unopened_unit => unopened_unit_ |
See interface unopened_unit More... | |
procedure, public | is_open => is_open_ |
See interface is_open More... | |
procedure, public | exists => exists_ |
See interface exists More... | |
procedure, public | file_delete => file_delete_ |
See interface file_delete More... | |
procedure, public | stat => get_stat_ |
See interface get_stat More... | |
subroutine | new_ (this, filename) |
subroutine | new_ (this, filename) |
subroutine | open_ (this, D, form, access, action, status) |
subroutine | close_ (this) |
subroutine | rewind_ (this) |
subroutine | backspace_ (this, n) |
integer function | unopened_unit_ () |
pure character(len=len_trim(this%d%file)) function | filename_ (this) |
integer function | get_unit_ (this) |
integer function | get_unit_ (this) |
logical function | is_open_ (this) |
logical function | exists_ (this) |
logical function | is_direct_ (this) |
logical function | is_sequential_ (this) |
logical function | is_formatted_ (this) |
logical function | is_unformatted_ (this) |
integer function | get_stat_ (this) |
subroutine | file_delete_ (this) |
subroutine | print_ (this, info, indent) |
subroutine | assign_ (lhs, rhs) |
subroutine | initialize_ (this) |
pure logical function | is_initialized_ (this) |
pure logical function | is_initialized_ (this) |
pure logical function | is_initialized_ (this) |
elemental logical function | is_same_ (lhs, rhs) |
elemental logical function | is_same_ (lhs, rhs) |
subroutine | delete_ (this) |
elemental subroutine | nullify_ (this) |
elemental integer function | references_ (this) |
elemental integer function | references_ (this) |
subroutine | initialize_ (this) |
pure logical function | is_initialized_ (this) |
elemental logical function | is_same_ (lhs, rhs) |
subroutine | delete_ (this) |
elemental subroutine | nullify_ (this) |
subroutine | assign_ (lhs, rhs) |
elemental integer function | references_ (this) |
subroutine | new_ (this, filename) |
integer function | unopened_unit_ () |
pure character(len=len_trim(this%d%file)) function | filename_ (this) |
integer function | get_unit_ (this) |
logical function | is_open_ (this) |
logical function | exists_ (this) |
logical function | is_direct_ (this) |
logical function | is_sequential_ (this) |
logical function | is_formatted_ (this) |
logical function | is_unformatted_ (this) |
integer function | get_stat_ (this) |
subroutine | open_ (this, D, form, access, action, status) |
subroutine | close_ (this) |
subroutine | rewind_ (this) |
subroutine | backspace_ (this, n) |
subroutine | file_delete_ (this) |
subroutine | print_ (this, info, indent) |
Variables | |
integer, parameter, private | bud_id_len = 36 |
Size of ID parameter for bud data-containers. More... | |
character(len=*), parameter, private | bud_mod = "bud_" // "bud_File" |
Name of module. More... | |
character(len=*), parameter, private | bud_type = "File" |
Name of bud in this module. More... | |
integer, parameter | file_name_len = 256 |
Maximum path length for the filenames. More... | |
type(file_), pointer | d => null() |
Stored pointer which contains the reference counting etc. More... | |
[in,out] | lhs | contains rhs after exit |
[in] | rhs | copy the containing element bud |
|
private |
[in,out] | lhs | contains rhs after exit |
[in] | rhs | copy the containing element bud |
procedure, public backspace | ( | ) |
See interface backspace
|
private |
[in,out] | this | file bud |
[in] | n | optional=1 number of times to backspace |
|
private |
[in,out] | this | file bud |
[in] | n | optional=1 number of times to backspace |
procedure, public close | ( | ) |
See interface close
|
private |
[in,out] | this | file bud |
|
private |
[in,out] | this | file bud |
procedure, public delete | ( | ) |
See interface delete
|
private |
[in,out] | this | returned bud is un-initialized with no data associated |
|
private |
[in,out] | this | returned bud is un-initialized with no data associated |
procedure, public exists | ( | ) |
See interface exists
|
private |
[in] | this | file bud |
.true.
if the file exists on disk
|
private |
[in] | this | file bud |
.true.
if the file exists on disk procedure, public file | ( | ) |
See interface filename
procedure, public file_delete | ( | ) |
See interface file_delete
|
private |
[in,out] | this | file bud |
|
private |
[in,out] | this | file bud |
procedure, public filename | ( | ) |
See interface filename
|
private |
[in] | this | query filename from this file bud |
|
private |
[in] | this | query filename from this file bud |
|
private |
[in] | this | file bud |
|
private |
[in] | this | file bud |
|
private |
[in] | this | file bud |
|
private |
[in] | this | file bud |
|
private |
[in] | this | file bud |
procedure, public initialize | ( | ) |
See interface initialize
|
private |
[in,out] | this | bud that is initialized |
|
private |
[in,out] | this | bud that is initialized |
procedure, public initialized | ( | ) |
See interface is_initialized
|
private |
[in] | this | file bud |
.true.
if the file is opened in access=DIRECT mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in access=DIRECT mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in form=FORMATTED mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in form=FORMATTED mode procedure, public is_initd | ( | ) |
See interface is_initialized
procedure, public is_initialized | ( | ) |
See interface is_initialized
|
private |
[in] | this | check if this bud is initialized |
.true.
if it is associated, else .false.
|
private |
[in] | this | check if this bud is initialized |
.true.
if it is associated, else .false.
|
private |
[in] | this | check if this bud is initialized |
.true.
if it is associated, else .false.
|
private |
[in] | this | check if this bud is initialized |
.true.
if it is associated, else .false.
procedure, public is_open | ( | ) |
See interface is_open
|
private |
[in] | this | file bud |
.true.
if the file is opened
|
private |
[in] | this | file bud |
.true.
if the file is opened procedure, public is_same | ( | ) |
See interface is_same
|
private |
[in] | lhs | first bud |
[in] | rhs | second bud |
.true.
if lhs
and rhs
point to the same data
|
private |
[in] | lhs | first bud |
[in] | rhs | second bud |
.true.
if lhs
and rhs
point to the same data
|
private |
[in] | lhs | first bud |
[in] | rhs | second bud |
.true.
if lhs
and rhs
point to the same data
|
private |
[in] | this | file bud |
.true.
if the file is opened in access=SEQUENTIAL mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in access=SEQUENTIAL mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in form=UNFORMATTED mode
|
private |
[in] | this | file bud |
.true.
if the file is opened in form=UNFORMATTED mode procedure, public name | ( | ) |
See interface filename
procedure, public new | ( | ) |
See interface new
|
private |
[in,out] | this | file bud |
[in] | filename | the path this will contain |
|
private |
[in,out] | this | file bud |
[in] | filename | the path this will contain |
|
private |
[in,out] | this | file bud |
[in] | filename | the path this will contain |
procedure, public nullify | ( | ) |
See interface nullify
|
private |
[in,out] | this | nullify references from this bud |
|
private |
[in,out] | this | nullify references from this bud |
procedure, public open | ( | ) |
See interface open
|
private |
[in,out] | this | file bud |
[in] | D | (dummy argument which should NEVER be used, forces explicit interface usage) |
[in] | form | optional='FORMATTED' format of opened file |
[in] | access | optional='SEQUENTIAL' file access pattern |
[in] | action | optional='READWRITE' file R/W access |
[in] | status | optional='OLD' file-existance |
|
private |
[in,out] | this | file bud |
[in] | D | (dummy argument which should NEVER be used, forces explicit interface usage) |
[in] | form | optional='FORMATTED' format of opened file |
[in] | access | optional='SEQUENTIAL' file access pattern |
[in] | action | optional='READWRITE' file R/W access |
[in] | status | optional='OLD' file-existance |
procedure, public print | ( | ) |
See interface print
|
private |
[in] | this | data type |
[in] | info | optional="File" additional information printed |
[in] | indent | optional=1 possible indentation of printed statement |
|
private |
[in] | this | data type |
[in] | info | optional="File" additional information printed |
[in] | indent | optional=1 possible indentation of printed statement |
procedure, public references | ( | ) |
See interface references
|
private |
[in] | this | reference counted bud |
this
has been referenced
|
private |
[in] | this | reference counted bud |
this
has been referenced
|
private |
[in] | this | reference counted bud |
this
has been referenced procedure, public refs | ( | ) |
See interface references
procedure, public rewind | ( | ) |
See interface rewind
|
private |
[in,out] | this | file bud |
|
private |
[in,out] | this | file bud |
procedure, public same | ( | ) |
See interface is_same
procedure, public stat | ( | ) |
See interface get_stat
procedure, public unit | ( | ) |
See interface get_unit
procedure, nopass, public unopened_unit | ( | ) |
See interface unopened_unit
|
private |
|
private |
|
private |
Size of ID parameter for bud data-containers.
|
private |
Name of module.
|
private |
Name of bud in this module.
|
private |
Stored pointer which contains the reference counting etc.
|
private |
Maximum path length for the filenames.