# Section 8.11.3.4:
PHONE_NO

###### class PHONE_NO < $ANCHORED_FMT, $MULTI_STR

#### Formal Types

types
SAME = NAME ;
NAME ::
country : STR
area : STR
local : STR
number : STR
extension : STR
access : STR

This class implements the concept of a telephone number as specified in the draft international standard ISO/IEC 14652.

#### External specifications

The following features are required to be implemented for this class in accordance with the specifications given in $STR :-

- str(lib : LIBCHARS) : STR
- str : STR

The following feature is required to be implemented for this class in accordance with the specification given in $FMT :-

- build(str : STR_CURSOR) : SAME

The following features are required to be implemented for this class in accordance with the specifications given in $ANCHORED_FMT :-

- fmt(descr : ANCHORED_DESCR, lib : LIBCHARS) : STR
- fmt(descr : ANCHORED_DESCR) : STR

The following features are required to be implemented for this class in accordance with the specifications given in $MULTI_STR :-

- render(component : STR, lib : LIBCHARS) : STR
- render(component : RUNES, romanize : BOOL) : STR
- as_runes(component : RUNES, romanize : BOOL) : RUNES
- runes : RUNES
- fmt_runes(descr : ANCHORED_DESCR, lib : LIBCHARS) : RUNES
- fmt_runes(descr : ANCHORED_DESCR) : RUNES

#### Reader/Writer pairs

The class is required to have readers and writers for each of the following features. There are neither pre nor post conditions required for either reader or writer for these features.

- country : STR
- area : STR
- local : STR
- number : STR
- extension : STR
- access : STR

#### create

This feature provides a new phone number object with all of its components set to void. It should be noted that the access component is culturally-defined.

create | : SAME

##### Formal Signature

create() res : SAME

##### Pre-condition

Because this creation feature has no arguments and there is, as yet, no object, the pre-condition is vacuously true.

##### Post-condition

post res.country = nil
and res.area = nil
and res.local = nil
and res.number = nil
and res.extension = nil
and res.access = nil

This creation routine creates a new object for which all components are void.

| Language Index |  | Library Index |  | Non-numeric Index

Comments or enquiries should be made to Keith Hopper. Page last modified: Wednesday, 22 November 2000. |