Creates a new function format.
a0tError | a0NewFunctionFormat( | | | |
| | a0tFormat | *newform, | |
| | a0tPackFunction | packfun, | |
| | a0tPackFunction | unpackfun, | |
| | a0tSizeFunction | sizefun, | |
| | a0tOffsetFunction | offsetfun );
| |
| Name | rd/wr | Description |
| newform | write | Format descriptor to set up. |
| packfun | read | Function to pack data. |
| unpackfun | read | Function to unpack data. |
| sizefun | read | Function to get format size. |
| offsetfun | read | Function to get element offset. |
This function composes a new function format descriptor. The first two functions given must pack and unpack the user defined complex format, by the means of more elementary formats, using the functions a0FPack() and a0FUnpack(). Two more functions must be supplied: the format size function and element offset function. The Athapascan-0 Formats functions that need to send, receive, pack, unpack, put or get the complex formatted data will call the given functions of the format. They must implement what follows:
On return of this function, the variable pointed by newform contains a format descriptor to the new function format created.
| Error Code | Description |
A0ErrNoMem | There is no memory to allocate new format. | |
A0ErrInvFormat | The base format has an invalid type. | |
A0ErrNotImplem | The new format has an unimplemented type. | |
A0ErrOk| Successful completion. | |
a0UseFormats() a0NewMapFormat() a0DisposeFormat() a0FPack() a0FUnpack() a0FSend() a0FReceive() a0FPut() a0FGet() a0IFSend() a0IFReceive() a0IFPut() a0IFGet()