![]() |
Section 8.10.1.5: |
This abstract class defines a state component which is a set of all instantiations of objects of any class sub-typing from this class in addition to the vdm model types used wherever this class name is used. Note that SAME has to be an instantiated class, not an abstract one.
NOTE | See the important note about vdm state in the notes on vdm-sl usage in this specification. |
This abstraction models a cursor which indicates a particular position in a very large storage file. It is defined in order to enable programs to handle large files for which there is insufficient space in computer system memory.
This feature provides the current size of the associated file.
The pre-condition is vacuously true since the cursor cannot be created unless the file exists (see the cursor feature of the class BIN_FILE for example).
The result, in the absence of filing system errors, is the size of the associated file in octets.
This feature returns the size of the associated file. The value provided is the same as that which could be obtaines by enquiring of the file directly.
This predicate returns true if and only if the associated file is readable. It provides the same answer as would be provided by a direct enquiry of the associated file.
Being a predicate the pre-condition is vacuously true.
Being a predicate the post-condition is also vacuously true.
This feature returns true if and only if the associated file is readable, otherwise false.
This predicate returns true if and only if the associated file is writable. It provides the same answer as would be provided by a direct enquiry of the associated file.
Being a predicate the pre-condition is vacuously true.
Being a predicate the post-condition is also vacuously true.
This feature returns true if and only if the associated file is writable, otherwise false.
This predicate returns true if and only if the cursor is positioned at the end of the associated file.
Being a predicate the pre-condition is vacuously true.
Being a predicate the post-condition is also vacuously true.
This feature returns true if and only if the cursor is positioned at the end of the file.
This routine returns the current position of the cursor in the file in storage units.
This feature is defined irrespective of pre-condition.
This feature provides the numeric value of the position of the cursor in the associated file based on an offset from the first position in the file which is position 0.
This feature is the writer routine corresponding to the above reader routine, enabling the cursor position in the associated file to be adjusted to the given offset from the beginning.
This feature provides the facility to set a new current position of the cursor in the file to be the value given as an offset in storage units (number of octets) from the beginning of the file, returning the modified cursor resulting from this.
This feature provides for relative positioning within a file from the current position to a new position count storage units (octets) nearer to the end of the file.
This feature provides the facility to set a new current position of the cursor in the file to be the value given as an offset in storage units (number of octets) from the current position in the file, returning the modified cursor resulting from this.
This feature provides for relative positioning within a file from the current position to a new position count storage units (octets) closer to the beginning of the file.
This feature provides the facility to set a new current position of the cursor in the file to be the value given as an offset in storage units (number of octets) towards the beginning of the file from the current position, returning the modified cursor resulting from this.
This feature provides a facility for skipping a given number of stored items (which need not all be of the same storage size). If there are insufficient items remaining in the file then void is returned instead of the modified cursor.
Since the size of the underlying stored items may be variable, the pre-condition cannot guarantee that there will be no problem; any problem has to be detected dynamically during program execution (see post-condition below).
If there are insufficient stored items remaining in the file beyond the current position then the return value is nil, otherwise the modified cursor repositioned as requested.
This feature provides a facility to move forward by a number of stored items in the file rather than in terms of storage units. Only where storage units are identical in storage size to the stored items will this be equivalent to the forward feature above.
This predicate may be used to determine whether there has been a problem relating to the file with which this cursor and buffer are associated.
Being a predicate the pre-condition is vacuously true.
Being a predicate the post-condition is also vacuously true.
This feature provides an indication whether some error in the program environment has affected the behaviour of the buffer since either creation or the most recent use of the clear feature defined below.
This feature provides a program environment dependent string indicating the nature of any error which may have been detected. Note that the message only refers to the latest error (if any) in an environment-defined manner.
This feature provides an indication whether some error in the program environment has affected the behaviour of the buffer since either creation or the most recent prior use of the clear feature defined below.
This feature clears any error which may have occurred in the underlying file system in relation to the file which is associated with this cursor and buffer.
This feature provides a way of clearing any error which may have occurred in relation to the file with which this cursor and buffer are associated.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Input/Output Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Friday, 3 March 2000. |
![]() |