Pointwise Plugin SDK
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members

#include <CaePlugin.h>

+ Collaboration diagram for CaePlugin< MT >:

Public Member Functions

bool aborted () const
 Check if an export has been aborted. More...
 
const PWP_APIINFOapiInfo () const
 Get the plugin's API settings. More...
 
 CaePlugin (CAEP_RTITEM *pRti, PWGM_HGRIDMODEL model, const CAEP_WRITEINFO *pWriteInfo)
 Template constructor. More...
 
const char * exportDestination () const
 Get the requested file destination string. More...
 
const CAEP_FORMATINFOformatInfo () const
 Get the plugin's export format settings. More...
 
FILE * fp () const
 Get the FILE pointer wrapped by the runtime file object. More...
 
bool isLicensed (const PWP_LICENSEDATA &license) const
 Check if license data is valid. More...
 
MT & model ()
 Get the grid model object. More...
 
const MT & model () const
 Get the grid model object. More...
 
PWP_BOOL run ()
 Starts the export sequence. More...
 
void setLanguage (const char language[])
 Set the active language. More...
 
virtual ~CaePlugin ()
 Destructor. More...
 
const PwpFileruntimeFile () const
 Get the runtime file object. More...
 
PwpFileruntimeFile ()
 Get the runtime file object. More...
 
Progress Reporting Methods

These methods are used to report export progress back to the calling framework.

If the export is performed from the Pointwise GUI, the progress is displayed in the lower left corner of the window. If the export is performed from a glyph2 script, the progress is ignored.

Plugins use a two level progress system. The first level is composed of major steps. Each major step is broken down into sub steps. The exact number of major and sub steps must be determined by the plugin at runtime.

See setProgressMajorSteps() for usage.

void setProgressMajorSteps (PWP_UINT32 steps)
 Set the number of major export steps. More...
 
bool progressBeginStep (PWP_UINT32 steps) const
 Indicates the start of a major progress step. More...
 
bool progressIncrement () const
 Indicates the completion of a progress sub step within the current major step. More...
 
bool progressEndStep () const
 Indicates the end of a major progress step. More...
 
Messaging Methods

These methods are used to send log messages back to the calling framework. To avoid negatively impacting export speed, messages should be used sparingly.

If the export is performed from the Pointwise GUI, the messages are displayed in the messages window. If the export is performed from a glyph2 script, the messages are ignored.

void sendInfoMsg (const char *msg, PWP_UINT32 id=0) const
 Send an information message. More...
 
void sendDebugMsg (const char *msg, PWP_UINT32 id=0) const
 Send a debug message. More...
 
void sendWarningMsg (const char *msg, PWP_UINT32 id=0) const
 Send a warning message. More...
 
void sendErrorMsg (const char *msg, PWP_UINT32 id=0) const
 Send an error message. More...
 
Export Option Methods

These methods are used get export options. The export options can be set by the Pointwise user interface or by glyph2 scripts.

bool conditionsOnly () const
 Check if only BCs are to be exported. More...
 
PWP_ENUM_PRECISION precision () const
 Get the export's requested numerical precision. More...
 
bool isSinglePrecision () const
 Check if single numerical precision is requested. More...
 
bool isDoublePrecision () const
 Check if double numerical precision is requested. More...
 
const char * precisionStr () const
 Get a string representation of the requested data precision. More...
 
PWP_ENUM_ENCODING encoding () const
 Get the export's requested data encoding. More...
 
bool isAsciiEncoding () const
 Check if ascii encoding is requested. More...
 
bool isBinaryEncoding () const
 Check if binary encoding is requested. More...
 
bool isUnformattedEncoding () const
 Check if FORTRAN unformatted encoding is requested. More...
 
const char * encodingStr () const
 Get a string representation of the requested data encoding. More...
 
PWP_ENUM_DIMENSION dimension () const
 Get the export's requested dimensionality. More...
 
bool isDimension3D () const
 Check if 3D is requested. More...
 
bool isDimension2D () const
 Check if 2D is requested. More...
 
const char * dimensionStr () const
 Get a string representation of the requested data dimensionality. More...
 
PWP_ENDIANNESS byteOrder () const
 Get the export's requested byte order. More...
 
bool isBigEndian () const
 Check if big endian byte ordering is requested. More...
 
bool isLittleEndian () const
 Check if little endian byte ordering is requested. More...
 

Static Public Member Functions

static PWP_VERSION getApiVersion ()
 Get the plugin's API version. More...
 
static const char * getAuthorInfo ()
 Get the plugin's author description string. More...
 
static const char * getCopyrightInfo ()
 Get the plugin's copyright description string. More...
 
static PWP_VERSIONVAL getInfo (PWP_PLUGININFO &pluginInfo)
 Get information about this plugin. More...
 
static PWP_ENDIANNESS getOsEndianness ()
 Query the OS's native endianness. More...
 
static const char * getSupportInfo ()
 Get the plugin's support description string. More...
 
static PWP_VERSION getVersion ()
 Get the plugin's release version. More...
 
template<typename H >
static bool isValid (H h)
 Check if a handle is valid. More...
 
static bool isValid (PWGM_HELEMENT h)
 Check if an element handle is valid. More...
 
Attribute Publishing Methods

These static methods are used to publish solver attribute definitions. The value of a published attribute can be set by the Pointwise user interface or by glyph2 scripts. During export, a plugin can obtain the assigned attribute values from the grid model.

static bool publishValueDef (CAEP_RTITEM &rti, const char key[], PWP_ENUM_VALTYPE type, const char value[], const char desc[], const char range[]="", const char access[]="RW")
 Publish a typed CAE attribute definition. More...
 
static bool publishUIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_UINT value, const char desc[], const char access[]="RW")
 Publish a PWP_UINT CAE attribute definition without a range. More...
 
static bool publishUIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_UINT value, const char desc[], PWP_UINT minVal, PWP_UINT maxVal, const char access[]="RW")
 Publish a PWP_UINT CAE attribute definition with a min and max range. More...
 
static bool publishUIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_UINT value, const char desc[], PWP_UINT minVal, PWP_UINT maxVal, PWP_UINT minTypicalVal, PWP_UINT maxTypicalVal, const char access[]="RW")
 Publish a PWP_UINT CAE attribute definition with a min and max range and a typical min and max range. More...
 
static bool publishIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_INT value, const char desc[], const char access[]="RW")
 Publish a PWP_INT CAE attribute definition without a range. More...
 
static bool publishIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_INT value, const char desc[], PWP_INT minVal, PWP_INT maxVal, const char access[]="RW")
 Publish a PWP_INT CAE attribute definition with a min and max range. More...
 
static bool publishIntValueDef (CAEP_RTITEM &rti, const char key[], PWP_INT value, const char desc[], PWP_INT minVal, PWP_INT maxVal, PWP_INT minTypicalVal, PWP_INT maxTypicalVal, const char access[]="RW")
 Publish a PWP_INT CAE attribute definition with a min and max range and a typical min and max range. More...
 
static bool publishRealValueDef (CAEP_RTITEM &rti, const char key[], PWP_REAL value, const char desc[], const char access[]="RW")
 Publish a PWP_REAL CAE attribute definition without a range. More...
 
static bool publishRealValueDef (CAEP_RTITEM &rti, const char key[], PWP_REAL value, const char desc[], PWP_REAL minVal, PWP_REAL maxVal, const char access[]="RW")
 Publish a PWP_REAL CAE attribute definition with a min and max range. More...
 
static bool publishRealValueDef (CAEP_RTITEM &rti, const char key[], PWP_REAL value, const char desc[], PWP_REAL minVal, PWP_REAL maxVal, PWP_REAL minTypicalVal, PWP_REAL maxTypicalVal, const char access[]="RW")
 Publish a PWP_REAL CAE attribute definition with a min and max range and a typical min and max range. More...
 
static bool publishBoolValueDef (CAEP_RTITEM &rti, const char key[], bool value, const char desc[], const char range[]="", const char access[]="RW")
 Publish a boolean CAE attribute definition. More...
 
static bool publishStringValueDef (CAEP_RTITEM &rti, const char key[], const char value[], const char desc[], const char range[]="", const char access[]="RW")
 Publish a string CAE attribute definition. More...
 
static bool publishEnumValueDef (CAEP_RTITEM &rti, const char key[], const char value[], const char desc[], const char range[]="", const char access[]="RW")
 Publish an enumerated CAE attribute definition. More...
 
static bool assignInfoValue (CAEP_RTITEM &rti, const char key[], const char value[], const bool createIfNotExists=true)
 Set a CAE plugin info value. More...
 
static bool allowByteOrders (CAEP_RTITEM &rti, const bool big, const bool little)
 Set the "AllowedFileByteOrders" CAE plugin info value. More...
 
static bool allowElementTopologies (CAEP_RTITEM &rti, const bool structured, const bool unstructured, const bool prismatic)
 Set the "AllowedElementTopologies" CAE plugin info value. More...
 
static bool meshLinkSupported (CAEP_RTITEM &rti, const bool on)
 Set the "MeshLinkSupported" CAE plugin info value. More...
 
static bool useZeroBasedIndexing (CAEP_RTITEM &rti)
 Sets the "IndexScheme" CAE plugin info value to "ZeroBased". More...
 
static bool useOneBasedIndexing (CAEP_RTITEM &rti)
 Sets the "IndexScheme" CAE plugin info value to "OneBased". More...
 
static bool useCustomIndexing (CAEP_RTITEM &rti)
 Sets the "IndexScheme" CAE plugin info value to "Custom". More...
 
static bool shadowBcTypes (CAEP_RTITEM &rti, const char *const shadowTypes)
 Set the "ShadowBcTypes" CAE plugin info value. More...
 

Protected Attributes

MT model_
 The grid model being exported. More...
 
PWP_UINT32 progMajorSteps_
 # of major export steps. More...
 
PwpFile rtFile_
 runtime file object More...
 
CAEP_RTITEMrti_
 The plugin's runtime item data. More...
 
const CAEP_WRITEINFOwriteInfo_
 The export options. More...
 

Private Member Functions

virtual bool beginExport ()
 Called once by run() at the start of an export sequence. More...
 
 CaePlugin (const CaePlugin &src)
 Private constructor. More...
 
virtual bool endExport ()
 Called once by run() at the end of an export sequence. More...
 
CaePluginoperator= (const CaePlugin &rhs)
 Private assignment operator. More...
 
void wrapRuntimeFile ()
 Pass ownership of the runtime FILE pointer to a PwpFile object. More...
 
virtual PWP_BOOL write ()=0
 Called once by run() to perform the export logic. More...
 

Detailed Description

template<typename MT>
class CaePlugin< MT >

The CAE Plugin base class template.

The CaePlugin base class template implements the interface common to all CAE plugins.

Definition at line 28 of file CaePlugin.h.

Constructor & Destructor Documentation

◆ CaePlugin() [1/2]

template<typename MT >
CaePlugin< MT >::CaePlugin ( CAEP_RTITEM pRti,
PWGM_HGRIDMODEL  model,
const CAEP_WRITEINFO pWriteInfo 
)

Template constructor.

Templated base class for all concrete plugin subclasses. MT is a CaeGridModel subclass.

Parameters
pRtiPointer to the runtime item instance for this invocation of the exporter.
modelHandle to the grid model to be exported.
pWriteInfoPointer to the export settings.
See also
CaeUnsGridModel, CaeStrGridModel

Definition at line 17 of file CaePluginImpl.h.

References CaePlugin< MT >::wrapRuntimeFile().

◆ ~CaePlugin()

template<typename MT >
CaePlugin< MT >::~CaePlugin
virtual

Destructor.

Definition at line 28 of file CaePluginImpl.h.

◆ CaePlugin() [2/2]

template<typename MT >
CaePlugin< MT >::CaePlugin ( const CaePlugin< MT > &  src)
private

Private constructor.

Definition at line 65 of file CaePluginImpl.h.

Member Function Documentation

◆ aborted()

template<typename MT >
bool CaePlugin< MT >::aborted ( ) const
inline

Check if an export has been aborted.

When aborted, a plugin should stop all time consuming operations and return as soon as possible.

Returns
true if the export has been aborted.

Definition at line 296 of file CaePlugin.h.

References CaePlugin< MT >::rti_.

◆ allowByteOrders()

template<typename MT >
static bool CaePlugin< MT >::allowByteOrders ( CAEP_RTITEM rti,
const bool  big,
const bool  little 
)
inlinestatic

Set the "AllowedFileByteOrders" CAE plugin info value.

Set the byte order types supported by the plugin.

Parameters
rtiThe plugin's runtime item data.
bigSet to true if the plugin supports big endian.
littleSet to true if the plugin supports little endian.
Returns
true on success.
See also
assignInfoValue(), PwuGetOsEndianness(), PwuApplyEndianness(), PwuUnfFileSetEndianness(), PwuUnfFileGetEndianness()

Definition at line 898 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ allowElementTopologies()

template<typename MT >
static bool CaePlugin< MT >::allowElementTopologies ( CAEP_RTITEM rti,
const bool  structured,
const bool  unstructured,
const bool  prismatic 
)
inlinestatic

Set the "AllowedElementTopologies" CAE plugin info value.

Set the element topology types supported by the plugin. These flags are used by the Pointwise GUI to intelligently enable and disable tools.

Parameters
rtiThe plugin's runtime item data.
structuredSet to true if the plugin supports exporting structured blocks. If false, the GUI will not allow the creation of structured blocks.
unstructuredSet to true if the plugin supports exporting unstructured blocks. If false, the GUI will not allow the creation of unstructured blocks.
prismaticSet to true if the plugin supports exporting prismatic blocks. If false, the GUI will not allow the creation of extruded prism blocks.
Returns
true on success.
Note
These flags supersede supported element type flags. For instance, if prismatic is false, the GUI will not allow the creation of extruded prism blocks even if wedge (prism) elements are supported.
See also
assignInfoValue()

Definition at line 931 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ apiInfo()

template<typename MT >
const PWP_APIINFO& CaePlugin< MT >::apiInfo ( ) const
inline

Get the plugin's API settings.

Get the plugin's API settings as specified in rtPwpInitItems.h.

Returns
A const reference to the plugin's API settings.

Definition at line 132 of file CaePlugin.h.

References PWU_RTITEM::apiInfo, CAEP_RTITEM::pApiData, and CaePlugin< MT >::rti_.

◆ assignInfoValue()

template<typename MT >
static bool CaePlugin< MT >::assignInfoValue ( CAEP_RTITEM rti,
const char  key[],
const char  value[],
const bool  createIfNotExists = true 
)
inlinestatic

Set a CAE plugin info value.

General plugin info setting method. It is usually simpler to use the attribute specific setter methods.

Parameters
rtiThe plugin's runtime item data.
keyThe info value key (name).
valueThe info value.
createIfNotExistsIf true, the name/value pair will be silently created if it does not already exist.
Returns
true on success.
Note
These read-only info value definitions are discoverable in glyph using the pw::Application actions getCAESolverAttributeNames, and getCAESolverAttribute.
See also
caeuAssignInfoValue(), allowByteOrders()

Definition at line 882 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, and caeuAssignInfoValue().

Referenced by CaePlugin< MT >::allowByteOrders(), CaePlugin< MT >::allowElementTopologies(), CaePlugin< MT >::meshLinkSupported(), CaePlugin< MT >::shadowBcTypes(), CaePlugin< MT >::useCustomIndexing(), CaePlugin< MT >::useOneBasedIndexing(), and CaePlugin< MT >::useZeroBasedIndexing().

◆ beginExport()

template<typename MT >
virtual bool CaePlugin< MT >::beginExport ( )
inlineprivatevirtual

Called once by run() at the start of an export sequence.

A plugin can optionally over ride this virtual method to perform one-time export initializations. A call to setProgressMajorSteps() is usually made in this method.

The default implementation does nothing and returns true.

Returns
true on success.
See also
run(), write(), endExport()

Definition at line 1058 of file CaePlugin.h.

◆ byteOrder()

template<typename MT >
PWP_ENDIANNESS CaePlugin< MT >::byteOrder ( ) const
inline

Get the export's requested byte order.

Returns
One of PWP_ENDIAN_LITTLE or PWP_ENDIAN_BIG.

Definition at line 424 of file CaePlugin.h.

References CAEP_WRITEINFO::byteOrder, PwpFile::mapToBigLittle(), and CaePlugin< MT >::writeInfo_.

Referenced by CaePlugin< MT >::isBigEndian(), CaePlugin< MT >::isLittleEndian(), and CaePlugin< MT >::wrapRuntimeFile().

◆ conditionsOnly()

template<typename MT >
bool CaePlugin< MT >::conditionsOnly ( ) const
inline

Check if only BCs are to be exported.

Returns
true if only BCs are to be exported.

Definition at line 311 of file CaePlugin.h.

References CAEP_WRITEINFO::conditionsOnly, and CaePlugin< MT >::writeInfo_.

◆ dimension()

template<typename MT >
PWP_ENUM_DIMENSION CaePlugin< MT >::dimension ( ) const
inline

Get the export's requested dimensionality.

Returns
One of PWP_DIMENSION_2D or PWP_DIMENSION_3D.

Definition at line 392 of file CaePlugin.h.

References CAEP_WRITEINFO::dimension, and CaePlugin< MT >::writeInfo_.

Referenced by CaePlugin< MT >::isDimension2D(), and CaePlugin< MT >::isDimension3D().

◆ dimensionStr()

template<typename MT >
const char* CaePlugin< MT >::dimensionStr ( ) const
inline

Get a string representation of the requested data dimensionality.

Returns
The dimensionality string. One of "2D" or "3D".

Definition at line 416 of file CaePlugin.h.

References CAEPU_RT_DIM_TEXT, and CaePlugin< MT >::rti_.

◆ encoding()

template<typename MT >
PWP_ENUM_ENCODING CaePlugin< MT >::encoding ( ) const
inline

Get the export's requested data encoding.

Returns
One of PWP_ENCODING_ASCII, PWP_ENCODING_BINARY or PWP_ENCODING_UNFORMATTED.

Definition at line 352 of file CaePlugin.h.

References CAEP_WRITEINFO::encoding, and CaePlugin< MT >::writeInfo_.

Referenced by CaePlugin< MT >::isAsciiEncoding(), CaePlugin< MT >::isBinaryEncoding(), CaePlugin< MT >::isUnformattedEncoding(), and CaePlugin< MT >::wrapRuntimeFile().

◆ encodingStr()

template<typename MT >
const char* CaePlugin< MT >::encodingStr ( ) const
inline

Get a string representation of the requested data encoding.

Returns
The encoding string. One of "ascii", "binary" or "unformatted".

Definition at line 384 of file CaePlugin.h.

References CAEPU_RT_ENCODING_TEXT, and CaePlugin< MT >::rti_.

◆ endExport()

template<typename MT >
virtual bool CaePlugin< MT >::endExport ( )
inlineprivatevirtual

Called once by run() at the end of an export sequence.

A plugin can optionally over ride this virtual method to perform one-time export clean up.

The default implementation does nothing and returns true.

Returns
true on success.
See also
run(), beginExport(), write()

Definition at line 1081 of file CaePlugin.h.

◆ exportDestination()

template<typename MT >
const char* CaePlugin< MT >::exportDestination ( ) const
inline

Get the requested file destination string.

Depending on the plugin's settings specified in rtCaepInitItems.h, the destination string will be:

  • A path and full file name for PWP_FILEDEST_FILENAME.
  • A path and base file name for PWP_FILEDEST_BASENAME.
  • A path only for PWP_FILEDEST_FOLDER.
Returns
The requested file destination string.

Definition at line 113 of file CaePlugin.h.

References CAEP_WRITEINFO::fileDest, and CaePlugin< MT >::writeInfo_.

Referenced by CaePlugin< MT >::wrapRuntimeFile().

◆ formatInfo()

template<typename MT >
const CAEP_FORMATINFO& CaePlugin< MT >::formatInfo ( ) const
inline

Get the plugin's export format settings.

Get the plugin's export format settings as specified in rtCaepInitItems.h.

Returns
A const reference to the plugin's CAEP_FORMATINFO data.

Definition at line 123 of file CaePlugin.h.

References CAEP_RTITEM::FormatInfo, and CaePlugin< MT >::rti_.

◆ fp()

template<typename MT >
FILE* CaePlugin< MT >::fp ( ) const
inline

Get the FILE pointer wrapped by the runtime file object.

Returns
The runtime file object's FILE pointer.
See also
runtimeFile()

Definition at line 99 of file CaePlugin.h.

References PwpFile::fp(), and CaePlugin< MT >::rtFile_.

◆ getApiVersion()

template<typename MT >
static PWP_VERSION CaePlugin< MT >::getApiVersion ( )
inlinestatic

Get the plugin's API version.

Returns
The plugin's API version as a PWP_VERSION value.

Definition at line 490 of file CaePlugin.h.

References PwpGetPluginInfo(), and PWP_PLUGININFO::pwpVer.

◆ getAuthorInfo()

template<typename MT >
static const char* CaePlugin< MT >::getAuthorInfo ( )
inlinestatic

Get the plugin's author description string.

Returns
The plugin's author description string.

Definition at line 510 of file CaePlugin.h.

References PWP_PLUGININFO::author, and PwpGetPluginInfo().

◆ getCopyrightInfo()

template<typename MT >
static const char* CaePlugin< MT >::getCopyrightInfo ( )
inlinestatic

Get the plugin's copyright description string.

Returns
The plugin's copyright description string.

Definition at line 530 of file CaePlugin.h.

References PWP_PLUGININFO::copyright, and PwpGetPluginInfo().

◆ getInfo()

template<typename MT >
static PWP_VERSIONVAL CaePlugin< MT >::getInfo ( PWP_PLUGININFO pluginInfo)
inlinestatic

Get information about this plugin.

Parameters
pluginInfoA PWP_PLUGININFO buffer.
Returns
The major PWP-API spec version number.

Definition at line 482 of file CaePlugin.h.

References PwpGetPluginInfo().

◆ getOsEndianness()

template<typename MT >
static PWP_ENDIANNESS CaePlugin< MT >::getOsEndianness ( )
inlinestatic

Query the OS's native endianness.

Returns
One of PWP_ENDIAN_LITTLE or PWP_ENDIAN_BIG

Definition at line 473 of file CaePlugin.h.

References PwuGetOsEndianness().

◆ getSupportInfo()

template<typename MT >
static const char* CaePlugin< MT >::getSupportInfo ( )
inlinestatic

Get the plugin's support description string.

Returns
The plugin's support description string.

Definition at line 520 of file CaePlugin.h.

References PwpGetPluginInfo(), and PWP_PLUGININFO::support.

◆ getVersion()

template<typename MT >
static PWP_VERSION CaePlugin< MT >::getVersion ( )
inlinestatic

Get the plugin's release version.

Returns
The plugin's release version as a PWP_VERSION value.

Definition at line 500 of file CaePlugin.h.

References PWP_PLUGININFO::libVer, and PwpGetPluginInfo().

◆ isAsciiEncoding()

template<typename MT >
bool CaePlugin< MT >::isAsciiEncoding ( ) const
inline

Check if ascii encoding is requested.

Returns
true if ascii encoding is requested.

Definition at line 360 of file CaePlugin.h.

References CaePlugin< MT >::encoding(), and PWP_ENCODING_ASCII.

◆ isBigEndian()

template<typename MT >
bool CaePlugin< MT >::isBigEndian ( ) const
inline

Check if big endian byte ordering is requested.

Returns
true if big endian byte ordering is requested.

Definition at line 433 of file CaePlugin.h.

References CaePlugin< MT >::byteOrder(), and PWP_ENDIAN_BIG.

◆ isBinaryEncoding()

template<typename MT >
bool CaePlugin< MT >::isBinaryEncoding ( ) const
inline

Check if binary encoding is requested.

Returns
true if binary encoding is requested.

Definition at line 368 of file CaePlugin.h.

References CaePlugin< MT >::encoding(), and PWP_ENCODING_BINARY.

◆ isDimension2D()

template<typename MT >
bool CaePlugin< MT >::isDimension2D ( ) const
inline

Check if 2D is requested.

Returns
true if 2D grid data is requested.

Definition at line 408 of file CaePlugin.h.

References CaePlugin< MT >::dimension(), and PWP_DIMENSION_2D.

◆ isDimension3D()

template<typename MT >
bool CaePlugin< MT >::isDimension3D ( ) const
inline

Check if 3D is requested.

Returns
true if 3D grid data is requested.

Definition at line 400 of file CaePlugin.h.

References CaePlugin< MT >::dimension(), and PWP_DIMENSION_3D.

◆ isDoublePrecision()

template<typename MT >
bool CaePlugin< MT >::isDoublePrecision ( ) const
inline

Check if double numerical precision is requested.

Returns
true if double precision is requested.

Definition at line 335 of file CaePlugin.h.

References CaePlugin< MT >::precision(), and PWP_PRECISION_DOUBLE.

◆ isLicensed()

template<typename MT >
bool CaePlugin< MT >::isLicensed ( const PWP_LICENSEDATA license) const
inline

Check if license data is valid.

NOT IMPLEMENTED. Always returns true.

Parameters
licenseThe PWP_LICENSEDATA data.
Returns
true if license data is valid.

Definition at line 452 of file CaePlugin.h.

References PWU_RTITEM::apiInfo, PWP_APIINFO::name, CAEP_RTITEM::pApiData, PwpIsLicensed(), and CaePlugin< MT >::rti_.

◆ isLittleEndian()

template<typename MT >
bool CaePlugin< MT >::isLittleEndian ( ) const
inline

Check if little endian byte ordering is requested.

Returns
true if little endian byte ordering is requested.

Definition at line 441 of file CaePlugin.h.

References CaePlugin< MT >::byteOrder(), and PWP_ENDIAN_LITTLE.

◆ isSinglePrecision()

template<typename MT >
bool CaePlugin< MT >::isSinglePrecision ( ) const
inline

Check if single numerical precision is requested.

Returns
true if single precision is requested.

Definition at line 327 of file CaePlugin.h.

References CaePlugin< MT >::precision(), and PWP_PRECISION_SINGLE.

◆ isUnformattedEncoding()

template<typename MT >
bool CaePlugin< MT >::isUnformattedEncoding ( ) const
inline

Check if FORTRAN unformatted encoding is requested.

Returns
true if FORTRAN unformatted encoding is requested.

Definition at line 376 of file CaePlugin.h.

References CaePlugin< MT >::encoding(), and PWP_ENCODING_UNFORMATTED.

◆ isValid() [1/2]

template<typename MT >
template<typename H >
static bool CaePlugin< MT >::isValid ( h)
inlinestatic

Check if a handle is valid.

Parameters
hThe handle to validate.
Returns
true if handle is valid.

Definition at line 542 of file CaePlugin.h.

References PWP_HEGRP_ISVALID.

◆ isValid() [2/2]

template<typename MT >
static bool CaePlugin< MT >::isValid ( PWGM_HELEMENT  h)
inlinestatic

Check if an element handle is valid.

Parameters
hThe element handle to validate.
Returns
true if element handle is valid.

Definition at line 551 of file CaePlugin.h.

References PWGM_HELEMENT_ISVALID.

◆ meshLinkSupported()

template<typename MT >
static bool CaePlugin< MT >::meshLinkSupported ( CAEP_RTITEM rti,
const bool  on 
)
inlinestatic

Set the "MeshLinkSupported" CAE plugin info value.

If true, the plugin supports mesh link export.

Parameters
rtiThe plugin's runtime item data.
onSet to true if the plugin supports mesh link export. Set to false, mesh link export is not supported (default).
Returns
true on success.
Note
The plugin should also set the IndexScheme info value if the plugin does not use ZeroBased vertex indexing.
See also
assignInfoValue(), useZeroBasedIndexing(), useOneBasedIndexing(), useCustomIndexing(), MeshLinkSupported, IndexScheme

Definition at line 962 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ model() [1/2]

template<typename MT >
MT& CaePlugin< MT >::model ( )
inline

Get the grid model object.

Returns
The grid model reference.

Definition at line 64 of file CaePlugin.h.

References CaePlugin< MT >::model_.

◆ model() [2/2]

template<typename MT >
const MT& CaePlugin< MT >::model ( ) const
inline

Get the grid model object.

Returns
The grid model const reference.

Definition at line 72 of file CaePlugin.h.

References CaePlugin< MT >::model_.

◆ operator=()

template<typename MT >
CaePlugin< MT > & CaePlugin< MT >::operator= ( const CaePlugin< MT > &  rhs)
private

Private assignment operator.

Definition at line 76 of file CaePluginImpl.h.

◆ precision()

template<typename MT >
PWP_ENUM_PRECISION CaePlugin< MT >::precision ( ) const
inline

Get the export's requested numerical precision.

Returns
One of PWP_PRECISION_SINGLE or PWP_PRECISION_DOUBLE.

Definition at line 319 of file CaePlugin.h.

References CAEP_WRITEINFO::precision, and CaePlugin< MT >::writeInfo_.

Referenced by CaePlugin< MT >::isDoublePrecision(), CaePlugin< MT >::isSinglePrecision(), and CaePlugin< MT >::wrapRuntimeFile().

◆ precisionStr()

template<typename MT >
const char* CaePlugin< MT >::precisionStr ( ) const
inline

Get a string representation of the requested data precision.

Returns
The precision string. One of "single" or "double".

Definition at line 343 of file CaePlugin.h.

References CAEPU_RT_PREC_TEXT, and CaePlugin< MT >::rti_.

◆ progressBeginStep()

template<typename MT >
bool CaePlugin< MT >::progressBeginStep ( PWP_UINT32  steps) const
inline

Indicates the start of a major progress step.

This is called by the plugin's write() method. This method should called once for each step specified in setProgressMajorSteps().

Parameters
stepsThe number of sub steps within this major step.
Returns
true if the export should continue.
Note
See setProgressMajorSteps() for usage.
See also
setProgressMajorSteps(), progressIncrement(), progressEndStep()

Definition at line 204 of file CaePlugin.h.

References caeuProgressBeginStep(), and CaePlugin< MT >::rti_.

◆ progressEndStep()

template<typename MT >
bool CaePlugin< MT >::progressEndStep ( ) const
inline

Indicates the end of a major progress step.

This is called by the plugin's write() method. This method should called once for each call to progressBeginStep().

Returns
true if the export should continue.
Note
See setProgressMajorSteps() for usage.
See also
setProgressMajorSteps(), progressBeginStep(), progressIncrement()

Definition at line 229 of file CaePlugin.h.

References caeuProgressEndStep(), and CaePlugin< MT >::rti_.

◆ progressIncrement()

template<typename MT >
bool CaePlugin< MT >::progressIncrement ( ) const
inline

Indicates the completion of a progress sub step within the current major step.

This is called by the plugin's write() method. This method should called once for each sub step specified in progressBeginStep().

Returns
true if the export should continue.
Note
See setProgressMajorSteps() for usage.
See also
setProgressMajorSteps(), progressBeginStep(), progressEndStep()

Definition at line 217 of file CaePlugin.h.

References caeuProgressIncr(), and CaePlugin< MT >::rti_.

◆ publishBoolValueDef()

template<typename MT >
static bool CaePlugin< MT >::publishBoolValueDef ( CAEP_RTITEM rti,
const char  key[],
bool  value,
const char  desc[],
const char  range[] = "",
const char  access[] = "RW" 
)
inlinestatic

Publish a boolean CAE attribute definition.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
rangeThe range minimum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 822 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_BOOL.

◆ publishEnumValueDef()

template<typename MT >
static bool CaePlugin< MT >::publishEnumValueDef ( CAEP_RTITEM rti,
const char  key[],
const char  value[],
const char  desc[],
const char  range[] = "",
const char  access[] = "RW" 
)
inlinestatic

Publish an enumerated CAE attribute definition.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
rangeThe range minimum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 859 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_ENUM.

◆ publishIntValueDef() [1/3]

template<typename MT >
static bool CaePlugin< MT >::publishIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_INT  value,
const char  desc[],
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_INT CAE attribute definition without a range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
accessThe value access flags.
Returns
true on success.

Definition at line 677 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_INT.

◆ publishIntValueDef() [2/3]

template<typename MT >
static bool CaePlugin< MT >::publishIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_INT  value,
const char  desc[],
PWP_INT  minVal,
PWP_INT  maxVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_INT CAE attribute definition with a min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 698 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_INT.

◆ publishIntValueDef() [3/3]

template<typename MT >
static bool CaePlugin< MT >::publishIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_INT  value,
const char  desc[],
PWP_INT  minVal,
PWP_INT  maxVal,
PWP_INT  minTypicalVal,
PWP_INT  maxTypicalVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_INT CAE attribute definition with a min and max range and a typical min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
minTypicalValThe range typical minimum valid value.
maxTypicalValThe range typical maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 725 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_INT.

◆ publishRealValueDef() [1/3]

template<typename MT >
static bool CaePlugin< MT >::publishRealValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_REAL  value,
const char  desc[],
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_REAL CAE attribute definition without a range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
accessThe value access flags.
Returns
true on success.

Definition at line 749 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_REAL.

◆ publishRealValueDef() [2/3]

template<typename MT >
static bool CaePlugin< MT >::publishRealValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_REAL  value,
const char  desc[],
PWP_REAL  minVal,
PWP_REAL  maxVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_REAL CAE attribute definition with a min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 770 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_REAL.

◆ publishRealValueDef() [3/3]

template<typename MT >
static bool CaePlugin< MT >::publishRealValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_REAL  value,
const char  desc[],
PWP_REAL  minVal,
PWP_REAL  maxVal,
PWP_REAL  minTypicalVal,
PWP_REAL  maxTypicalVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_REAL CAE attribute definition with a min and max range and a typical min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
minTypicalValThe range typical minimum valid value.
maxTypicalValThe range typical maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 797 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_REAL.

◆ publishStringValueDef()

template<typename MT >
static bool CaePlugin< MT >::publishStringValueDef ( CAEP_RTITEM rti,
const char  key[],
const char  value[],
const char  desc[],
const char  range[] = "",
const char  access[] = "RW" 
)
inlinestatic

Publish a string CAE attribute definition.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
rangeThe range minimum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 841 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_STRING.

◆ publishUIntValueDef() [1/3]

template<typename MT >
static bool CaePlugin< MT >::publishUIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_UINT  value,
const char  desc[],
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_UINT CAE attribute definition without a range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
accessThe value access flags.
Returns
true on success.

Definition at line 603 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_UINT.

◆ publishUIntValueDef() [2/3]

template<typename MT >
static bool CaePlugin< MT >::publishUIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_UINT  value,
const char  desc[],
PWP_UINT  minVal,
PWP_UINT  maxVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_UINT CAE attribute definition with a min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 624 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_UINT.

◆ publishUIntValueDef() [3/3]

template<typename MT >
static bool CaePlugin< MT >::publishUIntValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_UINT  value,
const char  desc[],
PWP_UINT  minVal,
PWP_UINT  maxVal,
PWP_UINT  minTypicalVal,
PWP_UINT  maxTypicalVal,
const char  access[] = "RW" 
)
inlinestatic

Publish a PWP_UINT CAE attribute definition with a min and max range and a typical min and max range.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
valueThe default value.
descThe attribute description.
minValThe range minimum valid value.
maxValThe range maximum valid value.
minTypicalValThe range typical minimum valid value.
maxTypicalValThe range typical maximum valid value.
accessThe value access flags.
Returns
true on success.

Definition at line 652 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, caeuPublishValueDefinition(), and PWP_VALTYPE_UINT.

◆ publishValueDef()

template<typename MT >
static bool CaePlugin< MT >::publishValueDef ( CAEP_RTITEM rti,
const char  key[],
PWP_ENUM_VALTYPE  type,
const char  value[],
const char  desc[],
const char  range[] = "",
const char  access[] = "RW" 
)
inlinestatic

Publish a typed CAE attribute definition.

General attribute publishing method. It is usually simpler to use the type specific publishing methods.

Parameters
rtiThe plugin's runtime item data.
keyThe value key (name).
typeThe value data type.
valueThe default value as a type-appropriate string.
descThe attribute description.
rangeThe value range as a type-appropriate string.
accessThe value access flags.
Returns
true on success.
Note
These value definitions are discoverable in glyph using the pw::Application actions getCAESolverAttributeNames, get/setCAESolverAttributeDefinition, setCAESolverAttributeDefinition, and getCAESolverAttribute.
These values can be edited by the user in Pointwise using the "CAE/Set Solver Attributes..." menu.
See also
publishUIntValueDef(), publishIntValueDef(), publishRealValueDef(), publishBoolValueDef(), publishStringValueDef(), publishEnumValueDef()

Definition at line 586 of file CaePlugin.h.

References CAEP_RTITEM::BCCnt, and caeuPublishValueDefinition().

◆ run()

template<typename MT >
PWP_BOOL CaePlugin< MT >::run

Starts the export sequence.

The export sequence is:

Returns
PWP_TRUE if export succeeded.

Definition at line 34 of file CaePluginImpl.h.

References caeuProgressEnd(), caeuProgressInit(), PWP_FALSE, and PWP_TRUE.

◆ runtimeFile() [1/2]

template<typename MT >
PwpFile& CaePlugin< MT >::runtimeFile ( )
inline

Get the runtime file object.

The runtime file object is only valid for plugins using PWP_FILEDEST_FILENAME. For all other PWP_ENUM_FILEDEST types, the runtime file object must be initialized by the plugin if needed.

Returns
A reference to the runtime file object.

Definition at line 89 of file CaePlugin.h.

References CaePlugin< MT >::rtFile_.

◆ runtimeFile() [2/2]

template<typename MT >
const PwpFile& CaePlugin< MT >::runtimeFile ( ) const
inline

Get the runtime file object.

The runtime file object is only valid for plugins using PWP_FILEDEST_FILENAME. For all other PWP_ENUM_FILEDEST types, the runtime file object must be initialized by the plugin if needed.

Returns
A reference to the runtime file object.

Definition at line 85 of file CaePlugin.h.

◆ sendDebugMsg()

template<typename MT >
void CaePlugin< MT >::sendDebugMsg ( const char *  msg,
PWP_UINT32  id = 0 
) const
inline

Send a debug message.

Debug messages should be used for debugging purposes. They are normally turned off in release builds.

Parameters
msgThe message text.
idThe message id.

Definition at line 264 of file CaePlugin.h.

References caeuSendDebugMsg(), and CaePlugin< MT >::rti_.

◆ sendErrorMsg()

template<typename MT >
void CaePlugin< MT >::sendErrorMsg ( const char *  msg,
PWP_UINT32  id = 0 
) const
inline

Send an error message.

Error messages should be used to relay error details to the framework.

Parameters
msgThe message text.
idThe message id.

Definition at line 285 of file CaePlugin.h.

References caeuSendErrorMsg(), and CaePlugin< MT >::rti_.

◆ sendInfoMsg()

template<typename MT >
void CaePlugin< MT >::sendInfoMsg ( const char *  msg,
PWP_UINT32  id = 0 
) const
inline

Send an information message.

Information messages should be used to relay export details back to the framework.

Parameters
msgThe message text.
idThe message id.

Definition at line 253 of file CaePlugin.h.

References caeuSendInfoMsg(), and CaePlugin< MT >::rti_.

◆ sendWarningMsg()

template<typename MT >
void CaePlugin< MT >::sendWarningMsg ( const char *  msg,
PWP_UINT32  id = 0 
) const
inline

Send a warning message.

Warning messages should be used to relay warning details to the framework.

Parameters
msgThe message text.
idThe message id.

Definition at line 275 of file CaePlugin.h.

References caeuSendWarningMsg(), and CaePlugin< MT >::rti_.

◆ setLanguage()

template<typename MT >
void CaePlugin< MT >::setLanguage ( const char  language[])
inline

Set the active language.

If the specified language is not supported, the plugin should default to "us-english".

Parameters
languageThe language identifier.
Note
The supported language values are:
"us-english" - United States English

Definition at line 465 of file CaePlugin.h.

References PwpSetLanguage().

◆ setProgressMajorSteps()

template<typename MT >
void CaePlugin< MT >::setProgressMajorSteps ( PWP_UINT32  steps)
inline

Set the number of major export steps.

This is usually called in the plugin's beginExport() method. This method should only be called before any other calls to progressBeginStep(), progressIncrement(), or progressEndStep().

Parameters
stepsThe number of major steps.
Note
See the "Progress Reporting Methods" section for usage.
See also
progressBeginStep(), progressIncrement(), or progressEndStep()
Sample usage:

The following snippets are extracted from the CaeStrXMLCPP sample plugin.

The number of major steps is set to 3 in the CaeStrXMLCPP::beginExport() method.

CaeStrXMLCPP::beginExport()
{
return !aborted();
}

In the CaeStrXMLCPP::write() method, the three major steps are the calls to CaeStrXMLCPP::writeBlocks(), CaeStrXMLCPP::writeConnections(), and CaeStrXMLCPP::writeBoundaries().

CaeStrXMLCPP::write()
{
fputs("<?xml version='1.0' encoding='UTF-8' ?>\n", fp());
writeInfoHeader();
fprintf(fp(), "<pointwise dim='%s' type='structured'>\n",
++tabs_;
writeBlocks();
writeConnections();
writeBoundaries();
--tabs_;
fputs("</pointwise>\n", fp());
return !aborted();
}

The CaeStrXMLCPP::writeBlocks() method calls progressBeginStep() with the number of blocks as the sub step count. Then, for each block, progressIncrement() is called. And finally, progressEndStep() is called before returning.

void
CaeStrXMLCPP::writeBlocks()
{
PWP_UINT32 cnt = model_.blockCount();
if (progressBeginStep(cnt)) {
writeComment("**************** GRID BLOCKS ****************");
fprintf(fp(), "%s<blocks cnt='%lu'>\n", tabs(), (unsigned long)cnt);
++tabs_;
while (progressIncrement() && writeBlock(block)) {
++block;
}
--tabs_;
fprintf(fp(), "%s</blocks>\n", tabs());
}
}

The writeConnections() and writeBoundaries() methods indicate their progress in a similar manner.

Definition at line 190 of file CaePlugin.h.

References CaePlugin< MT >::progMajorSteps_.

◆ shadowBcTypes()

template<typename MT >
static bool CaePlugin< MT >::shadowBcTypes ( CAEP_RTITEM rti,
const char *const  shadowTypes 
)
inlinestatic

Set the "ShadowBcTypes" CAE plugin info value.

Specify which of the defined BCs types are non-inflated.

Parameters
rtiThe plugin's runtime item data.
shadowTypesVbar delimited list of non-inflated BC type names (e.g. "bc_type_name1|bc_type_name2|bc_type_name3").
Returns
true on success.
Note
Normally, if a BC is applied to a floating baffle domain, or block-to-block connection domain, the interior points are "inflated" to create a zero thickness, zero volume wall. However, if a non-inflated BC is used, the points are NOT inflated. These BC types are often used for flow-through or porous conditions.
The BC type names MUST match one of the BC types defined in the plugin's rtCaepSupportData.h header file.
See also
assignInfoValue()

Definition at line 1040 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ useCustomIndexing()

template<typename MT >
static bool CaePlugin< MT >::useCustomIndexing ( CAEP_RTITEM rti)
inlinestatic

Sets the "IndexScheme" CAE plugin info value to "Custom".

Parameters
rtiThe plugin's runtime item data.
Returns
true on success.
Note
Plugin does NOT write vertices to the mesh file in the same order as when iterating CaeUnsVertex.

In this case, the plugin must build an appropriate index map during export. After the mesh export is completed, but before returning from CaePlugin::write(), the plugin must call customIndexSchemeReady(handler) to notify the Pointwise export framework that the vertex map is ready.

Before returning from customIndexSchemeReady(handler), the Pointwise export framework will invoke the handler.mapIndex() method as needed to map PWGM indices to their corresponding exported index.

See also
assignInfoValue(), meshLinkSupported(), useZeroBasedIndexing(), useOneBasedIndexing(), MeshLinkSupported, IndexScheme, customIndexSchemeReady(), CaeUnsCustomIndexHandler, CaeStrCustomIndexHandler, PwModCustomIndexSchemeReady()

Definition at line 1020 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ useOneBasedIndexing()

template<typename MT >
static bool CaePlugin< MT >::useOneBasedIndexing ( CAEP_RTITEM rti)
inlinestatic

Sets the "IndexScheme" CAE plugin info value to "OneBased".

Parameters
rtiThe plugin's runtime item data.
Returns
true on success.
Note
Plugin writes vertices to the mesh file in the same order as returned when iterating CaeUnsVertex. In the mesh file the vertices are indexed as 1 to NumVerts.
See also
assignInfoValue(), meshLinkSupported(), useZeroBasedIndexing(), useCustomIndexing(), MeshLinkSupported, IndexScheme

Definition at line 994 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ useZeroBasedIndexing()

template<typename MT >
static bool CaePlugin< MT >::useZeroBasedIndexing ( CAEP_RTITEM rti)
inlinestatic

Sets the "IndexScheme" CAE plugin info value to "ZeroBased".

Parameters
rtiThe plugin's runtime item data.
Returns
true on success.
Note
Plugin writes vertices to the mesh file in the same order as returned when iterating CaeUnsVertex. In the mesh file the vertices are indexed as 0 to NumVerts-1.
See also
assignInfoValue(), meshLinkSupported(), useOneBasedIndexing(), useCustomIndexing(), MeshLinkSupported, IndexScheme

Definition at line 978 of file CaePlugin.h.

References CaePlugin< MT >::assignInfoValue().

◆ wrapRuntimeFile()

template<typename MT >
void CaePlugin< MT >::wrapRuntimeFile ( )
inlineprivate

Pass ownership of the runtime FILE pointer to a PwpFile object.

For plugins using PWP_FILEDEST_FILENAME, f.wrap() is called using the runtime FILE pointer fp() and the requested exportDestination() and encoding() mode.

For plugins using other PWP_ENUM_FILEDEST types, fp() is null. As a result, f.wrap(0) is called.

In all cases, f's precision and byte order are assigned using the values returned from precision() and byteOrder().

Returns
Reference to the file object f.
Note
This method makes f the owner of the runtime FILE pointer. Any future calls to fp() will return null.
The runtime FILE pointer will be closed in f's destructor.

Definition at line 1109 of file CaePlugin.h.

References CaePlugin< MT >::byteOrder(), CaePlugin< MT >::encoding(), CaePlugin< MT >::exportDestination(), CAEP_RTITEM::fp, CaePlugin< MT >::precision(), PWP_ENCODING_ASCII, PWP_ENCODING_BINARY, PWP_ENCODING_UNFORMATTED, pwpAscii, pwpBinary, pwpUnformatted, pwpWrite, CaePlugin< MT >::rtFile_, CaePlugin< MT >::rti_, PwpFile::setByteOrder(), PwpFile::setPrecision(), and PwpFile::wrap().

Referenced by CaePlugin< MT >::CaePlugin().

◆ write()

template<typename MT >
virtual PWP_BOOL CaePlugin< MT >::write ( )
privatepure virtual

Called once by run() to perform the export logic.

A plugin must implement this pure virtual method to perform the plugin's export behavior.

Returns
true on success.
See also
run(), beginExport(), endExport()

Member Data Documentation

◆ model_

template<typename MT >
MT CaePlugin< MT >::model_
protected

The grid model being exported.

Definition at line 1137 of file CaePlugin.h.

Referenced by CaePlugin< MT >::model().

◆ progMajorSteps_

template<typename MT >
PWP_UINT32 CaePlugin< MT >::progMajorSteps_
protected

# of major export steps.

Definition at line 1139 of file CaePlugin.h.

Referenced by CaePlugin< MT >::setProgressMajorSteps().

◆ rtFile_

template<typename MT >
PwpFile CaePlugin< MT >::rtFile_
protected

runtime file object

Definition at line 1140 of file CaePlugin.h.

Referenced by CaePlugin< MT >::fp(), CaePlugin< MT >::runtimeFile(), and CaePlugin< MT >::wrapRuntimeFile().

◆ rti_

template<typename MT >
CAEP_RTITEM& CaePlugin< MT >::rti_
protected

◆ writeInfo_

template<typename MT >
const CAEP_WRITEINFO& CaePlugin< MT >::writeInfo_
protected

The documentation for this class was generated from the following files:
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CaePlugin::progressIncrement
bool progressIncrement() const
Indicates the completion of a progress sub step within the current major step.
Definition: CaePlugin.h:217
CaePlugin::fp
FILE * fp() const
Get the FILE pointer wrapped by the runtime file object.
Definition: CaePlugin.h:99
CaePlugin::dimensionStr
const char * dimensionStr() const
Get a string representation of the requested data dimensionality.
Definition: CaePlugin.h:416
CaeStrBlock
The structured block class.
Definition: CaeStrBlock.h:72
CaePlugin::aborted
bool aborted() const
Check if an export has been aborted.
Definition: CaePlugin.h:296
CaePlugin::setProgressMajorSteps
void setProgressMajorSteps(PWP_UINT32 steps)
Set the number of major export steps.
Definition: CaePlugin.h:190
CaePlugin::model_
MT model_
The grid model being exported.
Definition: CaePlugin.h:1137
CaePlugin::progressEndStep
bool progressEndStep() const
Indicates the end of a major progress step.
Definition: CaePlugin.h:229
CaePlugin::progressBeginStep
bool progressBeginStep(PWP_UINT32 steps) const
Indicates the start of a major progress step.
Definition: CaePlugin.h:204