Pointwise Plugin SDK
|
The grid model base class. More...
#include <CaeGridModel.h>
Public Member Functions | |
PWP_UINT32 | blockCount () const |
Get the number of blocks in the model. More... | |
template<typename T > | |
bool | getAttribute (const char *name, T &val) const |
Templated method that gets the value of a published plugin attribute. More... | |
operator PWGM_HGRIDMODEL () const | |
The PWGM_HGRIDMODEL cast operator. More... | |
CaeGridModel & | operator= (const CaeGridModel &rhs) |
The assignment operator. More... | |
bool | getAttribute (const char *name, const char *&val, const char *defVal) const |
bool | getAttribute (const char *name, PWP_UINT &val, PWP_UINT defVal) const |
bool | getAttribute (const char *name, PWP_UINT32 &val, PWP_UINT32 defVal) const |
bool | getAttribute (const char *name, PWP_INT &val, PWP_INT defVal) const |
bool | getAttribute (const char *name, PWP_INT32 &val, PWP_INT32 defVal) const |
bool | getAttribute (const char *name, PWP_REAL &val, PWP_REAL defVal) const |
bool | getAttribute (const char *name, PWP_FLOAT &val, PWP_FLOAT defVal) const |
bool | getAttribute (const char *name, bool &val, bool defVal) const |
bool | getAttributeEnum (const char *name, const char *&val, const char *defVal) const |
Protected Member Functions | |
CaeGridModel (const CaeGridModel &src) | |
Copy constructor. More... | |
CaeGridModel (PWGM_HGRIDMODEL model) | |
Constructor. More... | |
~CaeGridModel () | |
Destructor. More... | |
Protected Attributes | |
PWGM_HGRIDMODEL | model_ |
The bound PWGM_HGRIDMODEL. More... | |
The grid model base class.
The CaeGridModel class implements the data and functionality common to both structured and unstructured grid models. This common interface consists of a collection of blocks and a collection of named attribute values of a specific type.
The blocks are indexed from 0 to CaeGridModel::blockCount() - 1. Each block has associated condition data.
The attribute values are accessed by name. Several common attributes are published by the SDK for use by all plugins. Additional, custom attributes can be published by the plugin itself. All attributes are settable by the user through the Pointwise user interface or through the glyph scripting language.
CaeGridModel is subclassed by the CaeUnsGridModel and CaeStrGridModel classes. These subclasses implement the functionality specific to each grid model type.
Definition at line 46 of file CaeGridModel.h.
|
protected |
Constructor.
This class is not used directly by plugins.
model | The model handle to bind. |
Definition at line 19 of file CaeGridModel.cxx.
|
protected |
Copy constructor.
Binds this model to the same model as src.
src | A grid model instance. |
Definition at line 24 of file CaeGridModel.cxx.
|
protected |
Destructor.
Definition at line 29 of file CaeGridModel.cxx.
PWP_UINT32 CaeGridModel::blockCount | ( | ) | const |
Get the number of blocks in the model.
Definition at line 35 of file CaeGridModel.cxx.
References model_, and PwModBlockCount().
bool CaeGridModel::getAttribute | ( | const char * | name, |
bool & | val, | ||
bool | defVal | ||
) | const |
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 91 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeBOOL().
bool CaeGridModel::getAttribute | ( | const char * | name, |
const char *& | val, | ||
const char * | defVal | ||
) | const |
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 42 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeString().
Referenced by getAttribute().
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 84 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeFLOAT().
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 63 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeINT().
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 77 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeREAL().
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 49 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeUINT().
bool CaeGridModel::getAttribute | ( | const char * | name, |
PWP_UINT32 & | val, | ||
PWP_UINT32 | defVal | ||
) | const |
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
|
inline |
Templated method that gets the value of a published plugin attribute.
Gets an attribute's value without providing a default value.
name | The published attribute name. |
val | The published attribute value. |
Definition at line 126 of file CaeGridModel.h.
References getAttribute().
bool CaeGridModel::getAttributeEnum | ( | const char * | name, |
const char *& | val, | ||
const char * | defVal | ||
) | const |
Gets the value of a published plugin attribute.
Plugin attributes are created in a plugin's create() function using one of the CaePlugin::publishXxxValueDef() methods.
name | The published attribute name. |
val | The published attribute value. |
defVal | If name does not exist, this value is returned. |
Definition at line 103 of file CaeGridModel.cxx.
References model_, and PwModGetAttributeEnum().
|
inline |
The PWGM_HGRIDMODEL cast operator.
Definition at line 140 of file CaeGridModel.h.
References model_.
CaeGridModel & CaeGridModel::operator= | ( | const CaeGridModel & | rhs | ) |
The assignment operator.
Rebind this instance to the same grid model as rhs.
rhs | A grid model instance. |
Definition at line 111 of file CaeGridModel.cxx.
References model_.
|
protected |
The bound PWGM_HGRIDMODEL.
Definition at line 145 of file CaeGridModel.h.
Referenced by CaeUnsGridModel::appendEnumElementOrder(), blockCount(), CaeStrGridModel::customIndexSchemeReady(), CaeUnsGridModel::customIndexSchemeReady(), CaeUnsGridModel::defaultEnumElementOrder(), getAttribute(), getAttributeEnum(), operator PWGM_HGRIDMODEL(), operator=(), CaeUnsGridModel::operator=(), CaeUnsGridModel::patchCount(), CaeUnsGridModel::streamFaces(), and CaeUnsGridModel::vertexCount().