MOAB: Mesh Oriented datABase  (version 5.1.1)
Tag Data On Entity Sets
+ Collaboration diagram for Tag Data On Entity Sets:

Functions

void iMesh_setEntSetData (iMesh_Instance instance, iBase_EntitySetHandle entity_set_handle, const iBase_TagHandle tag_handle, const void *tag_value, const int tag_value_size, int *err)
 Set a tag value of arbitrary type on an entity set.
void iMesh_setEntSetIntData (iMesh_Instance instance, iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, const int tag_value, int *err)
void iMesh_setEntSetDblData (iMesh_Instance instance, iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, const double tag_value, int *err)
void iMesh_setEntSetEHData (iMesh_Instance instance, iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, const iBase_EntityHandle tag_value, int *err)
void iMesh_setEntSetESHData (iMesh_Instance instance, iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, const iBase_EntitySetHandle tag_value, int *err)
 Set a tag value of entity set handle type on an.
void iMesh_getEntSetData (iMesh_Instance instance, const iBase_EntitySetHandle entity_set_handle, const iBase_TagHandle tag_handle, void *tag_value, int *tag_value_allocated, int *tag_value_size, int *err)
 Get the value of a tag of arbitrary type on an entity set.
void iMesh_getEntSetIntData (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, int *out_data, int *err)
void iMesh_getEntSetDblData (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, double *out_data, int *err)
void iMesh_getEntSetEHData (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, iBase_EntityHandle *out_data, int *err)
void iMesh_getEntSetESHData (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const iBase_TagHandle tag_handle, iBase_EntitySetHandle *out_data, int *err)
 Get the value of a tag of entity set handle type on an.

Function Documentation

void iMesh_getEntSetData ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set_handle,
const iBase_TagHandle  tag_handle,
void *  tag_value,
int *  tag_value_allocated,
int *  tag_value_size,
int *  err 
)

Get the value of a tag of arbitrary type on an entity set.

Get the value of a tag of arbitrary type on an entity set. Tag data is returned back as void*. tag_value_size specifies the size of the memory pointed to by tag_value in terms of bytes. Applications may use this function to get data of any type, not just iBase_BYTES. However because this function supports data of arbitrary type, in all cases the size specified by tag_value_size is always in terms of bytes.

Parameters:
[in]instanceiMesh instance handle
[in]entity_set_handleEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in,out]tag_valuePointer to tag data array being queried Array pointer, allocated and occupied sizes argument trio)
[in,out]tag_value_allocatedPointer allocated size, in bytes, of tag_value array.
[out]tag_value_sizePointer to occupied size, in bytes, of tag_value array.
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1725 of file iMesh_MOAB.cpp.

References ALLOC_CHECK_TAG_ARRAY, CHKERR, ENTITY_HANDLE, iBase_SUCCESS, KEEP_ARRAY, MOABI, RETURN, and TAG_HANDLE.

  {
    EntityHandle eh = ENTITY_HANDLE(entity_set_handle);
    Tag tag = TAG_HANDLE(tag_handle);

    int tag_size;
    ErrorCode result = MOABI->tag_get_bytes(tag, tag_size);
    CHKERR(result, "iMesh_getEntSetData: couldn't get tag size.");

    ALLOC_CHECK_TAG_ARRAY(tag_value, tag_size);

    result = MOABI->tag_get_data(tag, &eh, 1,
                                 *static_cast<void**>(tag_value));

    CHKERR(result, "iMesh_getEntSetData didn't succeed.");
    KEEP_ARRAY(tag_value);
    RETURN(iBase_SUCCESS);
  }
void iMesh_getEntSetDblData ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
double *  out_data,
int *  err 
)

Get the value of a tag of double type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[out]out_dataPointer to tag value returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1761 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_DOUBLE, and iMesh_getEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_DOUBLE);
    void *tag_ptr = out_data;
    int tag_size = sizeof(double);
    iMesh_getEntSetData(instance, entity_set, tag_handle, &tag_ptr,
                        &tag_size, &tag_size, err);
  }
void iMesh_getEntSetEHData ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
iBase_EntityHandle out_data,
int *  err 
)

Get the value of a tag of entity handle type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[out]out_dataPointer to tag value returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1773 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_ENTITY_HANDLE, and iMesh_getEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
    void *tag_ptr = out_data;
    int tag_size = sizeof(EntityHandle);
    iMesh_getEntSetData(instance, entity_set, tag_handle, &tag_ptr,
                        &tag_size, &tag_size, err);
  }
void iMesh_getEntSetESHData ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
iBase_EntitySetHandle out_data,
int *  err 
)

Get the value of a tag of entity set handle type on an.

entity set Get the value of a tag of entity set handle type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[out]out_dataPointer to tag value returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1785 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_ENTITY_SET_HANDLE, and iMesh_getEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_ENTITY_SET_HANDLE);
    void *tag_ptr = out_data;
    int tag_size = sizeof(EntityHandle);
    iMesh_getEntSetData(instance, entity_set, tag_handle, &tag_ptr,
                        &tag_size, &tag_size, err);
  }
void iMesh_getEntSetIntData ( iMesh_Instance  instance,
const iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
int *  out_data,
int *  err 
)

Get the value of a tag of integer type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[out]out_dataPointer to tag value returned from function
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1749 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_INTEGER, and iMesh_getEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_INTEGER);
    void *tag_ptr = out_data;
    int dum_size = sizeof(int);
    iMesh_getEntSetData(instance, entity_set, tag_handle, &tag_ptr,
                        &dum_size, &dum_size, err);
  }
void iMesh_setEntSetData ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set_handle,
const iBase_TagHandle  tag_handle,
const void *  tag_value,
const int  tag_value_size,
int *  err 
)

Set a tag value of arbitrary type on an entity set.

Set a tag value of arbitrary type on an entity set. The tag data is passed as void*. tag_value_size specifies the size of the memory pointed to by tag_value in terms of bytes. Applications are free to use this function to set data of any type, not just iBase_BYTES. However, in all cases, the size specified by tag_value_size is always in terms of bytes.

Parameters:
[in]instanceiMesh instance handle
[in]entity_set_handleEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in]tag_valuePointer to tag data being set on entity set
[in]tag_value_sizeSize in bytes of tag data
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1664 of file iMesh_MOAB.cpp.

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

  {
    ErrorCode result;

    EntityHandle set = ENTITY_HANDLE(entity_set_handle);
    result = MOABI->tag_set_data(TAG_HANDLE(tag_handle), &set, 1, tag_value);
    CHKERR(result, "iMesh_setEntSetData: error");

    RETURN(iBase_SUCCESS);
  }
void iMesh_setEntSetDblData ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
const double  tag_value,
int *  err 
)

Set a tag value of double type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in]tag_valueTag value being set on entity set
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1690 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_DOUBLE, and iMesh_setEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_DOUBLE);
    iMesh_setEntSetData(instance, entity_set, tag_handle,
                        &tag_value,
                        sizeof(double), err);
  }
void iMesh_setEntSetEHData ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
const iBase_EntityHandle  tag_value,
int *  err 
)

Set a tag value of entity handle type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in]tag_valueTag value being set on entity set
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1701 of file iMesh_MOAB.cpp.

References CHKNONEMPTY, CHKTAGTYPE, iBase_ENTITY_HANDLE, and iMesh_setEntSetData.

  {
      // XXX: decide how best to handle validating entity handles as tag data
    CHKNONEMPTY();
    CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
    iMesh_setEntSetData(instance, entity_set, tag_handle,
                        &tag_value,
                        sizeof(iBase_EntityHandle), err);
  }
void iMesh_setEntSetESHData ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
const iBase_EntitySetHandle  tag_value,
int *  err 
)

Set a tag value of entity set handle type on an.

entity set Set a tag value of entity set handle type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in]tag_valueTag value being set on entity set
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1714 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_ENTITY_SET_HANDLE, and iMesh_setEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_ENTITY_SET_HANDLE);
    iMesh_setEntSetData(instance, entity_set, tag_handle,
                        &tag_value,
                        sizeof(iBase_EntitySetHandle), err);
  }
void iMesh_setEntSetIntData ( iMesh_Instance  instance,
iBase_EntitySetHandle  entity_set,
const iBase_TagHandle  tag_handle,
const int  tag_value,
int *  err 
)

Set a tag value of integer type on an entity set.

Parameters:
[in]instanceiMesh instance handle
[in]entity_setEntity set on which tag is being set
[in]tag_handleTag being set on an entity set
[in]tag_valueTag value being set on entity set
[out]errReturned Error status (see iBase_ErrorType)

Definition at line 1679 of file iMesh_MOAB.cpp.

References CHKTAGTYPE, iBase_INTEGER, and iMesh_setEntSetData.

  {
    CHKTAGTYPE(tag_handle, iBase_INTEGER);
    iMesh_setEntSetData(instance, entity_set, tag_handle,
                        &tag_value,
                        sizeof(int), err);
  }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines