MOAB: Mesh Oriented datABase  (version 5.5.0)
Tags
+ Collaboration diagram for Tags:

Functions

void iMesh_createTag (iMesh_Instance instance, const char *tag_name, const int tag_size, const int tag_type, iBase_TagHandle *tag_handle, int *err, const int tag_name_len)
 Create a tag with specified name, size, and type. More...
 
void iMesh_destroyTag (iMesh_Instance instance, iBase_TagHandle tag_handle, const int forced, int *err)
 Destroy a tag. More...
 
void iMesh_getTagName (iMesh_Instance instance, const iBase_TagHandle tag_handle, char *name, int *err, int name_len)
 Get the name for a given tag handle. More...
 
void iMesh_getTagSizeValues (iMesh_Instance instance, const iBase_TagHandle tag_handle, int *tag_size, int *err)
 Get size of a tag in units of numbers of tag data type. More...
 
void iMesh_getTagSizeBytes (iMesh_Instance instance, const iBase_TagHandle tag_handle, int *tag_size, int *err)
 Get size of a tag in units of bytes. More...
 
void iMesh_getTagHandle (iMesh_Instance instance, const char *tag_name, iBase_TagHandle *tag_handle, int *err, int tag_name_len)
 Get a the handle of an existing tag with the specified name. More...
 
void iMesh_getTagType (iMesh_Instance instance, const iBase_TagHandle tag_handle, int *tag_type, int *err)
 Get the data type of the specified tag handle. More...
 
void iMesh_getAllEntSetTags (iMesh_Instance instance, const iBase_EntitySetHandle entity_set_handle, iBase_TagHandle **tag_handles, int *tag_handles_allocated, int *tag_handles_size, int *err)
 Get all the tags associated with a specified entity set. More...
 
void iMesh_rmvEntSetTag (iMesh_Instance instance, iBase_EntitySetHandle entity_set_handle, const iBase_TagHandle tag_handle, int *err)
 Remove a tag value from an entity set. More...
 
void iMesh_rmvArrTag (iMesh_Instance instance, const iBase_EntityHandle *entity_handles, const int entity_handles_size, const iBase_TagHandle tag_handle, int *err)
 Remove a tag value from an array of entities. More...
 
void iMesh_getAllTags (iMesh_Instance instance, const iBase_EntityHandle entity_handle, iBase_TagHandle **tag_handles, int *tag_handles_allocated, int *tag_handles_size, int *err)
 Get all the tags associated with a specified entity handle. More...
 
void iMesh_rmvTag (iMesh_Instance instance, iBase_EntityHandle entity_handle, const iBase_TagHandle tag_handle, int *err)
 Remove a tag value from an entity. More...
 
void iMesh_getAllIfaceTags (iMesh_Instance instance, iBase_TagHandle **tag_handles, int *tag_handles_allocated, int *tag_handles_size, int *err)
 Get all the tags associated with the entire interface. More...
 
void iMesh_createTagWithOptions (iMesh_Instance instance, const char *tag_name, const char *tmp_tag_options, const int tag_size, const int tag_type, iBase_TagHandle *tag_handle, int *err, const int tag_name_len, const int tag_options_len)
 Create a tag with options. More...
 

Detailed Description

Function Documentation

◆ iMesh_createTag()

void iMesh_createTag ( iMesh_Instance  instance,
const char *  tag_name,
const int  tag_size,
const int  tag_type,
iBase_TagHandle tag_handle,
int *  err,
const int  tag_name_len 
)

Create a tag with specified name, size, and type.

Create a tag with specified name, size, and type. Tag size is in units of size of tag_type data types. Value input for tag type must be value in iBase_TagType enumeration.

Parameters
[in]instanceiMesh instance handle
[in]tag_nameCharacter string indicating tag name
[in]tag_sizeSize of each tag value, in units of number of tag_type datums.
[in]tag_typeData type for data stored in this tag
[out]tag_handlePointer to tag handle returned from function
[out]errReturned Error status (see iBase_ErrorType)
[in]tag_name_lenLength of tag name string (String Length Arguments)

Definition at line 1483 of file iMesh_MOAB.cpp.

1490 {
1491  iMesh_createTagWithOptions( instance, tag_name, NULL, tag_size, tag_type, tag_handle, err, tag_name_size, 0 );
1492 }

References iMesh_createTagWithOptions().

◆ iMesh_createTagWithOptions()

void iMesh_createTagWithOptions ( iMesh_Instance  instance,
const char *  tag_name,
const char *  tmp_tag_options,
const int  tag_size,
const int  tag_type,
iBase_TagHandle tag_handle,
int *  err,
const int  tag_name_len,
const int  tag_options_len 
)

Create a tag with options.

Create a tag with options; allows creation of Dense and Bit tags through iMesh Allowable options are: TAG_STORAGE_TYPE={DENSE | SPARSE | BIT | MESH} TAG_DEFAULT_VALUE=

(data type of value should match tag data type) [in] length of options string

Parameters
[in]instanceiMesh instance handle
[in]tag_nametag name
[in]tmp_tag_optionsoptions string
[in]tag_sizetag size, in number of values
[in]tag_typetag data type (int, double, etc.)
[out]tag_handlehandle of new tag
[out]errerror
[in]tag_name_lenlength of tag name string

Definition at line 3042 of file iMesh_MOAB.cpp.

3051 {
3052  if( tag_size < 0 ) ERROR( iBase_INVALID_ARGUMENT, "iMesh_createTag: invalid tag size" );
3054 
3055  std::string tmp_tagname( tag_name, tag_name_len );
3056  eatwhitespace( tmp_tagname );
3057 
3058  moab::TagType storage = MB_TAG_SPARSE;
3059  ErrorCode result;
3060 
3061  // declared here 'cuz might have to hold destination of a default value ptr
3062  std::string storage_type;
3063  const void* def_val = NULL;
3064  std::vector< int > def_int;
3065  std::vector< double > def_dbl;
3066  std::vector< moab::EntityHandle > def_handles;
3067  int dum_int;
3068  double dum_dbl;
3069 
3070  if( 0 != tag_options_len )
3071  {
3072  std::string tag_options = filter_options( tmp_tag_options, tmp_tag_options + tag_options_len );
3073  FileOptions opts( tag_options.c_str() );
3074  const char* option_vals[] = { "SPARSE", "DENSE", "BIT", "MESH" };
3077  int opt_num = -1;
3078  result = opts.match_option( "TAG_STORAGE_TYPE", option_vals, opt_num );
3079  if( MB_FAILURE == result )
3080  ERROR( result, "iMesh_createTagWithOptions: option string not recognized." );
3081  else if( MB_SUCCESS == result )
3082  {
3083  assert( opt_num >= 0 && opt_num <= 3 );
3084  storage = opt_types[opt_num];
3085  }
3086 
3087  // now look for default value option; reuse storage_type
3088  storage_type.clear();
3089  result = opts.get_option( "TAG_DEFAULT_VALUE", storage_type );
3090  if( MB_SUCCESS == result )
3091  {
3092  // ok, need to parse the string into a proper default value
3093  switch( tag_type )
3094  {
3095  case iBase_INTEGER:
3096  result = opts.get_int_option( "TAG_DEFAULT_VALUE", dum_int );
3097  def_int.resize( tag_size );
3098  std::fill( def_int.begin(), def_int.end(), dum_int );
3099  def_val = &def_int[0];
3100  break;
3101  case iBase_DOUBLE:
3102  result = opts.get_real_option( "TAG_DEFAULT_VALUE", dum_dbl );
3103  def_dbl.resize( tag_size );
3104  std::fill( def_dbl.begin(), def_dbl.end(), dum_dbl );
3105  def_val = &def_dbl[0];
3106  break;
3107  case iBase_ENTITY_HANDLE:
3108  // for default handle, will have to use int
3109  result = opts.get_int_option( "TAG_DEFAULT_VALUE", dum_int );
3110  if( 0 > dum_int )
3111  ERROR( result, "iMesh_createTagWithOptions: for default handle-type tag, "
3112  "must use non-negative int on input." );
3113  def_handles.resize( tag_size );
3114  std::fill( def_handles.begin(), def_handles.end(), (moab::EntityHandle)dum_int );
3115  def_val = &def_handles[0];
3116  break;
3117  case iBase_BYTES:
3118  if( (int)storage_type.length() < tag_size )
3119  ERROR( result, "iMesh_createTagWithOptions: default value for byte-type "
3120  "tag must be large enough to store tag value." );
3121  def_val = storage_type.c_str();
3122  break;
3123  }
3124  }
3125  }
3126 
3127  moab::Tag new_tag;
3128  result = MOABI->tag_get_handle( tmp_tagname.c_str(), tag_size, mb_data_type_table[tag_type], new_tag,
3129  storage | MB_TAG_EXCL, def_val );
3130 
3131  if( MB_SUCCESS != result )
3132  {
3133  std::string msg( "iMesh_createTag: " );
3134  if( MB_ALREADY_ALLOCATED == result )
3135  {
3136  msg += "Tag already exists with name: \"";
3137  *tag_handle = (iBase_TagHandle)new_tag;
3138  }
3139  else
3140  msg += "Failed to create tag with name: \"";
3141  msg += tag_name;
3142  msg += "\".";
3143  ERROR( result, msg.c_str() );
3144  }
3145 
3146  if( tag_type == iBase_ENTITY_HANDLE )
3147  MBIMESHI->note_ent_handle_tag( new_tag );
3148  else if( tag_type == iBase_ENTITY_SET_HANDLE )
3149  MBIMESHI->note_set_handle_tag( new_tag );
3150 
3151  *tag_handle = (iBase_TagHandle)new_tag;
3152 
3153  RETURN( iBase_SUCCESS );
3154 
3155  /* old implementation:
3156  Tag new_tag;
3157  int this_size = tag_size;
3158 
3159  ErrorCode result = MOABI->tag_get_handle(tmp_tagname.c_str(),
3160  this_size,
3161  mb_data_type_table[tag_type],
3162  new_tag,
3163  MB_TAG_SPARSE|MB_TAG_EXCL);
3164 
3165  if (MB_SUCCESS != result) {
3166  std::string msg("iMesh_createTag: ");
3167  if (MB_ALREADY_ALLOCATED == result) {
3168  msg += "Tag already exists with name: \"";
3169  *tag_handle = (iBase_TagHandle) new_tag;
3170  }
3171  else
3172  msg += "Failed to create tag with name: \"";
3173  msg += tag_name;
3174  msg += "\".";
3175  ERROR(result,msg.c_str());
3176  }
3177 
3178  if (tag_type == iBase_ENTITY_HANDLE)
3179  MBIMESHI->note_ent_handle_tag( new_tag );
3180  else if (tag_type == iBase_ENTITY_SET_HANDLE)
3181  MBIMESHI->note_set_handle_tag( new_tag );
3182 
3183  *tag_handle = (iBase_TagHandle) new_tag;
3184  */
3185 }

References CHKENUM, eatwhitespace(), ERROR, ErrorCode, filter_options(), moab::FileOptions::get_int_option(), moab::FileOptions::get_option(), moab::FileOptions::get_real_option(), iBase_BYTES, iBase_DOUBLE, iBase_ENTITY_HANDLE, iBase_ENTITY_SET_HANDLE, iBase_INTEGER, iBase_INVALID_ARGUMENT, iBase_SUCCESS, moab::FileOptions::match_option(), MB_ALREADY_ALLOCATED, mb_data_type_table, MB_SUCCESS, MB_TAG_BIT, MB_TAG_DENSE, MB_TAG_EXCL, MB_TAG_MESH, MB_TAG_SPARSE, MBIMESHI, MOABI, RETURN, and TagType.

Referenced by iMesh_createTag().

◆ iMesh_destroyTag()

void iMesh_destroyTag ( iMesh_Instance  instance,
iBase_TagHandle  tag_handle,
const int  forced,
int *  err 
)

Destroy a tag.

Destroy a tag. If forced is non-zero and entities still have values set for this tag, tag is deleted anyway and those values disappear, otherwise tag is not deleted.

Parameters
[in]instanceiMesh instance handle
[in]tag_handleHandle of tag to be deleted
[in]forcedIf non-zero, delete the tag even if entities have values set for the tag.
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1494 of file iMesh_MOAB.cpp.

1498 {
1499  // might need to check if it's used first
1500  if( false == forced )
1501  {
1502  Range ents;
1503  ErrorCode result;
1504  Tag this_tag = TAG_HANDLE( tag_handle );
1505  for( EntityType this_type = MBVERTEX; this_type != MBMAXTYPE; this_type++ )
1506  {
1507  result = MOABI->get_entities_by_type_and_tag( 0, this_type, &this_tag, NULL, 1, ents, Interface::UNION );CHKERR( result, "iMesh_destroyTag: problem finding tag." );
1508  if( !ents.empty() )
1509  {
1510  ERROR( iBase_TAG_IN_USE, "iMesh_destroyTag: forced=false and entities"
1511  " are still assigned this tag." );
1512  }
1513  }
1514  // check if tag value is set on mesh
1515  const void* data_ptr;
1516  EntityHandle root = 0;
1517  result = MOABI->tag_get_by_ptr( this_tag, &root, 1, &data_ptr );
1518  if( MB_SUCCESS == result )
1519  ERROR( iBase_TAG_IN_USE, "iMesh_destroyTag: forced=false and mesh"
1520  " is still assigned this tag." );
1521  }
1522 
1523  // ok, good to go - either forced or no entities with this tag
1524  ErrorCode result = MOABI->tag_delete( TAG_HANDLE( tag_handle ) );
1525  if( MB_SUCCESS != result && MB_TAG_NOT_FOUND != result ) ERROR( result, "iMesh_destroyTag: problem deleting tag." );
1526 
1527  if( MB_SUCCESS == result ) MBIMESHI->note_tag_destroyed( TAG_HANDLE( tag_handle ) );
1528 
1529  RETURN( iBase_ERROR_MAP[result] );
1530 }

References CHKERR, moab::Range::empty(), ERROR, ErrorCode, iBase_ERROR_MAP, iBase_TAG_IN_USE, MB_SUCCESS, MB_TAG_NOT_FOUND, MBIMESHI, MBMAXTYPE, MBVERTEX, MOABI, RETURN, and TAG_HANDLE.

◆ iMesh_getAllEntSetTags()

void iMesh_getAllEntSetTags ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set_handle,
iBase_TagHandle **  tag_handles,
int *  tag_handles_allocated,
int *  tag_handles_size,
int *  err 
)

Get all the tags associated with a specified entity set.

Get all the tags associated with a specified entity set

Parameters
[in]instanceiMesh instance handle
[in]entity_set_handleEntity being queried
[in,out]tag_handlesPointer to array of tag_handles returned from Array pointer, allocated and occupied sizes argument trio)
[in,out]tag_handles_allocatedPointer to allocated size of tag_handles
[out]tag_handles_sizePointer to occupied size of tag_handles array
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1765 of file iMesh_MOAB.cpp.

1771 {
1772  EntityHandle eh = ENTITY_HANDLE( entity_set_handle );
1773  std::vector< Tag > all_tags;
1774 
1775  ErrorCode result = MOABI->tag_get_tags_on_entity( eh, all_tags );CHKERR( result, "iMesh_entitysetGetAllTagHandles failed." );
1776 
1777  remove_var_len_tags( MOABI, all_tags );
1778 
1779  // now put those tag handles into sidl array
1780  ALLOC_CHECK_ARRAY_NOFAIL( tag_handles, all_tags.size() );
1781  memcpy( *tag_handles, &all_tags[0], all_tags.size() * sizeof( Tag ) );
1782 
1783  *tag_handles_size = (int)all_tags.size();
1784  RETURN( iBase_SUCCESS );
1785 }

References ALLOC_CHECK_ARRAY_NOFAIL, CHKERR, ENTITY_HANDLE, ErrorCode, iBase_SUCCESS, MOABI, remove_var_len_tags(), and RETURN.

◆ iMesh_getAllIfaceTags()

void iMesh_getAllIfaceTags ( iMesh_Instance  instance,
iBase_TagHandle **  tag_handles,
int *  tag_handles_allocated,
int *  tag_handles_size,
int *  err 
)

Get all the tags associated with the entire interface.

Get all the tags associated with the entire interface

Definition at line 1617 of file iMesh_MOAB.cpp.

1622 {
1623  std::vector< Tag > all_tags;
1624 
1625  ErrorCode result = MOABI->tag_get_tags( all_tags );CHKERR( result, "iMesh_getAllIfaceTags failed." );
1626 
1627  remove_var_len_tags( MOABI, all_tags );
1628 
1629  // now put those tag handles into sidl array
1630  ALLOC_CHECK_ARRAY_NOFAIL( tag_handles, all_tags.size() );
1631  memcpy( *tag_handles, &all_tags[0], all_tags.size() * sizeof( Tag ) );
1632  *tag_handles_size = all_tags.size();
1633 
1634  RETURN( iBase_SUCCESS );
1635 }

References ALLOC_CHECK_ARRAY_NOFAIL, CHKERR, ErrorCode, iBase_SUCCESS, MOABI, remove_var_len_tags(), and RETURN.

◆ iMesh_getAllTags()

void iMesh_getAllTags ( iMesh_Instance  instance,
const iBase_EntityHandle  entity_handle,
iBase_TagHandle **  tag_handles,
int *  tag_handles_allocated,
int *  tag_handles_size,
int *  err 
)

Get all the tags associated with a specified entity handle.

Get all the tags associated with a specified entity handle

Parameters
[in]instanceiMesh instance handle
[in]entity_handleEntity being queried
[in,out]tag_handlesPointer to array of tag_handles returned from Array pointer, allocated and occupied sizes argument trio)
[in,out]tag_handles_allocatedPointer to allocated size of tag_handles
[out]tag_handles_sizePointer to occupied size of tag_handles array
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 2218 of file iMesh_MOAB.cpp.

2224 {
2225  std::vector< Tag > all_tags;
2226 
2227  ErrorCode result = MOABI->tag_get_tags_on_entity( ENTITY_HANDLE( entity_handle ), all_tags );CHKERR( result, "iMesh_getAllTags failed." );
2228 
2229  remove_var_len_tags( MOABI, all_tags );
2230 
2231  // now put those tag handles into sidl array
2232  ALLOC_CHECK_ARRAY_NOFAIL( tag_handles, all_tags.size() );
2233  memcpy( *tag_handles, &all_tags[0], all_tags.size() * sizeof( Tag ) );
2234  *tag_handles_size = all_tags.size();
2235 
2236  RETURN( iBase_SUCCESS );
2237 }

References ALLOC_CHECK_ARRAY_NOFAIL, CHKERR, ENTITY_HANDLE, ErrorCode, iBase_SUCCESS, MOABI, remove_var_len_tags(), and RETURN.

◆ iMesh_getTagHandle()

void iMesh_getTagHandle ( iMesh_Instance  instance,
const char *  tag_name,
iBase_TagHandle tag_handle,
int *  err,
int  tag_name_len 
)

Get a the handle of an existing tag with the specified name.

Get a the handle of an existing tag with the specified name

Parameters
[in]instanceiMesh instance handle
[in]tag_nameName of tag being queried
[out]tag_handlePointer to tag handle returned from function
[out]errReturned Error status (see iBase_ErrorType)
[in]tag_name_lenLength of tag name string (String Length Arguments)

Definition at line 1591 of file iMesh_MOAB.cpp.

1596 {
1597  std::string tmp_tagname( tag_name, tag_name_len );
1598  eatwhitespace( tmp_tagname );
1599 
1600  ErrorCode result = MOABI->tag_get_handle( tmp_tagname.c_str(), 0, MB_TYPE_OPAQUE, (Tag&)*tag_handle, MB_TAG_ANY );
1601 
1602  if( MB_SUCCESS != result )
1603  {
1604  std::string msg( "iMesh_getTagHandle: problem getting handle for tag named '" );
1605  msg += std::string( tag_name ) + std::string( "'" );
1606  *tag_handle = 0;
1607  ERROR( result, msg.c_str() );
1608  }
1609 
1610  // do not return variable-length tags through ITAPS API
1611  int size;
1612  if( MB_SUCCESS != MOABI->tag_get_length( TAG_HANDLE( *tag_handle ), size ) ) RETURN( iBase_TAG_NOT_FOUND );
1613 
1614  RETURN( iBase_SUCCESS );
1615 }

References eatwhitespace(), ERROR, ErrorCode, iBase_SUCCESS, iBase_TAG_NOT_FOUND, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_OPAQUE, MOABI, RETURN, size, and TAG_HANDLE.

◆ iMesh_getTagName()

void iMesh_getTagName ( iMesh_Instance  instance,
const iBase_TagHandle  tag_handle,
char *  name,
int *  err,
int  name_len 
)

Get the name for a given tag handle.

Get the name for a given tag handle

Parameters
[in]instanceiMesh instance handle
[in]tag_handleTag handle being queried
[in,out]namePointer to character string to store name returned from
[out]errReturned Error status (see iBase_ErrorType)
[in]name_lenLength of character string input to function (String Length Arguments)

Definition at line 1532 of file iMesh_MOAB.cpp.

1537 {
1538  static ::std::string name;
1539  ErrorCode result = MOABI->tag_get_name( TAG_HANDLE( tag_handle ), name );CHKERR( result, "iMesh_getTagName: problem getting name." );
1540 
1541  strncpy( out_data, name.c_str(), out_data_len );
1542  RETURN( iBase_SUCCESS );
1543 }

References CHKERR, ErrorCode, iBase_SUCCESS, MOABI, RETURN, and TAG_HANDLE.

Referenced by iMesh_getArrData().

◆ iMesh_getTagSizeBytes()

void iMesh_getTagSizeBytes ( iMesh_Instance  instance,
const iBase_TagHandle  tag_handle,
int *  tag_size,
int *  err 
)

Get size of a tag in units of bytes.

Get size of a tag in units of bytes

Parameters
[in]instanceiMesh instance handle
[in]tag_handleHandle of tag being queried
[out]tag_sizePointer to tag size returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1581 of file iMesh_MOAB.cpp.

1585 {
1586  ErrorCode result = MOABI->tag_get_bytes( TAG_HANDLE( tag_handle ), *tag_size_bytes );CHKERR( result, "iMesh_getTagSize: problem getting size." );
1587 
1588  RETURN( iBase_SUCCESS );
1589 }

References CHKERR, ErrorCode, iBase_SUCCESS, MOABI, RETURN, and TAG_HANDLE.

Referenced by iMesh_setArrData().

◆ iMesh_getTagSizeValues()

void iMesh_getTagSizeValues ( iMesh_Instance  instance,
const iBase_TagHandle  tag_handle,
int *  tag_size,
int *  err 
)

Get size of a tag in units of numbers of tag data type.

Get size of a tag in units of numbers of tag data type

Parameters
[in]instanceiMesh instance handle
[in]tag_handleHandle of tag being queried
[out]tag_sizePointer to tag size returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1571 of file iMesh_MOAB.cpp.

1575 {
1576  ErrorCode result = MOABI->tag_get_length( TAG_HANDLE( tag_handle ), *tag_size_val );CHKERR( result, "iMesh_getTagSize: problem getting size." );
1577 
1578  RETURN( iBase_SUCCESS );
1579 }

References CHKERR, ErrorCode, iBase_SUCCESS, MOABI, RETURN, and TAG_HANDLE.

◆ iMesh_getTagType()

void iMesh_getTagType ( iMesh_Instance  instance,
const iBase_TagHandle  tag_handle,
int *  tag_type,
int *  err 
)

Get the data type of the specified tag handle.

Get the data type of the specified tag handle. Tag type is a value in the iBase_TagType enumeration.

Parameters
[in]instanceiMesh instance handle
[in]tag_handleHandle for the tag being queried
[out]tag_typePointer to tag type returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1545 of file iMesh_MOAB.cpp.

1549 {
1550  DataType this_type;
1551  ErrorCode result = MOABI->tag_get_data_type( TAG_HANDLE( tag_handle ), this_type );CHKERR( result, "iMesh_getTagType: problem getting type." );
1552 
1553  if( this_type != MB_TYPE_HANDLE )
1554  *value_type = tstt_data_type_table[this_type];
1555  else if( MBIMESHI->is_set_handle_tag( TAG_HANDLE( tag_handle ) ) )
1556  *value_type = iBase_ENTITY_SET_HANDLE;
1557  else if( MBIMESHI->is_ent_handle_tag( TAG_HANDLE( tag_handle ) ) )
1558  *value_type = iBase_ENTITY_HANDLE;
1559  else
1560  {
1561  result = check_handle_tag_type( TAG_HANDLE( tag_handle ), MBIMESHI );CHKERR( result, "iMesh_getTagType: problem guessing handle tag subtype" );
1562  if( MBIMESHI->is_set_handle_tag( TAG_HANDLE( tag_handle ) ) )
1563  *value_type = iBase_ENTITY_SET_HANDLE;
1564  else
1565  *value_type = iBase_ENTITY_HANDLE;
1566  }
1567 
1568  RETURN( iBase_SUCCESS );
1569 }

References check_handle_tag_type(), CHKERR, ErrorCode, iBase_ENTITY_HANDLE, iBase_ENTITY_SET_HANDLE, iBase_SUCCESS, MB_TYPE_HANDLE, MBIMESHI, MOABI, RETURN, TAG_HANDLE, and tstt_data_type_table.

◆ iMesh_rmvArrTag()

void iMesh_rmvArrTag ( iMesh_Instance  instance,
const iBase_EntityHandle entity_handles,
const int  entity_handles_size,
const iBase_TagHandle  tag_handle,
int *  err 
)

Remove a tag value from an array of entities.

Remove a tag value from an array of entities

Parameters
[in]instanceiMesh instance handle
[in]entity_handlesEntity from which tag is being removed
[in]entity_handles_sizeNumber of entities in entity array
[in]tag_handleTag handle of tag being removed
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 2085 of file iMesh_MOAB.cpp.

2090 {
2091  if( 0 == entity_handles_size ) RETURN( iBase_SUCCESS );
2092  CHKNONEMPTY();
2093 
2094  ErrorCode result = MOABI->tag_delete_data( TAG_HANDLE( tag_handle ), CONST_HANDLE_ARRAY_PTR( entity_handles ),
2095  entity_handles_size );
2096 
2097  // don't return an error if the tag simply wasn't set on the entities
2098  if( MB_TAG_NOT_FOUND == result )
2099  RETURN( iBase_SUCCESS );
2100  else
2101  RETURN( iBase_ERROR_MAP[result] );
2102 }

References CHKNONEMPTY, CONST_HANDLE_ARRAY_PTR, ErrorCode, iBase_ERROR_MAP, iBase_SUCCESS, MB_TAG_NOT_FOUND, MOABI, RETURN, and TAG_HANDLE.

Referenced by iMesh_rmvTag().

◆ iMesh_rmvEntSetTag()

void iMesh_rmvEntSetTag ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set_handle,
const iBase_TagHandle  tag_handle,
int *  err 
)

Remove a tag value from an entity set.

Remove a tag value from an entity set

Parameters
[in]instanceiMesh instance handle
[in]entity_set_handleEntity set from which tag is being removed
[in]tag_handleTag handle of tag being removed
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1787 of file iMesh_MOAB.cpp.

1791 {
1792  EntityHandle set = ENTITY_HANDLE( entity_set_handle );
1793  ErrorCode result = MOABI->tag_delete_data( TAG_HANDLE( tag_handle ), &set, 1 );
1794 
1795  // don't return an error if the tag simply wasn't set on the ent set
1796  if( MB_TAG_NOT_FOUND == result )
1797  RETURN( iBase_SUCCESS );
1798  else
1799  RETURN( iBase_ERROR_MAP[result] );
1800 }

References ENTITY_HANDLE, ErrorCode, iBase_ERROR_MAP, iBase_SUCCESS, MB_TAG_NOT_FOUND, MOABI, RETURN, and TAG_HANDLE.

◆ iMesh_rmvTag()

void iMesh_rmvTag ( iMesh_Instance  instance,
iBase_EntityHandle  entity_handle,
const iBase_TagHandle  tag_handle,
int *  err 
)

Remove a tag value from an entity.

Remove a tag value from an entity

Parameters
[in]instanceiMesh instance handle
[in]entity_handleEntity from which tag is being removed
[in]tag_handleTag handle of tag being removed
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 2239 of file iMesh_MOAB.cpp.

2243 {
2244  iMesh_rmvArrTag( instance, &entity_handle, 1, tag_handle, err );
2245 }

References iMesh_rmvArrTag().