Pointwise Plugin SDK
|
Classes | |
struct | PWU_UNFDATA |
Unformatted file data block. More... | |
Functions | |
PWP_BOOL | PwuUnfFileBegin (FILE *fp, PWU_UNFDATA *pUData) |
Prepares a PWU_UNFDATA block for a new unformatted file I/O session. More... | |
PWP_BOOL | PwuUnfFileEnd (PWU_UNFDATA *pUData) |
Finalize an unformatted file I/O session. More... | |
PWP_ENDIANNESS | PwuUnfFileGetEndianness (PWU_UNFDATA *pUData) |
Get the output endianness setting for this PWU_UNFDATA block. More... | |
PWP_ENDIANNESS | PwuUnfFileSetEndianness (PWU_UNFDATA *pUData, PWP_ENDIANNESS endianness) |
Set the output endianness. More... | |
PWP_BOOL | PwuUnfHadError (PWU_UNFDATA *pUData) |
Check if an unformatted file I/O session has detected any errors. More... | |
PWP_BOOL | PwuUnfRecBegin (PWU_UNFDATA *pUData) |
Prepares a PWU_UNFDATA block for writing a new unformatted data record. More... | |
PWP_BOOL | PwuUnfRecBeginFixed (PWU_UNFDATA *pUData, PWP_UINT32 bytes, PWP_UINT32 count) |
Prepares a PWU_UNFDATA block for writing a new unformatted data record when the amount of data being written is known ahead of time. More... | |
PWP_UINT32 | PwuUnfRecBytes (PWU_UNFDATA *pUData) |
Get the running total number of bytes written to the current record during an unformatted file I/O session. More... | |
PWP_UINT32 | PwuUnfRecCount (PWU_UNFDATA *pUData) |
Get the running total number of finalized records written during an unformatted file I/O session. More... | |
PWP_BOOL | PwuUnfRecEnd (PWU_UNFDATA *pUData) |
Finalize the current record write. More... | |
PWP_BOOL | PwuUnfRecWriteArr (PWU_UNFDATA *pUData, const void *arr, size_t itemSize, size_t itemCnt) |
Write an array of data to the current record. More... | |
PWP_BOOL | PwuUnfRecWriteBuf (PWU_UNFDATA *pUData, const void *buf, size_t size) |
Write a data buffer to the current record. More... | |
PWP_BOOL | PwuUnfRecWriteEndianBuf (PWU_UNFDATA *pUData, const void *buf, size_t size) |
Write a data buffer to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteFLOAT (PWU_UNFDATA *pUData, PWP_FLOAT val) |
Write a PWP_FLOAT value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteINT (PWU_UNFDATA *pUData, PWP_INT val) |
Write a PWP_INT value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteINT16 (PWU_UNFDATA *pUData, PWP_INT16 val) |
Write a PWP_INT16 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteINT32 (PWU_UNFDATA *pUData, PWP_INT32 val) |
Write a PWP_INT32 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteINT64 (PWU_UNFDATA *pUData, PWP_INT64 val) |
Write a PWP_INT64 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteINT8 (PWU_UNFDATA *pUData, PWP_INT8 val) |
Write a PWP_INT8 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteREAL (PWU_UNFDATA *pUData, PWP_REAL val) |
Write a PWP_REAL value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteUINT (PWU_UNFDATA *pUData, PWP_UINT val) |
Write a PWP_UINT value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteUINT16 (PWU_UNFDATA *pUData, PWP_UINT16 val) |
Write a PWP_UINT16 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteUINT32 (PWU_UNFDATA *pUData, PWP_UINT32 val) |
Write a PWP_UINT32 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteUINT64 (PWU_UNFDATA *pUData, PWP_UINT64 val) |
Write a PWP_UINT64 value to the current record with endian order applied. More... | |
PWP_BOOL | PwuUnfRecWriteUINT8 (PWU_UNFDATA *pUData, PWP_UINT8 val) |
Write a PWP_UINT8 value to the current record with endian order applied. More... | |
PWP_UINT32 | PwuUnfTotRecBytes (PWU_UNFDATA *pUData) |
Get the running total number of bytes written to all records during an unformatted file I/O session. More... | |
Unformatted FORTRAN file I/O utility functions and data-types.
PWP_BOOL PwuUnfFileBegin | ( | FILE * | fp, |
PWU_UNFDATA * | pUData | ||
) |
Prepares a PWU_UNFDATA block for a new unformatted file I/O session.
fp | The file pointer used for writing. The file must be open and ready for write before calling this function. The file position is not changed by this call. |
pUData | Pointer to an uninitialized I/O control block. |
Definition at line 359 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fp, PWP_FALSE, PWP_TRUE, and unfUDataInit().
Referenced by PwpUnformattedWriter::PwpUnformattedWriter().
PWP_BOOL PwuUnfFileEnd | ( | PWU_UNFDATA * | pUData | ) |
Finalize an unformatted file I/O session.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfFileBegin(). |
Definition at line 594 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fp, PWU_UNFDATA::hadError, PWP_FALSE, PwuUnfRecEnd(), STAT_CLOSED, and PWU_UNFDATA::status.
Referenced by PwpUnformattedWriter::~PwpUnformattedWriter().
PWP_ENDIANNESS PwuUnfFileGetEndianness | ( | PWU_UNFDATA * | pUData | ) |
Get the output endianness setting for this PWU_UNFDATA block.
pUData | Pointer to an I/O control block initialized by a call to PwuUnfFileBegin(). |
Definition at line 352 of file apiPWPUtils.cxx.
References PWU_UNFDATA::endianness, and PWP_ENDIAN_ERROR.
PWP_ENDIANNESS PwuUnfFileSetEndianness | ( | PWU_UNFDATA * | pUData, |
PWP_ENDIANNESS | endianness | ||
) |
Set the output endianness.
The endianness will apply to all (future) writes using this PWU_UNFDATA block.
pUData | Pointer to an I/O control block initialized by PwuUnfFileBegin(). |
endianness | The endianness flag. See notes. |
PWP_ENDIAN_LITTLE
- force output to little endian PWP_ENDIAN_BIG
- force output to big endian PWP_ENDIAN_NATIVE
- force output to OS's native endianness PWP_ENDIAN_FOREIGN
- force output to OS's non-native endianness Definition at line 340 of file apiPWPUtils.cxx.
References PWU_UNFDATA::endianness, PWP_ENDIAN_ERROR, and UDATA_ISOPEN.
Referenced by PwpUnformattedWriter::beginRecord().
PWP_BOOL PwuUnfHadError | ( | PWU_UNFDATA * | pUData | ) |
Check if an unformatted file I/O session has detected any errors.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfFileBegin(). |
Definition at line 609 of file apiPWPUtils.cxx.
References PWU_UNFDATA::hadError, and UDATA_ISINIT.
PWP_BOOL PwuUnfRecBegin | ( | PWU_UNFDATA * | pUData | ) |
Prepares a PWU_UNFDATA block for writing a new unformatted data record.
pUData | Pointer to an I/O control block initialized by a call to PwuUnfFileBegin(). |
Definition at line 428 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fixedBytes, PWU_UNFDATA::fp, PWU_UNFDATA::fPos, PWU_UNFDATA::hadError, PWU_UNFDATA::inRec, PWP_FALSE, PWP_TRUE, pwpFileGetpos(), PwuUnfRecEnd(), PWU_UNFDATA::recBytes, UDATA_ISOPEN, and unfHdrLenWrite().
Referenced by PwpUnformattedWriter::beginRecord().
PWP_BOOL PwuUnfRecBeginFixed | ( | PWU_UNFDATA * | pUData, |
PWP_UINT32 | bytes, | ||
PWP_UINT32 | count | ||
) |
Prepares a PWU_UNFDATA block for writing a new unformatted data record when the amount of data being written is known ahead of time.
pUData | Pointer to an I/O control block initialized by a call to PwuUnfFileBegin(). |
bytes | Number of bytes per item. |
count | Number of items. |
Definition at line 453 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fixedBytes, PWU_UNFDATA::hadError, PWU_UNFDATA::inRec, PWP_FALSE, PWP_TRUE, PwuUnfRecEnd(), PWU_UNFDATA::recBytes, UDATA_ISOPEN, and unfHdrLenWrite().
Referenced by PwpUnformattedWriter::beginRecord().
PWP_UINT32 PwuUnfRecBytes | ( | PWU_UNFDATA * | pUData | ) |
Get the running total number of bytes written to the current record during an unformatted file I/O session.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfFileBegin(). |
Definition at line 616 of file apiPWPUtils.cxx.
References PWU_UNFDATA::recBytes, and UDATA_ISINIT.
PWP_UINT32 PwuUnfRecCount | ( | PWU_UNFDATA * | pUData | ) |
Get the running total number of finalized records written during an unformatted file I/O session.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfFileBegin(). |
Definition at line 630 of file apiPWPUtils.cxx.
References PWU_UNFDATA::recCnt, and UDATA_ISINIT.
PWP_BOOL PwuUnfRecEnd | ( | PWU_UNFDATA * | pUData | ) |
Finalize the current record write.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
Definition at line 371 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fixedBytes, PWU_UNFDATA::fp, PWU_UNFDATA::fPos, PWU_UNFDATA::hadError, PWU_UNFDATA::inRec, PWP_FALSE, PWP_TRUE, pwpFileGetpos(), pwpFileSetpos(), PWU_UNFDATA::recBytes, PWU_UNFDATA::recCnt, PWU_UNFDATA::totRecBytes, UDATA_INREC, and unfHdrLenWrite().
Referenced by PwpUnformattedWriter::endRecord(), PwuUnfFileEnd(), PwuUnfRecBegin(), and PwuUnfRecBeginFixed().
PWP_BOOL PwuUnfRecWriteArr | ( | PWU_UNFDATA * | pUData, |
const void * | arr, | ||
size_t | itemSize, | ||
size_t | itemCnt | ||
) |
Write an array of data to the current record.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
arr | Pointer to the array data. |
itemSize | Size of each array item (bytes). |
itemCnt | The number of array items. |
Definition at line 477 of file apiPWPUtils.cxx.
References PWU_UNFDATA::fp, PWU_UNFDATA::hadError, PWP_FALSE, PWP_TRUE, pwpFileWrite(), PWU_UNFDATA::recBytes, and UDATA_INREC.
Referenced by PwuUnfRecWriteBuf(), and PwuUnfRecWriteEndianBuf().
PWP_BOOL PwuUnfRecWriteBuf | ( | PWU_UNFDATA * | pUData, |
const void * | buf, | ||
size_t | size | ||
) |
Write a data buffer to the current record.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
buf | Pointer to the data buffer. |
size | Size of the data buffer (bytes). |
Definition at line 495 of file apiPWPUtils.cxx.
References PwuUnfRecWriteArr().
Referenced by PwuUnfRecWriteINT8(), PwuUnfRecWriteUINT8(), and PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteEndianBuf | ( | PWU_UNFDATA * | pUData, |
const void * | buf, | ||
size_t | size | ||
) |
Write a data buffer to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
buf | Pointer to the data buffer. |
size | Size of the data buffer (bytes). Size must be an even value between 2 and 32. |
Definition at line 502 of file apiPWPUtils.cxx.
References PWU_UNFDATA::endianness, PwuApplyEndianness(), and PwuUnfRecWriteArr().
Referenced by PwuUnfRecWriteFLOAT(), PwuUnfRecWriteINT(), PwuUnfRecWriteINT16(), PwuUnfRecWriteINT32(), PwuUnfRecWriteINT64(), PwuUnfRecWriteREAL(), PwuUnfRecWriteUINT(), PwuUnfRecWriteUINT16(), PwuUnfRecWriteUINT32(), and PwuUnfRecWriteUINT64().
PWP_BOOL PwuUnfRecWriteFLOAT | ( | PWU_UNFDATA * | pUData, |
PWP_FLOAT | val | ||
) |
Write a PWP_FLOAT value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 580 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteINT | ( | PWU_UNFDATA * | pUData, |
PWP_INT | val | ||
) |
Write a PWP_INT value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 510 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
PWP_BOOL PwuUnfRecWriteINT16 | ( | PWU_UNFDATA * | pUData, |
PWP_INT16 | val | ||
) |
Write a PWP_INT16 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 538 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteINT32 | ( | PWU_UNFDATA * | pUData, |
PWP_INT32 | val | ||
) |
Write a PWP_INT32 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 552 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteINT64 | ( | PWU_UNFDATA * | pUData, |
PWP_INT64 | val | ||
) |
Write a PWP_INT64 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 566 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteINT8 | ( | PWU_UNFDATA * | pUData, |
PWP_INT8 | val | ||
) |
Write a PWP_INT8 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 524 of file apiPWPUtils.cxx.
References PwuUnfRecWriteBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteREAL | ( | PWU_UNFDATA * | pUData, |
PWP_REAL | val | ||
) |
Write a PWP_REAL value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 587 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteUINT | ( | PWU_UNFDATA * | pUData, |
PWP_UINT | val | ||
) |
Write a PWP_UINT value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 517 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
PWP_BOOL PwuUnfRecWriteUINT16 | ( | PWU_UNFDATA * | pUData, |
PWP_UINT16 | val | ||
) |
Write a PWP_UINT16 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 545 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteUINT32 | ( | PWU_UNFDATA * | pUData, |
PWP_UINT32 | val | ||
) |
Write a PWP_UINT32 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 559 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteUINT64 | ( | PWU_UNFDATA * | pUData, |
PWP_UINT64 | val | ||
) |
Write a PWP_UINT64 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 573 of file apiPWPUtils.cxx.
References PwuUnfRecWriteEndianBuf().
Referenced by PwpUnformattedWriter::write().
PWP_BOOL PwuUnfRecWriteUINT8 | ( | PWU_UNFDATA * | pUData, |
PWP_UINT8 | val | ||
) |
Write a PWP_UINT8 value to the current record with endian order applied.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfRecBegin() or PwuUnfRecBeginFixed(). |
val | The value to write. |
Definition at line 531 of file apiPWPUtils.cxx.
References PwuUnfRecWriteBuf().
Referenced by PwpUnformattedWriter::write().
PWP_UINT32 PwuUnfTotRecBytes | ( | PWU_UNFDATA * | pUData | ) |
Get the running total number of bytes written to all records during an unformatted file I/O session.
pUData | Pointer to an I/O control block already prepared by a call to PwuUnfFileBegin(). |
Definition at line 623 of file apiPWPUtils.cxx.
References PWU_UNFDATA::totRecBytes, and UDATA_ISINIT.