Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CaePluginImpl.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * CaePlugin class
4  *
5  * (C) 2021 Cadence Design Systems, Inc. All rights reserved worldwide.
6  *
7  ***************************************************************************/
8 
9 #include "CaePlugin.h"
10 
11 
12 //***************************************************************************
13 //***************************************************************************
14 //***************************************************************************
15 
16 template< typename MT >
18  const CAEP_WRITEINFO *pWriteInfo) :
19  rti_(*pRti),
20  model_(model),
21  writeInfo_(*pWriteInfo),
22  progMajorSteps_(1)
23 {
25 }
26 
27 template< typename MT >
29 {
30 }
31 
32 template< typename MT >
35 {
36  PWP_BOOL ret = PWP_TRUE;
37  if (!this->beginExport()) {
38  ret = PWP_FALSE;
39  }
40  else if (aborted()) {
41  ret = PWP_FALSE;
42  }
43  else if (!caeuProgressInit(&rti_, progMajorSteps_)) {
44  ret = PWP_FALSE;
45  }
46  else if (aborted()) {
47  ret = PWP_FALSE;
48  }
49  else if (!this->write()) {
50  ret = PWP_FALSE;
51  }
52  else if (aborted()) {
53  ret = PWP_FALSE;
54  }
55  // ALWAYS call endExport()!
56  if (!this->endExport()) {
57  ret = PWP_FALSE;
58  }
59  caeuProgressEnd(&rti_, ret);
60  return ret;
61 }
62 
63 // private ctor
64 template< typename MT >
66  rti_(src.rti_),
67  model_(src.model_),
68  writeInfo_(src.writeInfo_),
69  progMajorSteps_(src.progMajorSteps_)
70 {
71 }
72 
73 // private assignment
74 template< typename MT >
77 {
78 }
CaePlugin(CAEP_RTITEM *pRti, PWGM_HGRIDMODEL model, const CAEP_WRITEINFO *pWriteInfo)
Template constructor.
Definition: CaePluginImpl.h:17
void wrapRuntimeFile()
Pass ownership of the runtime FILE pointer to a PwpFile object.
Definition: CaePlugin.h:1108
#define PWP_TRUE
PWP_BOOL logical &quot;true&quot; value.
Definition: apiPWP.h:309
CaePlugin & operator=(const CaePlugin &rhs)
Private assignment operator.
Definition: CaePluginImpl.h:76
PWP_BOOL caeuProgressInit(CAEP_RTITEM *pRti, PWP_UINT32 cnt)
Initializes a progress tracking session.
int PWP_BOOL
logical value
Definition: apiPWP.h:303
PWP_BOOL run()
Starts the export sequence.
Definition: CaePluginImpl.h:34
CAE export write control information.
Definition: apiCAEP.h:184
The data representing a CAE exporter instance.
Definition: apiCAEPUtils.h:124
void caeuProgressEnd(CAEP_RTITEM *pRti, PWP_BOOL ok)
Ends all progress tracking.
An opaque handle to a grid model.
Definition: apiGridModel.h:326
virtual ~CaePlugin()
Destructor.
Definition: CaePluginImpl.h:28
#define PWP_FALSE
PWP_BOOL logical &quot;false&quot; value.
Definition: apiPWP.h:306