Pointwise Plugin SDK
Functions
+ Collaboration diagram for File Handling:

Functions

int caeuFileClose (CAEP_RTITEM *pRti, const CAEP_WRITEINFO *pWriteInfo)
 Closes pRti for file I/O as specified by pWriteInfo. More...
 
int caeuFileOpen (CAEP_RTITEM *pRti, const CAEP_WRITEINFO *pWriteInfo)
 Prepare pRti for file I/O as specified by pWriteInfo. More...
 

Detailed Description

CAE file I/O utility functions and data-types.

Function Documentation

◆ caeuFileClose()

int caeuFileClose ( CAEP_RTITEM pRti,
const CAEP_WRITEINFO pWriteInfo 
)

Closes pRti for file I/O as specified by pWriteInfo.

Prior to this call, pRti must have been opened with a prior call to caeuFileOpen(). The current working directory is restored to the location in effect when caeuFileOpen() was called.

Parameters
pRtiThe CAEP_RTITEM pointer passed into runtimeWrite().
pWriteInfoThe CAEP_WRITEINFO pointer passed into runtimeWrite().
Returns
non-zero value on success.

Definition at line 172 of file apiCAEPUtils.cxx.

References CAEP_FORMATINFO::fileDest, CAEP_WRITEINFO::fileDest, CAEP_RTITEM::FormatInfo, CAEP_RTITEM::fp, PWP_FILEDEST_BASENAME, PWP_FILEDEST_FILENAME, PWP_FILEDEST_FOLDER, pwpCwdPop(), pwpFileClose(), and pwpFileDelete().

Referenced by openFileName(), and PwCaeGridWrite().

◆ caeuFileOpen()

int caeuFileOpen ( CAEP_RTITEM pRti,
const CAEP_WRITEINFO pWriteInfo 
)

Prepare pRti for file I/O as specified by pWriteInfo.

Parameters
pRtiThe CAEP_RTITEM pointer passed into runtimeWrite().
pWriteInfoThe CAEP_WRITEINFO pointer passed into runtimeWrite().
Returns
non-zero value on success.
Note
The behavior of this call is determined by the value of pRti->FormatInfo.fileDest:
  • PWP_FILEDEST_FILENAME - pRti->fp is opened to file specified by pWriteInfo->fileDest.
  • PWP_FILEDEST_BASENAME - pRti->fp is null.
  • PWP_FILEDEST_FOLDER - pRti->fp is null.

In all cases, the current working directory is set to the path specified in pWriteInfo->fileDest.

Definition at line 396 of file apiCAEPUtils.cxx.

References CAEP_FORMATINFO::fileDest, CAEP_WRITEINFO::fileDest, fileDestCwdPush(), CAEP_RTITEM::FormatInfo, openFileName(), PWP_FILEDEST_BASENAME, PWP_FILEDEST_FILENAME, PWP_FILEDEST_FOLDER, pwpCwdPop(), and pwpCwdPush().

Referenced by PwCaeGridWrite().