Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <FBGeomAssocPairSide.hpp>
Public Member Functions | |
FBGeomAssocPairSide (iRel_Instance relation, iBase_Instance instance, int id) | |
virtual | ~FBGeomAssocPairSide () |
virtual iBase_Instance | instance () const |
virtual iRel_IfaceType | type () const |
virtual int | create_relation_side () |
virtual int | destroy_relation_side () |
virtual int | get_all_entities (int dimension, iBase_EntityHandle **entities, int *entities_alloc, int *entities_size) |
virtual int | get_all_sets (iBase_EntitySetHandle **sets, int *sets_alloc, int *sets_size) |
virtual int | get_entities (int dimension, iBase_EntitySetHandle set_handle, iBase_EntityHandle **entities, int *entities_alloc, int *entities_size) |
virtual int | get_ents_dims (iBase_EntityHandle *entities, int entities_size, int **ent_types, int *ent_types_alloc, int *ent_types_size) |
virtual int | get_related_ents (iBase_EntityHandle **entities, int *entities_alloc, int *entities_size) |
virtual int | get_related_sets (iBase_EntitySetHandle **sets, int *sets_alloc, int *sets_size) |
virtual int | get_relation_side (iBase_EntityHandle *entities, int num_entities, void *values) |
virtual int | get_relation_side (iBase_EntitySetHandle *sets, int num_sets, void *values) |
virtual int | set_relation_side (iBase_EntityHandle *entities, int num_entities, const void *values) |
virtual int | set_relation_side (iBase_EntitySetHandle *sets, int num_sets, const void *values) |
virtual int | rmv_relation_side (iBase_EntityHandle *entities, int num_entities) |
virtual int | rmv_relation_side (iBase_EntitySetHandle *sets, int num_sets) |
virtual int | get_iterator (iBase_EntitySetHandle set, iBase_EntityIterator *iter) |
virtual int | get_gids (iBase_EntityHandle *entities, int num_entities, int *values) |
virtual int | get_gids (iBase_EntitySetHandle *sets, int num_sets, int *values) |
virtual int | get_dims (iBase_EntityHandle *entities, int num_entities, int *values) |
virtual int | get_dims (iBase_EntitySetHandle *sets, int num_sets, int *values) |
Private Attributes | |
iRel_Instance | relation |
FBiGeom_Instance | instance_ |
int | id |
iBase_TagHandle | relation_tag |
iBase_TagHandle | gid_tag |
Definition at line 7 of file FBGeomAssocPairSide.hpp.
FBGeomAssocPairSide::FBGeomAssocPairSide | ( | iRel_Instance | relation, |
iBase_Instance | instance, | ||
int | id | ||
) |
Definition at line 28 of file FBGeomAssocPairSide.cpp.
References create_relation_side(), FBiGeom_createTag, FBiGeom_getTagHandle, gid_tag, GLOBAL_ID_TAG_NAME, iBase_INTEGER, iBase_TAG_NOT_FOUND, and instance_.
: relation( p_relation ), instance_( reinterpret_cast< FBiGeom_Instance >( p_instance ) ), id( p_id ) { int result; create_relation_side(); FBiGeom_getTagHandle( instance_, GLOBAL_ID_TAG_NAME, &gid_tag, &result, strlen( GLOBAL_ID_TAG_NAME ) ); if( result == iBase_TAG_NOT_FOUND ) { FBiGeom_createTag( instance_, GLOBAL_ID_TAG_NAME, 1, iBase_INTEGER, &gid_tag, &result, strlen( GLOBAL_ID_TAG_NAME ) ); } }
FBGeomAssocPairSide::~FBGeomAssocPairSide | ( | ) | [virtual] |
Definition at line 43 of file FBGeomAssocPairSide.cpp.
References destroy_relation_side().
{ destroy_relation_side(); }
int FBGeomAssocPairSide::create_relation_side | ( | ) | [virtual] |
Implements AssocPairSide.
Definition at line 58 of file FBGeomAssocPairSide.cpp.
References FBiGeom_createTag, FBiGeom_getTagHandle, iBase_ENTITY_HANDLE, iBase_SUCCESS, iBase_TAG_NOT_FOUND, id, instance_, PROCESS_ERROR, relation_tag, RELATION_TAG_NAME, and RETURNR.
Referenced by FBGeomAssocPairSide().
{ int result; std::stringstream ss; ss << RELATION_TAG_NAME << id; std::string rel_tag_name( ss.str() ); FBiGeom_getTagHandle( instance_, rel_tag_name.c_str(), &relation_tag, &result, rel_tag_name.size() ); if( result == iBase_TAG_NOT_FOUND ) { FBiGeom_createTag( instance_, rel_tag_name.c_str(), 1, iBase_ENTITY_HANDLE, &relation_tag, &result, rel_tag_name.size() ); } PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::destroy_relation_side | ( | ) | [virtual] |
Implements AssocPairSide.
Definition at line 76 of file FBGeomAssocPairSide.cpp.
References FBiGeom_destroyTag, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
Referenced by ~FBGeomAssocPairSide().
{ if( relation_tag ) { int result; FBiGeom_destroyTag( instance_, relation_tag, true, &result ); relation_tag = NULL; PROCESS_ERROR; } RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_all_entities | ( | int | dimension, |
iBase_EntityHandle ** | entities, | ||
int * | entities_alloc, | ||
int * | entities_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 90 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getEntities, iBase_ALL_TYPES, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ int this_type = ( dimension == -1 ? iBase_ALL_TYPES : dimension ); int result; FBiGeom_getEntities( instance_, 0, this_type, entities, entities_alloc, entities_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_all_sets | ( | iBase_EntitySetHandle ** | sets, |
int * | sets_alloc, | ||
int * | sets_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 103 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getEntSets, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ int result; FBiGeom_getEntSets( instance_, 0, 0, sets, sets_alloc, sets_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_dims | ( | iBase_EntityHandle * | entities, |
int | num_entities, | ||
int * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 263 of file FBGeomAssocPairSide.cpp.
References iBase_FAILURE, and RETURNR.
{ RETURNR( iBase_FAILURE ); }
int FBGeomAssocPairSide::get_dims | ( | iBase_EntitySetHandle * | sets, |
int | num_sets, | ||
int * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 268 of file FBGeomAssocPairSide.cpp.
References iBase_FAILURE, and RETURNR.
{ RETURNR( iBase_FAILURE ); }
int FBGeomAssocPairSide::get_entities | ( | int | dimension, |
iBase_EntitySetHandle | set_handle, | ||
iBase_EntityHandle ** | entities, | ||
int * | entities_alloc, | ||
int * | entities_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 112 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getEntities, iBase_ALL_TYPES, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ int this_type = ( dimension == -1 ? iBase_ALL_TYPES : dimension ); int result; FBiGeom_getEntities( instance_, set_handle, this_type, entities, entities_alloc, entities_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_ents_dims | ( | iBase_EntityHandle * | entities, |
int | entities_size, | ||
int ** | ent_types, | ||
int * | ent_types_alloc, | ||
int * | ent_types_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 126 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getArrType, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ int result; FBiGeom_getArrType( instance_, entities, entities_size, ent_types, ent_types_alloc, ent_types_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_gids | ( | iBase_EntityHandle * | entities, |
int | num_entities, | ||
int * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 234 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getArrData, gid_tag, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ int values_alloc = num_entities * sizeof( int ); int values_size; int result; FBiGeom_getArrData( instance_, entities, num_entities, gid_tag, reinterpret_cast< void** >( &values ), &values_alloc, &values_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_gids | ( | iBase_EntitySetHandle * | sets, |
int | num_sets, | ||
int * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 246 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getEntSetData, gid_tag, iBase_SUCCESS, instance_, PROCESS_ERROR, and RETURNR.
{ char* data = reinterpret_cast< char* >( values ); int values_alloc = sizeof( int ); int values_size; int result; for( int i = 0; i < num_sets; i++ ) { FBiGeom_getEntSetData( instance_, sets[i], gid_tag, reinterpret_cast< void** >( &data ), &values_alloc, &values_size, &result ); data += values_size; PROCESS_ERROR; } RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_iterator | ( | iBase_EntitySetHandle | set, |
iBase_EntityIterator * | iter | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 227 of file FBGeomAssocPairSide.cpp.
References FBiGeom_initEntIter, iBase_ALL_TYPES, iBase_SUCCESS, instance_, and RETURNR.
{ int result; FBiGeom_initEntIter( instance_, set, iBase_ALL_TYPES, iter, &result ); RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_related_ents | ( | iBase_EntityHandle ** | entities, |
int * | entities_alloc, | ||
int * | entities_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 139 of file FBGeomAssocPairSide.cpp.
References iBase_FAILURE, and RETURNR.
{ RETURNR( iBase_FAILURE ); }
int FBGeomAssocPairSide::get_related_sets | ( | iBase_EntitySetHandle ** | sets, |
int * | sets_alloc, | ||
int * | sets_size | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 146 of file FBGeomAssocPairSide.cpp.
References iBase_FAILURE, and RETURNR.
{ RETURNR( iBase_FAILURE ); }
int FBGeomAssocPairSide::get_relation_side | ( | iBase_EntityHandle * | entities, |
int | num_entities, | ||
void * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 151 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getArrData, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
{ int values_alloc = num_entities * sizeof( iBase_EntityHandle ); int values_size; int result; FBiGeom_getArrData( instance_, entities, num_entities, relation_tag, &values, &values_alloc, &values_size, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::get_relation_side | ( | iBase_EntitySetHandle * | sets, |
int | num_sets, | ||
void * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 163 of file FBGeomAssocPairSide.cpp.
References FBiGeom_getEntSetData, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
{ char* data = static_cast< char* >( values ); int values_alloc = sizeof( iBase_EntityHandle ); int values_size; int result; for( int i = 0; i < num_sets; i++ ) { FBiGeom_getEntSetData( instance_, sets[i], relation_tag, reinterpret_cast< void** >( &data ), &values_alloc, &values_size, &result ); data += values_size; PROCESS_ERROR; } RETURNR( iBase_SUCCESS ); }
iBase_Instance FBGeomAssocPairSide::instance | ( | ) | const [virtual] |
Implements AssocPairSide.
Definition at line 48 of file FBGeomAssocPairSide.cpp.
References instance_.
{ return instance_; }
int FBGeomAssocPairSide::rmv_relation_side | ( | iBase_EntityHandle * | entities, |
int | num_entities | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 205 of file FBGeomAssocPairSide.cpp.
References FBiGeom_rmvArrTag, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
{ int result; FBiGeom_rmvArrTag( instance_, entities, num_entities, relation_tag, &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::rmv_relation_side | ( | iBase_EntitySetHandle * | sets, |
int | num_sets | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 214 of file FBGeomAssocPairSide.cpp.
References FBiGeom_rmvEntSetTag, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
{ int result; for( int i = 0; i < num_sets; i++ ) { FBiGeom_rmvEntSetTag( instance_, sets[i], relation_tag, &result ); PROCESS_ERROR; } RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::set_relation_side | ( | iBase_EntityHandle * | entities, |
int | num_entities, | ||
const void * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 180 of file FBGeomAssocPairSide.cpp.
References FBiGeom_setArrData, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, and RETURNR.
{ int result; FBiGeom_setArrData( instance_, entities, num_entities, relation_tag, static_cast< const char* >( values ), num_entities * sizeof( iBase_EntityHandle ), &result ); PROCESS_ERROR; RETURNR( iBase_SUCCESS ); }
int FBGeomAssocPairSide::set_relation_side | ( | iBase_EntitySetHandle * | sets, |
int | num_sets, | ||
const void * | values | ||
) | [virtual] |
Implements AssocPairSide.
Definition at line 190 of file FBGeomAssocPairSide.cpp.
References FBiGeom_setEntSetData, iBase_SUCCESS, instance_, PROCESS_ERROR, relation_tag, RETURNR, and size.
{ const char* data = static_cast< const char* >( values ); int size = sizeof( iBase_EntityHandle ); int result; for( int i = 0; i < num_sets; i++ ) { FBiGeom_setEntSetData( instance_, sets[i], relation_tag, data, size, &result ); data += size; PROCESS_ERROR; } RETURNR( iBase_SUCCESS ); }
iRel_IfaceType FBGeomAssocPairSide::type | ( | ) | const [virtual] |
Implements AssocPairSide.
Definition at line 53 of file FBGeomAssocPairSide.cpp.
References iRel_FBIGEOM_IFACE.
{ return iRel_FBIGEOM_IFACE; }
iBase_TagHandle FBGeomAssocPairSide::gid_tag [private] |
Definition at line 64 of file FBGeomAssocPairSide.hpp.
Referenced by FBGeomAssocPairSide(), and get_gids().
int FBGeomAssocPairSide::id [private] |
Definition at line 61 of file FBGeomAssocPairSide.hpp.
Referenced by create_relation_side().
Definition at line 60 of file FBGeomAssocPairSide.hpp.
Referenced by create_relation_side(), destroy_relation_side(), FBGeomAssocPairSide(), get_all_entities(), get_all_sets(), get_entities(), get_ents_dims(), get_gids(), get_iterator(), get_relation_side(), instance(), rmv_relation_side(), and set_relation_side().
iRel_Instance FBGeomAssocPairSide::relation [private] |
Definition at line 59 of file FBGeomAssocPairSide.hpp.
Definition at line 63 of file FBGeomAssocPairSide.hpp.
Referenced by create_relation_side(), destroy_relation_side(), get_relation_side(), rmv_relation_side(), and set_relation_side().