Go to the documentation of this file.
43 if (0 == strcmp(
caepRtItem[ii].FormatInfo.name, name)) {
56 if (
nullptr != pRti) {
63 pRti->opAborted = !ret;
77 pRti->progComplete = 0;
78 pRti->progTotal = total;
92 if ((
nullptr != pRti) && !pRti->opAborted) {
94 const clock_t DELAY = (CLOCKS_PER_SEC / 2);
100 pRti->progComplete, pRti->progTotal);
103 pRti->opAborted |= !ret;
116 if (
nullptr != pRti) {
128 sprintf(p,
"%ld:%02ld:%02ld (h:mm:ss) / %ld msec", (
long)hours,
139 if (
nullptr != pRti) {
151 pRti->progComplete = 0;
163 if (
nullptr != pRti) {
166 pRti->progComplete = 0;
179 if (
nullptr != pRti) {
184 if (pRti->opAborted) {
206 case PWP_FILEDEST_SIZE:
253 const char value[],
const char access[],
const char desc[],
263 bool createIfNotExists)
274 if (1 == maxPolynomialDegree) {
277 else if ((maxPolynomialDegree >= 2) && (maxPolynomialDegree <= 4)) {
278 auto maxPolyDegStr = [maxPolynomialDegree]()->
const char *
280 static char ret[2] = {
'\0' };
281 ret[0] = (char)(
'0' + maxPolynomialDegree);
294 const std::vector<std::string> Schemes{
295 "ZeroBased",
"OneBased",
"Custom"
298 const bool ret = (
nullptr != indexScheme) && (Schemes.end() !=
299 std::find(Schemes.begin(), Schemes.end(), indexScheme)) &&
313 if (0 == strcmp(str,
"Swap")) {
316 else if (0 == strcmp(str,
"LittleEndian")) {
319 else if (0 == strcmp(str,
"BigEndian")) {
343 if (0 == strcmp(str,
"ASCII")) {
346 else if (0 == strcmp(str,
"Binary")) {
349 else if (0 == strcmp(str,
"Unformatted")) {
365 if (0 == strcmp(str,
"Single")) {
368 else if (0 == strcmp(str,
"Double")) {
391 if ((
nullptr != pRti) && pWriteInfo && pWriteInfo->
fileDest &&
407 case PWP_ENCODING_SIZE:
410 ret = (0 != pRti->
fp);
420 if (fileDest && fileDest[0]) {
423 strcpy(dir, fileDest);
424 p = strrchr(dir,
'/');
441 if (
nullptr != pRti) {
475 case PWP_FILEDEST_SIZE:
492 case PWP_ENCODING_SIZE:
505 case PWP_PRECISION_SIZE:
518 case PWP_DIMENSION_SIZE:
PWP_BOOL caeuExportStructuredAsUnstructured(PWGM_HGRIDMODEL model)
Get the user-requested structured grid handling.
const char * caeuDimensionToText(PWP_ENUM_DIMENSION dim)
Converts a PWP_ENUM_DIMENSION value to a text string representation.
const char * caeuPrecisionToText(PWP_ENUM_PRECISION prec)
Converts a PWP_ENUM_PRECISION value to a text string representation.
PWP_ENUM_PRECISION caeuFilePrecision(PWGM_HGRIDMODEL model)
Get the user-requested file precision.
#define CAEPU_RT_CLKS_DIFF(rti, startId, endId)
Returns the clock time difference between startId and endId as clocks[endId] - clocks[startId]....
void PwuProgressEnd(const char api[], PWP_BOOL ok)
Send a progress end message (PWP_MSGID_PROGEND) to the framework.
PWP_ENUM_VALTYPE
Supported PWP-API getValue() transfer types.
CAEP_RTITEM caepRtItem[]
The runtime array of CAEP_RTITEM items.
PWU_RTITEM * pApiData
Pointer to the associated PWU_RTITEM structure.
The data representing a CAE exporter instance.
CAEP_RTITEM * caeuFindFormatByName(const char name[])
Find an item in caepRtItem[] by it's name.
PWP_BOOL caeuPublishMeshLinkValueDefinitions(const char *indexScheme)
Enables support for the export of MeshLink data and publishes all needed value definitions.
PWP_BOOL caeuProgressIncr(CAEP_RTITEM *pRti)
Completes a progress tracking sub-step.
PWP_BOOL PwuProgressStatus(const char api[], PWP_UINT32 complete, PWP_UINT32 total)
Send a progress status message (PWP_MSGID_PROGSTATUS, value >= 0) to the framework.
static void sendDiffTimeMsg(CAEP_RTITEM *pRti, const char txt[], clock_t diff)
An opaque handle to a grid model.
PWP_BOOL PwuPublishValueDefinition(const char group[], const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
Create a value.
PWP_BOOL caeuProgressEndStep(CAEP_RTITEM *pRti)
Completes a progress tracking major step.
PWP_BOOL PwuProgressNextStep(const char api[])
Send a progress "next step" message (PWP_MSGID_PROGSTATUS, value = -1) to the framework.
static void sendClkDiffTimeMsg(CAEP_RTITEM *pRti, const char txt[], CAEPU_ENUM_CLOCKS startId, CAEPU_ENUM_CLOCKS endId)
PWP_ENDIANNESS PwuGetOsEndianness(void)
Query the OS's native endianness.
void caeuSendInfoMsg(CAEP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send an info text message (PWP_MSGID_INFO) to the framework.
#define CAEPU_CLKS_TO_HMS(c, h, m, s)
Returns the clock value c decomposed into hours, minutes, and seconds (PWP_INT32)....
void caeuSendDebugMsg(CAEP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send a debug text message (PWP_MSGID_DEBUG) to the framework.
void PwuSendWarningMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a warning text message (PWP_MSGID_WARNING) to the framework.
Pointwise Grid Model API Specification (PWGM-API)
PWP_ENUM_ENCODING
File encoding values.
void PwuSendInfoMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an info text message (PWP_MSGID_INFO) to the framework.
PWP_BOOL caeuProgressBeginStep(CAEP_RTITEM *pRti, PWP_UINT32 total)
Begins a progress tracking step.
void caeuSendErrorMsg(CAEP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send an error text message (PWP_MSGID_ERROR) to the framework.
PWP_BOOL caeuAssignInfoValue(const char key[], const char value[], bool createIfNotExists)
Creates a key/value pair that defines a CAE info attribute.
PWP_ENUM_ENCODING encoding
export file encoding.
void PwuSendErrorMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an error text message (PWP_MSGID_ERROR) to the framework.
PWP_ENUM_ENCODING caeuFileEncoding(PWGM_HGRIDMODEL model)
Get the user-requested file encoding.
const char * caeuEncodeToText(PWP_ENUM_ENCODING enc)
Converts a PWP_ENUM_ENCODING value to a text string representation.
PWP_BOOL caeuProgressInit(CAEP_RTITEM *pRti, PWP_UINT32 cnt)
Initializes a progress tracking session.
static int openFileName(CAEP_RTITEM *pRti, const CAEP_WRITEINFO *pWriteInfo)
PWP_UINT32 caepFormatCnt
The number of entries in caepRtItem[] array.
void caeuSendWarningMsg(CAEP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send a warning text message (PWP_MSGID_WARNING) to the framework.
PWP_BOOL PwModGetAttributeBOOL(PWGM_HGRIDMODEL model, const char *name, PWP_BOOL *val)
PWP_BOOL caeuPublishValueDefinition(const char key[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
Creates a collection of key/value pairs that represent a published CAE attribute definition.
PWP_BOOL caeuExportBndryConditionsOnly(PWGM_HGRIDMODEL model)
Get the user-requested bc export option.
int caeuFileOpen(CAEP_RTITEM *pRti, const CAEP_WRITEINFO *pWriteInfo)
Prepare pRti for file I/O as specified by pWriteInfo.
PWP_ENDIANNESS
Flags used to indicate endianness or control endian behaviors in functions.
CAEPU_ENUM_CLOCKS
Supported CAEPU clock id values.
static int fileDestCwdPush(const char *fileDest)
PWP_BOOL caeuPublishHighOrderValueDefinitions(const PWP_UINT32 maxPolynomialDegree)
Enables support for the export of high order meshes and publishes all needed value definitions.
CAEP_RTITEM * caeuFindFormatById(PWP_UINT32 id)
Find an item in caepRtItem[] by it's id.
CAE export write control information.
int caeuFileClose(CAEP_RTITEM *pRti, const CAEP_WRITEINFO *pWriteInfo)
Closes pRti for file I/O as specified by pWriteInfo.
PWP_APIINFO apiInfo
The PWP-API instance information.
void PwuSendDebugMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a debug text message (PWP_MSGID_DEBUG) to the framework.
PWP_BOOL PwModGetAttributeString(PWGM_HGRIDMODEL model, const char *name, const char **val)
Get an attribute value as a specific type.
@ PWP_ENCODING_UNFORMATTED
const char * fileDest
requested file destination.
Pointwise Plugin API (PWP-API)
CAEP_FORMATINFO FormatInfo
The CAE Plugin format data.
#define CAEPU_CLKS_TO_MSECS(c)
Returns the clock value c as milli seconds (PWP_INT32). Only whole ms values are possible.
PWP_ENUM_DIMENSION
Supported dimensionality values.
PWP_ENDIANNESS caeuFileByteOrder(PWGM_HGRIDMODEL model)
Get the user-requested file byte order.
PWP_BOOL PwuAssignValueEnum(const char group[], const char name[], const char value[], bool createIfNotExists)
static const char * invalid
void caeuProgressEnd(CAEP_RTITEM *pRti, PWP_BOOL ok)
Ends all progress tracking.
FILE * fp
Runtime FILE pointer.
PWP_ENUM_PRECISION
File precision values.
const char * name
full API spec name
PWP_BOOL PwuProgressBegin(const char api[], PWP_UINT32 totalSteps)
Send a progress begin message (PWP_MSGID_PROGBEGIN) to the framework.