Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 #ifndef _ITAPS_iRel 00002 #define _ITAPS_iRel 00003 00004 /***************************************************************************/ /** 00005 * \ingroup 00006 *VersionNumbers 00007 * \brief Compile time 00008 *version number 00009 *digits 00010 * 00011 * iRel maintains a 00012 *major, minor and 00013 *patch digit in its 00014 *version number. 00015 * Technically 00016 *speaking, there is 00017 *not much practical 00018 *value in patch digit 00019 * for an interface 00020 *specification. A 00021 *patch release is 00022 *typically only used 00023 * for bug fix 00024 *releases. Although 00025 *it is rare, 00026 *sometimes a bug fix 00027 * necessitates an API 00028 *change. So, we 00029 *define a patch digit 00030 *for iRel. 00031 ******************************************************************************/ 00032 #define IREL_VERSION_MAJOR 1 00033 #define IREL_VERSION_MINOR 1 00034 #define IREL_VERSION_PATCH 0 00035 00036 /***************************************************************************/ /** 00037 * \ingroup 00038 *VersionNumbers 00039 * \brief Maintain 00040 *backward 00041 *compatibility with 00042 *old version symbol 00043 *names 00044 ******************************************************************************/ 00045 #define IREL_MAJOR_VERSION IREL_VERSION_MAJOR 00046 #define IREL_MINOR_VERSION IREL_VERSION_MINOR 00047 #define IREL_PATCH_VERSION IREL_VERSION_PATCH 00048 00049 /***************************************************************************/ /** 00050 * \ingroup 00051 *VersionNumbers 00052 * \brief Version 00053 *Comparison 00054 * 00055 * Evaluates to true 00056 *at CPP time if the 00057 *version of iRel 00058 *currently being 00059 * compiled is greater 00060 *than or equal to the 00061 *version specified. 00062 ******************************************************************************/ 00063 #define IREL_VERSION_GE( Maj, Min, Pat ) ITAPS_VERSION_GE( Maj, Min, Pat ) 00064 00065 /***************************************************************************/ /** 00066 * \ingroup 00067 *VersionNumbers 00068 * \brief Compose 00069 *string represention 00070 *of the iRel version 00071 *number 00072 ******************************************************************************/ 00073 #define IREL_VERSION_STRING ITAPS_VERSION_STRING_( iRel ) 00074 00075 /***************************************************************************/ /** 00076 * \ingroup 00077 *VersionNumbers 00078 * \brief Compose a 00079 *symbol name derived 00080 *from the current 00081 *iRel version number. 00082 ******************************************************************************/ 00083 #define IREL_VERSION_TAG ITAPS_VERSION_TAG_( iRel ) 00084 00085 /***************************************************************************/ /** 00086 * \ingroup 00087 *VersionNumbers 00088 * \brief Define 00089 *iRel_create symbol 00090 *such that it depends 00091 *on version number. 00092 * 00093 * Note: We ran into 00094 *problems with this 00095 *as it influences or 00096 *is influenced by 00097 * fortran name 00098 *mangling and so 00099 *breaks fortran 00100 *compilation. So, 00101 *this is currently 00102 *disabled. 00103 ******************************************************************************/ 00104 #define IREL_CREATE_NAME__( A, B, C ) A##_##B##_##C 00105 #define IREL_CREATE_NAME_( A, B, C ) IREL_CREATE_NAME__( A, B, C ) 00106 #define IREL_CREATE_NAME( A ) IREL_CREATE_NAME_( A, IREL_VERSION_MAJOR, IREL_VERSION_MINOR ) 00107 /* 00108 #undef iRel_create 00109 #define iRel_create IREL_CREATE_NAME(iRel_create) 00110 */ 00111 00112 #include "iBase.h" 00113 #include "iRel_protos.h" 00114 00115 #ifdef __cplusplus 00116 extern "C" { 00117 #endif 00118 00119 typedef void* iRel_Instance; 00120 typedef struct iRel_PairHandle_Private* iRel_PairHandle; 00121 00122 /***************************************************************************/ /** 00123 * \brief \enum 00124 *IfaceType Enumerator 00125 *specifying interface 00126 *types 00127 * 00128 * Enumerator 00129 *specifying interface 00130 *types. This 00131 *enumeration is 00132 * necessary because 00133 *functions to get 00134 *entities of a given 00135 *dimension are part 00136 *of the higher-level 00137 *interfaces (e.g. 00138 *iGeom, iMesh) 00139 *instead of iBase. 00140 ******************************************************************************/ 00141 enum iRel_IfaceType 00142 { 00143 iRel_IfaceType_MIN = 0, 00144 /**< facilitates iteration over all values */ 00145 iRel_IGEOM_IFACE = iRel_IfaceType_MIN, 00146 /**< description unavailable */ 00147 iRel_IMESH_IFACE, 00148 /**< description unavailable */ 00149 iRel_IFIELD_IFACE, 00150 /**< description unavailable */ 00151 iRel_IREL_IFACE, 00152 /**< description unavailable */ 00153 iRel_FBIGEOM_IFACE, 00154 /**< description unavailable */ 00155 iRel_IfaceType_MAX = iRel_FBIGEOM_IFACE 00156 /**< facilitates iteration over all values */ 00157 }; 00158 00159 /***************************************************************************/ /** 00160 * \brief \enum 00161 *RelationType 00162 *Enumerator 00163 *specifying relation 00164 *types 00165 * 00166 * Enumerator 00167 *specifying relation 00168 *types. A relation 00169 *has two types, one 00170 * for each side of 00171 *the relation. 00172 ******************************************************************************/ 00173 enum iRel_RelationType 00174 { 00175 iRel_RelationType_MIN = 0, 00176 /**< facilitates iteration over all values */ 00177 iRel_ENTITY = iRel_RelationType_MIN, 00178 /**< description unavailable */ 00179 iRel_SET, 00180 /**< description unavailable */ 00181 iRel_BOTH, 00182 /**< description unavailable */ 00183 iRel_RelationType_MAX = iRel_BOTH 00184 /**< facilitates iteration over all values */ 00185 }; 00186 00187 /***************************************************************************/ /** 00188 * \brief \enum 00189 *RelationStatus 00190 *Enumerator 00191 *specifying relation 00192 *status 00193 * 00194 * Enumerator 00195 *specifying relation 00196 *status. A relation 00197 *has two statuses, 00198 *one for each side of 00199 *the relation. 00200 *Allowed values of 00201 *this enumeration 00202 *are: It is an error 00203 *to request relations 00204 *from a side that 00205 *does not have 00206 * iRel_ACTIVE status. 00207 ******************************************************************************/ 00208 enum iRel_RelationStatus 00209 { 00210 iRel_RelationStatus_MIN = 0, 00211 /**< facilitates iteration over all values */ 00212 iRel_ACTIVE = iRel_RelationType_MIN, 00213 /**< the relation on this side is active and up to date */ 00214 iRel_INACTIVE, 00215 /**< the relation on this side is inactive, and may be out of date */ 00216 iRel_NOTEXIST, 00217 /**< the relation on this side is not stored */ 00218 iRel_RelationStatus_MAX = iRel_NOTEXIST 00219 /**< facilitates iteration over all values */ 00220 }; 00221 00222 /***************************************************************************/ /** 00223 * \brief Get the 00224 *error type returned 00225 *from the last iRel 00226 *function 00227 * 00228 * Get the error type 00229 *returned from the 00230 *last iRel function. 00231 *Value returned is a 00232 *member of the 00233 *iBase_ErrorType 00234 *enumeration. 00235 ******************************************************************************/ 00236 void iRel_getErrorType( iRel_Instance instance, 00237 /**< [in] iRel instance handle */ 00238 int* error_type 00239 /**< [out] Error type returned from last iRel function */ 00240 ); 00241 00242 /***************************************************************************/ /** 00243 * \brief Get a 00244 *description of the 00245 *error returned from 00246 *the last iRel 00247 *function 00248 * 00249 * Get a description 00250 *of the error 00251 *returned from the 00252 *last iRel function 00253 ******************************************************************************/ 00254 void iRel_getDescription( iRel_Instance instance, 00255 /**< [in] iRel instance handle */ 00256 char* descr, 00257 /**< [inout] Pointer to a character string to be filled with a 00258 description of the error from the last iRel function */ 00259 int descr_len 00260 /**< [in] Length of the character string pointed to by descr */ 00261 ); 00262 00263 /***************************************************************************/ /** 00264 * \brief Create a new 00265 *iRel instance 00266 * 00267 * Create a new iRel 00268 *instance. Currently 00269 *no options are 00270 *implemented. 00271 ******************************************************************************/ 00272 void iRel_create( const char* options, 00273 /**< const Options for the implementation */ 00274 iRel_Instance* instance, 00275 /**< [in] iRel instance handle */ 00276 int* err, 00277 /**< [out] Returned Error status (see iBase_ErrorType) */ 00278 const int options_len 00279 /**< [in] Length of options string */ 00280 ); 00281 00282 /***************************************************************************/ /** 00283 * \brief Destroy the 00284 *interface object 00285 * 00286 * Calls destructor on 00287 *interface object 00288 ******************************************************************************/ 00289 void iRel_destroy( iRel_Instance instance, 00290 /**< [in] iRel instance handle */ 00291 int* err 00292 /**< [out] Returned Error status (see iBase_ErrorType) */ 00293 ); 00294 00295 /***************************************************************************/ /** 00296 * \brief Create a 00297 *relation pair 00298 *between two 00299 *interfaces 00300 * 00301 * Creates a relation 00302 *pair between two 00303 *interfaces, passing 00304 * back a handle to 00305 *the pair. It is an 00306 *error to create a 00307 *relation pair having 00308 *both sides 00309 *iRel_NOTEXIST. If a 00310 *relation pair has a 00311 *side with status 00312 * iRel_NOTEXIST, the 00313 *relation for that 00314 *side is never 00315 *stored, and the 00316 *status cannot change 00317 *over the life of the 00318 *relation pair. 00319 ******************************************************************************/ 00320 void iRel_createPair( iRel_Instance instance, 00321 /**< [in] iRel instance handle */ 00322 iBase_Instance iface1, 00323 /**< [in] 1st interface object in the relation pair */ 00324 const int ent_or_set1, 00325 /**< [in] This relation relates entities, sets, or both from 1st 00326 interface object */ 00327 const int iface_type1, 00328 /**< [in] Type of 1st interface */ 00329 const int irel_status1, 00330 /**< [in] The status of 1st side */ 00331 iBase_Instance iface2, 00332 /**< [in] 2nd interface object in the relation pair */ 00333 const int ent_or_set2, 00334 /**< [in] This relation relates entities, sets, or both from 2nd 00335 interface object */ 00336 const int iface_type2, 00337 /**< [in] Type of 2nd interface */ 00338 const int irel_status2, 00339 /**< [in] The status of 2nd side */ 00340 iRel_PairHandle* pair, 00341 /**< [out] Pointer to relation pair handle, returned from function */ 00342 int* err 00343 /**< [out] Returned Error status (see iBase_ErrorType) */ 00344 ); 00345 00346 /***************************************************************************/ /** 00347 * \brief Get 00348 *information for this 00349 *relation handle 00350 * 00351 * Get information 00352 *about the interfaces 00353 *and relation type 00354 *for this relation. 00355 *Relation type for 00356 *each side is passed 00357 *back as integers, 00358 * but values will be 00359 *from RelationType 00360 *enumeration. 00361 ******************************************************************************/ 00362 void iRel_getPairInfo( iRel_Instance instance, 00363 /**< [in] iRel instance handle */ 00364 iRel_PairHandle pair, 00365 /**< [in] handle of relation pair being queried */ 00366 iBase_Instance* iface1, 00367 /**< [out] Side 1 instance for this relation */ 00368 int* ent_or_set1, 00369 /**< [out] relation type for side 1 of this relation */ 00370 int* iface_type1, 00371 /**< [out] Interface type for side 1 of this relation */ 00372 int* irel_status1, 00373 /**< [out] The status of the first side of this relation */ 00374 iBase_Instance* iface2, 00375 /**< [out] Side 2 instance for this relation */ 00376 int* ent_or_set2, 00377 /**< [out] Relation type for side 2 of this relation */ 00378 int* iface_type2, 00379 /**< [out] Interface type for side 2 of this relation */ 00380 int* irel_status2, 00381 /**< [out] Status of the 2nd side of this relation */ 00382 int* err 00383 /**< [out] Returned Error status (see iBase_ErrorType) */ 00384 ); 00385 00386 /***************************************************************************/ /** 00387 * \brief Change the 00388 *relation type 00389 * 00390 * Change the type of 00391 *one or both sides of 00392 *a relation. Only 00393 *changes that result 00394 *in no lost 00395 *information are 00396 *allowed, e.g. 00397 *changing a type from 00398 *SET to BOTH or vice 00399 *versa. 00400 ******************************************************************************/ 00401 void iRel_changePairType( iRel_Instance instance, 00402 /**< [in] iRel instance handle */ 00403 iRel_PairHandle pair, 00404 /**< [in] Relation pair handle being changed */ 00405 int ent_or_set1, 00406 /**< [in] The new type of side 1 of this relation pair */ 00407 int ent_or_set2, 00408 /**< [in] The new type of side 2 of this relation pair */ 00409 int* err 00410 /**< [out] Returned Error status (see iBase_ErrorType) */ 00411 ); 00412 00413 /***************************************************************************/ /** 00414 * \brief Change the 00415 *relation status 00416 * 00417 * Change the status 00418 *of one or both sides 00419 *of a relation. It 00420 *is an error to 00421 * change the status 00422 *of both sides to 00423 *iRel_NOTEXIST. If a 00424 *side is changed to 00425 * iRel_NOTEXIST, it 00426 *will no longer be 00427 *changeable back to 00428 *iRel_ACTIVE or 00429 * iRel_INACTIVE. 00430 *Changing a side from 00431 *iRel_INACTIVE to 00432 *iRel_ACTIVE implies 00433 *a traversal of all 00434 *related entities on 00435 *the other side, to 00436 *recover the 00437 *relations on the 00438 *side being changed. 00439 *Changing both sides 00440 *from iRel_ACTIVE to 00441 *something else is an 00442 *error, since in that 00443 *case neither will be 00444 *able to be updated 00445 *to iRel_ACTIVE. 00446 ******************************************************************************/ 00447 void iRel_changePairStatus( iRel_Instance instance, 00448 /**< [in] iRel instance handle */ 00449 iRel_PairHandle pair, 00450 /**< [in] Relation pair handle being changed */ 00451 int irel_status1, 00452 /**< [in] The new status of side 1 of this relation pair */ 00453 int irel_status2, 00454 /**< [in] The new status of side 2 of this relation pair */ 00455 int* err 00456 /**< [out] Returned Error status (see iBase_ErrorType) */ 00457 ); 00458 00459 /***************************************************************************/ /** 00460 * \brief Destroy a 00461 *relation pair 00462 * 00463 * Destroy the 00464 *relation pair 00465 *corresponding to the 00466 *handle input 00467 ******************************************************************************/ 00468 void iRel_destroyPair( iRel_Instance instance, 00469 /**< [in] iRel instance handle */ 00470 iRel_PairHandle pair, 00471 /**< [in] Handle of relation pair to destroy */ 00472 int* err 00473 /**< [out] Returned Error status (see iBase_ErrorType) */ 00474 ); 00475 00476 /***************************************************************************/ /** 00477 * \brief Get 00478 *relations containing 00479 *specified interface 00480 * 00481 * Get relations 00482 *containing the 00483 *specified interface 00484 ******************************************************************************/ 00485 void iRel_findPairs( iRel_Instance instance, 00486 /**< [in] iRel instance handle */ 00487 iBase_Instance iface, 00488 /**< [in] Specified interface */ 00489 iRel_PairHandle** pairs, 00490 /**< [inout] Pointer to array holding returned relation pairs 00491 containing specified interface */ 00492 int* pairs_allocated, 00493 /**< [inout] Pointer to allocated size of relation pairs list */ 00494 int* pairs_size, 00495 /**< [out] Pointer to occupied size of relation pairs list */ 00496 int* err 00497 /**< [out] Returned Error status (see iBase_ErrorType) */ 00498 ); 00499 00500 /***************************************************************************/ /** 00501 * \brief Set a 00502 *relation between two 00503 *entities 00504 * 00505 * Set a relation 00506 *between an entity 00507 *and several 00508 *entities. It is an 00509 *error to set a 00510 *relation on a pair 00511 *with both sides not 00512 *iRel_ACTIVE. 00513 ******************************************************************************/ 00514 void iRel_setEntEntRelation( iRel_Instance instance, 00515 /**< [in] iRel instance handle */ 00516 iRel_PairHandle pair, 00517 /**< [in] Relation pair handle being queried */ 00518 iBase_EntityHandle ent1, 00519 /**< [in] 1st entity of relation being set */ 00520 iBase_EntityHandle ent2, 00521 /**< [in] 2nd entity of relation being set */ 00522 int* err 00523 /**< [out] Returned Error status (see iBase_ErrorType) */ 00524 ); 00525 00526 /***************************************************************************/ /** 00527 * \brief Set a 00528 *relation between an 00529 *entity and an entity 00530 *set 00531 * 00532 * Description 00533 *unavailable. 00534 ******************************************************************************/ 00535 void iRel_setEntSetRelation( iRel_Instance instance, 00536 /**< [in] iRel instance handle */ 00537 iRel_PairHandle pair, 00538 /**< [in] Relation pair handle being queried */ 00539 iBase_EntityHandle ent1, 00540 /**< [in] entity of relation being set */ 00541 iBase_EntitySetHandle entset2, 00542 /**< [in] entity set of relation being set */ 00543 int* err 00544 /**< [out] Returned Error status (see iBase_ErrorType) */ 00545 ); 00546 00547 /***************************************************************************/ /** 00548 * \brief Set a 00549 *relation between an 00550 *entity set an an 00551 *entity 00552 * 00553 * Description 00554 *unavailable. 00555 ******************************************************************************/ 00556 void iRel_setSetEntRelation( iRel_Instance instance, 00557 /**< [in] iRel instance handle */ 00558 iRel_PairHandle pair, 00559 /**< [in] Relation pair handle being queried */ 00560 iBase_EntitySetHandle entset1, 00561 /**< [in] entity set of relation being set */ 00562 iBase_EntityHandle ent2, 00563 /**< [in] entity of relation being set */ 00564 int* err 00565 /**< [out] Returned Error status (see iBase_ErrorType) */ 00566 ); 00567 00568 /***************************************************************************/ /** 00569 * \brief Set a 00570 *relation between two 00571 *entity sets 00572 * 00573 * Description 00574 *unavailable. Set a 00575 *relation between an 00576 *entity and several 00577 *entities. It is an 00578 *error to set a 00579 *relation on a pair 00580 *with both sides not 00581 *iRel_ACTIVE. 00582 ******************************************************************************/ 00583 void iRel_setSetSetRelation( iRel_Instance instance, 00584 /**< [in] iRel instance handle */ 00585 iRel_PairHandle pair, 00586 /**< [in] Relation pair handle being queried */ 00587 iBase_EntitySetHandle entset1, 00588 /**< [in] 1st entity set of relation being set */ 00589 iBase_EntitySetHandle entset2, 00590 /**< [in] 2nd entity set of relation being set */ 00591 int* err 00592 /**< [out] Returned Error status (see iBase_ErrorType) */ 00593 ); 00594 00595 /***************************************************************************/ /** 00596 * \brief Set 00597 *relations between 00598 *arrays of entities 00599 *pairwise, 00600 * ent_array_1[i]<->ent_array_2[i] 00601 * 00602 * Set relations 00603 *between arrays of 00604 *entities pairwise, 00605 * ent_array_1[i]<->ent_array_2[i]. 00606 *If either array 00607 * contains sets and 00608 *that side of the 00609 *relation is 00610 *'both'-type, set 00611 *relations for 00612 *individual entities 00613 *in those sets too. 00614 *It is an error to 00615 * set a relation on a 00616 *pair with both sides 00617 *not iRel_ACTIVE. 00618 ******************************************************************************/ 00619 void iRel_setEntArrEntArrRelation( iRel_Instance instance, 00620 /**< [in] iRel instance handle */ 00621 iRel_PairHandle pair, 00622 /**< [in] Relation pair handle being queried */ 00623 iBase_EntityHandle* ent_array_1, 00624 /**< [in] 1st array of entities of relation being set */ 00625 int num_ent1, 00626 /**< [in] Number of entities in 1st array */ 00627 iBase_EntityHandle* ent_array_2, 00628 /**< [in] 2nd array of entities of relation being set */ 00629 int num_ent2, 00630 /**< [in] Number of entities in 2nd array */ 00631 int* err 00632 /**< [out] Returned Error status (see iBase_ErrorType) */ 00633 ); 00634 00635 /***************************************************************************/ /** 00636 * \brief Set 00637 *relations between 00638 *arrays of entity 00639 *sets and entities 00640 * 00641 * Description 00642 *unavailable. 00643 ******************************************************************************/ 00644 void iRel_setSetArrEntArrRelation( iRel_Instance instance, 00645 /**< [in] iRel instance handle */ 00646 iRel_PairHandle pair, 00647 /**< [in] Relation pair handle being queried */ 00648 iBase_EntitySetHandle* entset_array_1, 00649 /**< [in] 1st array of entities of relation being set */ 00650 int num_set1, 00651 /**< [in] Number of entity sets in 1st array */ 00652 iBase_EntityHandle* ent_array_2, 00653 /**< [in] 2nd array of entities of relation being set */ 00654 int num_ent2, 00655 /**< [in] Number of entities in 2nd array */ 00656 int* err 00657 /**< [out] Returned Error status (see iBase_ErrorType) */ 00658 ); 00659 00660 /***************************************************************************/ /** 00661 * \brief Set 00662 *relations between 00663 *arrays of entities 00664 *and entity sets 00665 * 00666 * Description 00667 *unavailable. 00668 ******************************************************************************/ 00669 void iRel_setEntArrSetArrRelation( iRel_Instance instance, 00670 /**< [in] iRel instance handle */ 00671 iRel_PairHandle pair, 00672 /**< [in] Relation pair handle being queried */ 00673 iBase_EntityHandle* ent_array_1, 00674 /**< [in] 1st array of entities of relation being set */ 00675 int num_ent1, 00676 /**< [in] Number of entities in 1st array */ 00677 iBase_EntitySetHandle* entset_array_2, 00678 /**< [in] 2nd array of entities of relation being set */ 00679 int num_set2, 00680 /**< [in] Number of entity sets in 2nd array */ 00681 int* err 00682 /**< [out] Returned Error status (see iBase_ErrorType) */ 00683 ); 00684 00685 /***************************************************************************/ /** 00686 * \brief Set 00687 *relations between 00688 *arrays of entity 00689 *sets pairwise, 00690 * ent_array_1[i]<->ent_array_2[i] 00691 * 00692 * Set relations 00693 *between arrays of 00694 *entities pairwise, 00695 * ent_array_1[i]<->ent_array_2[i]. 00696 *If either array 00697 * contains sets and 00698 *that side of the 00699 *relation is 00700 *'both'-type, set 00701 *relations for 00702 *individual entities 00703 *in those sets too. 00704 *It is an error to 00705 * set a relation on a 00706 *pair with both sides 00707 *not iRel_ACTIVE. 00708 ******************************************************************************/ 00709 void iRel_setSetArrSetArrRelation( iRel_Instance instance, 00710 /**< [in] iRel instance handle */ 00711 iRel_PairHandle pair, 00712 /**< [in] Relation pair handle being queried */ 00713 iBase_EntitySetHandle* entset_array_1, 00714 /**< [in] 1st array of entities of relation being set */ 00715 int num_set1, 00716 /**< [in] Number of entities in 1st array */ 00717 iBase_EntitySetHandle* entset_array_2, 00718 /**< [in] 2nd array of entities of relation being set */ 00719 int num_set2, 00720 /**< [in] Number of entities in 2nd array */ 00721 int* err 00722 /**< [out] Returned Error status (see iBase_ErrorType) */ 00723 ); 00724 00725 /***************************************************************************/ /** 00726 * \brief Get entity 00727 *related to specified 00728 *entity and relation 00729 *handle 00730 * 00731 * Get entity related 00732 *to specified entity 00733 *and relation handle. 00734 *Also returns whether 00735 *the related entity 00736 *is an entity or a 00737 *set. It is an error 00738 *to get a relation 00739 *for a side with 00740 *status 00741 *iRel_NOTEXIST. 00742 ******************************************************************************/ 00743 void iRel_getEntEntRelation( iRel_Instance instance, 00744 /**< [in] iRel instance handle */ 00745 iRel_PairHandle pair, 00746 /**< [in] Relation pair handle being queried */ 00747 iBase_EntityHandle ent1, 00748 /**< [in] 1st entity of relation being queried */ 00749 int switch_order, 00750 /**< [in] 1st entity is related to 1st interface (=0) or 2nd interface 00751 (=1) of relation pair */ 00752 iBase_EntityHandle* ent2, 00753 /**< [out] Pointer to entity related to ent1 */ 00754 int* err 00755 /**< [out] Returned Error status (see iBase_ErrorType) */ 00756 ); 00757 00758 /***************************************************************************/ /** 00759 * \brief Get entity 00760 *set related to 00761 *specified entity and 00762 *relation handle 00763 * 00764 * Description 00765 *unavailable. 00766 ******************************************************************************/ 00767 void iRel_getEntSetRelation( iRel_Instance instance, 00768 /**< [in] iRel instance handle */ 00769 iRel_PairHandle pair, 00770 /**< [in] Relation pair handle being queried */ 00771 iBase_EntityHandle ent1, 00772 /**< [in] entity of relation being queried */ 00773 int switch_order, 00774 /**< [in] 1st entity is related to 1st interface (=0) or 2nd interface 00775 (=1) of relation pair */ 00776 iBase_EntitySetHandle* entset2, 00777 /**< [out] Pointer to entity set related to ent1 */ 00778 int* err 00779 /**< [out] Returned Error status (see iBase_ErrorType) */ 00780 ); 00781 00782 /***************************************************************************/ /** 00783 * \brief Get entity 00784 *related to specified 00785 *entity set and 00786 *relation handle 00787 * 00788 * Description 00789 *unavailable. 00790 ******************************************************************************/ 00791 void iRel_getSetEntRelation( iRel_Instance instance, 00792 /**< [in] iRel instance handle */ 00793 iRel_PairHandle pair, 00794 /**< [in] Relation pair handle being queried */ 00795 iBase_EntitySetHandle entset1, 00796 /**< [in] entity set of relation being queried */ 00797 int switch_order, 00798 /**< [in] 1st entity is related to 1st interface (=0) or 2nd interface 00799 (=1) of relation pair */ 00800 iBase_EntityHandle* ent2, 00801 /**< [out] Pointer to entity related to entset1 */ 00802 int* err 00803 /**< [out] Returned Error status (see iBase_ErrorType) */ 00804 ); 00805 00806 /***************************************************************************/ /** 00807 * \brief Get entity 00808 *set related to 00809 *specified entity set 00810 *and relation handle 00811 * 00812 * Description 00813 *unavailable. 00814 ******************************************************************************/ 00815 void iRel_getSetSetRelation( iRel_Instance instance, 00816 /**< [in] iRel instance handle */ 00817 iRel_PairHandle pair, 00818 /**< [in] Relation pair handle being queried */ 00819 iBase_EntitySetHandle entset1, 00820 /**< [in] 1st entity set of relation being queried */ 00821 int switch_order, 00822 /**< [in] 1st entity is related to 1st interface (=0) or 2nd interface 00823 (=1) of relation pair */ 00824 iBase_EntitySetHandle* entset2, 00825 /**< [out] Pointer to entity set related to entset1 */ 00826 int* err 00827 /**< [out] Returned Error status (see iBase_ErrorType) */ 00828 ); 00829 00830 /***************************************************************************/ /** 00831 * \brief Get entity 00832 *iterator related to 00833 *specified entity set 00834 *and relation handle. 00835 * 00836 * Description 00837 *unavailable. 00838 ******************************************************************************/ 00839 void iRel_getEntSetIterRelation( iRel_Instance instance, 00840 /**< [in] iRel instance handle */ 00841 iRel_PairHandle pair, 00842 /**< [in] Relation pair handle being queried */ 00843 iBase_EntityHandle ent1, 00844 /**< [in] ent1 1st entity set of relation being queried */ 00845 int switch_order, 00846 /**< [in] 1st entity is related to 1st interface (=0) or 2nd interface 00847 (=1) of relation pair */ 00848 iBase_EntityIterator* entIter, 00849 /**< [out] Returned entity iterator */ 00850 int* err 00851 /**< [out] Returned Error status (see iBase_ErrorType) */ 00852 ); 00853 00854 /***************************************************************************/ /** 00855 * \brief Get entities 00856 *related to those in 00857 *specified array and 00858 *relation, pairwise 00859 * 00860 * Get entities 00861 *related to those in 00862 *specified array and 00863 *relation, pairwise. 00864 * Returns sets or 00865 *entities, depending 00866 *on relation type and 00867 *entities in 00868 * ent_array_1. It is 00869 *an error to get a 00870 *relation for a side 00871 *with status 00872 * iRel_NOTEXIST. 00873 ******************************************************************************/ 00874 void iRel_getEntArrEntArrRelation( iRel_Instance instance, 00875 /**< [in] iRel instance handle */ 00876 iRel_PairHandle pair, 00877 /**< [in] Relation pair handle being queried */ 00878 iBase_EntityHandle* ent_array_1, 00879 /**< [in] Array of entities whose relations are being queried */ 00880 int ent_array_1_size, 00881 /**< [in] Number of entities in ent_array_1 */ 00882 int switch_order, 00883 /**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1) 00884 interface of this relation pair */ 00885 iBase_EntityHandle** ent_array_2, 00886 /**< [inout] Pointer to array of entity handles returned from function */ 00887 int* ent_array_2_allocated, 00888 /**< [inout] Pointer to allocated size of ent_array_2 */ 00889 int* ent_array_2_size, 00890 /**< [out] Pointer to occupied size of ent_array_2 */ 00891 int* err 00892 /**< [out] Returned Error status (see iBase_ErrorType) */ 00893 ); 00894 00895 /***************************************************************************/ /** 00896 * \brief Get entity 00897 *sets related to 00898 *entities in 00899 *specified array and 00900 *relation, pairwise 00901 * 00902 * Description 00903 *unavailable. 00904 ******************************************************************************/ 00905 void iRel_getEntArrSetArrRelation( iRel_Instance instance, 00906 /**< [in] iRel instance handle */ 00907 iRel_PairHandle pair, 00908 /**< [in] Relation pair handle being queried */ 00909 iBase_EntityHandle* ent_array_1, 00910 /**< [in] Array of entities whose relations are being queried */ 00911 int ent_array_1_size, 00912 /**< [in] Number of entities in ent_array_1 */ 00913 int switch_order, 00914 /**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1) 00915 interface of this relation pair */ 00916 iBase_EntitySetHandle** entset_array_2, 00917 /**< [inout] Pointer to array of entity set handles returned from function */ 00918 int* entset_array_2_allocated, 00919 /**< [inout] Pointer to allocated size of entset_array_2 */ 00920 int* entset_array_2_size, 00921 /**< [out] Pointer to occupied size of entset_array_2 */ 00922 int* err 00923 /**< [out] Returned Error status (see iBase_ErrorType) */ 00924 ); 00925 00926 /***************************************************************************/ /** 00927 * \brief Get entities 00928 *related to entity 00929 *sets in specified 00930 *array and relation, 00931 * pairwise 00932 * 00933 * Description 00934 *unavailable. 00935 ******************************************************************************/ 00936 void iRel_getSetArrEntArrRelation( iRel_Instance instance, 00937 /**< [in] iRel instance handle */ 00938 iRel_PairHandle pair, 00939 /**< [in] Relation pair handle being queried */ 00940 iBase_EntitySetHandle* entset_array_1, 00941 /**< [in] Array of entity sets whose relations are being queried */ 00942 int entset_array_1_size, 00943 /**< [in] Number of entity sets in entset_array_1 */ 00944 int switch_order, 00945 /**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1) 00946 interface of this relation pair */ 00947 iBase_EntityHandle** ent_array_2, 00948 /**< [inout] Pointer to array of entity handles returned from function */ 00949 int* ent_array_2_allocated, 00950 /**< [inout] Pointer to allocated size of ent_array_2 */ 00951 int* ent_array_2_size, 00952 /**< [out] Pointer to occupied size of ent_array_2 */ 00953 int* err 00954 /**< [out] Returned Error status (see iBase_ErrorType) */ 00955 ); 00956 00957 /***************************************************************************/ /** 00958 * \brief Get entity 00959 *sets related to 00960 *entity sets in 00961 *specified array and 00962 *relation, pairwise 00963 * 00964 * Description 00965 *unavailable. 00966 ******************************************************************************/ 00967 void iRel_getSetArrSetArrRelation( iRel_Instance instance, 00968 /**< [in] iRel instance handle */ 00969 iRel_PairHandle pair, 00970 /**< [in] Relation pair handle being queried */ 00971 iBase_EntitySetHandle* entset_array_1, 00972 /**< [in] Array of entity sets whose relations are being queried */ 00973 int entset_array_1_size, 00974 /**< [in] Number of entity sets in entset_array_1 */ 00975 int switch_order, 00976 /**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1) 00977 interface of this relation pair */ 00978 iBase_EntitySetHandle** entset_array_2, 00979 /**< [inout] Pointer to array of entity handles returned from function */ 00980 int* entset_array_2_allocated, 00981 /**< [inout] Pointer to allocated size of entset_array_2 */ 00982 int* entset_array_2_size, 00983 /**< [out] Pointer to occupied size of entset_array_2 */ 00984 int* err 00985 /**< [out] Returned Error status (see iBase_ErrorType) */ 00986 ); 00987 00988 /***************************************************************************/ /** 00989 * \brief Get entity 00990 *iterators related to 00991 *entity sets in 00992 *specified array and 00993 * relation. 00994 * 00995 * Description 00996 *unavailable. 00997 ******************************************************************************/ 00998 void iRel_getEntArrSetIterArrRelation( iRel_Instance instance, 00999 /**< [in] iRel instance handle */ 01000 iRel_PairHandle pair, 01001 /**< [in] Relation pair handle being queried */ 01002 iBase_EntityHandle* ent_array_1, 01003 /**< [in] Array of entities whose relations are being queried */ 01004 int ent_array_1_size, 01005 /**< [in] Number of entities in ent_array_1 */ 01006 int switch_order, 01007 /**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1) 01008 interface of this relation pair */ 01009 iBase_EntityIterator** entiter, 01010 /**< [inout] Pointer to array of entity iterator handles returned from 01011 function */ 01012 int* entiter_allocated, 01013 /**< [inout] Pointer to allocated size of entiter */ 01014 int* entiter_size, 01015 /**< [out] Pointer to occupied size of entiter */ 01016 int* err 01017 /**< [out] Returned Error status (see iBase_ErrorType) */ 01018 ); 01019 01020 /***************************************************************************/ /** 01021 * \brief Remove a 01022 *relation from an 01023 *entity 01024 * 01025 * Remove a relation 01026 *from an entity 01027 ******************************************************************************/ 01028 void iRel_rmvEntRelation( iRel_Instance instance, 01029 /**< [in] iRel instance handle */ 01030 iRel_PairHandle pair, 01031 /**< [in] Relation pair handle being queried */ 01032 iBase_EntityHandle ent, 01033 /**< [in] entity of relation being removed */ 01034 int switch_order, 01035 /**< [in] entity is related to 1st interface (=0) or 2nd interface 01036 (=1) of relation pair */ 01037 int* err 01038 /**< [out] Returned Error status (see iBase_ErrorType) */ 01039 ); 01040 01041 /***************************************************************************/ /** 01042 * \brief Remove a 01043 *relation from an 01044 *entity set 01045 * 01046 * Remove a relation 01047 *from an entity set 01048 ******************************************************************************/ 01049 void iRel_rmvSetRelation( iRel_Instance instance, 01050 /**< [in] iRel instance handle */ 01051 iRel_PairHandle pair, 01052 /**< [in] Relation pair handle being queried */ 01053 iBase_EntitySetHandle set, 01054 /**< [in] entity set of relation being removed */ 01055 int switch_order, 01056 /**< [in] entity set is related to 1st interface (=0) or 2nd interface 01057 (=1) of relation pair */ 01058 int* err 01059 /**< [out] Returned Error status (see iBase_ErrorType) */ 01060 ); 01061 01062 /***************************************************************************/ /** 01063 * \brief Remove a 01064 *relation from an 01065 *array of entities 01066 * 01067 * Remove a relation 01068 *from an array of 01069 *entities 01070 ******************************************************************************/ 01071 void iRel_rmvEntArrRelation( iRel_Instance instance, 01072 /**< [in] iRel instance handle */ 01073 iRel_PairHandle pair, 01074 /**< [in] Relation pair handle being queried */ 01075 iBase_EntityHandle* ent_array_1, 01076 /**< [in] Array of entities of relation being removed */ 01077 int num_ent1, 01078 /**< [in] Number of entities in array */ 01079 int switch_order, 01080 /**< [in] entities are related to 1st interface (=0) or 2nd interface 01081 (=1) of relation pair */ 01082 int* err 01083 /**< [out] Returned Error status (see iBase_ErrorType) */ 01084 ); 01085 01086 /***************************************************************************/ /** 01087 * \brief Remove a 01088 *relation from an 01089 *array of entity sets 01090 * 01091 * Remove a relation 01092 *from an array of 01093 *entity sets 01094 ******************************************************************************/ 01095 void iRel_rmvSetArrRelation( iRel_Instance instance, 01096 /**< [in] iRel instance handle */ 01097 iRel_PairHandle pair, 01098 /**< [in] Relation pair handle being queried */ 01099 iBase_EntitySetHandle* entset_array_1, 01100 /**< [in] Array of entity sets of relation being removed */ 01101 int num_entset1, 01102 /**< [in] Number of entity sets in array */ 01103 int switch_order, 01104 /**< [in] entity sets are related to 1st interface (=0) or 2nd interface 01105 (=1) of relation pair */ 01106 int* err 01107 /**< [out] Returned Error status (see iBase_ErrorType) */ 01108 ); 01109 01110 /***************************************************************************/ /** 01111 * \brief Infer 01112 *relations between 01113 *entities in 01114 *specified pair of 01115 *interfaces 01116 * 01117 * Infer relations 01118 *between entities in 01119 *specified pair of 01120 *interfaces. The 01121 * criteria used to 01122 *infer these 01123 *relations depends on 01124 *the interfaces in 01125 * the pair, the iRel 01126 *implementation, and 01127 *the source of the 01128 *data in those 01129 * interfaces. 01130 ******************************************************************************/ 01131 void iRel_inferAllRelations( iRel_Instance instance, 01132 /**< [in] iRel instance handle */ 01133 iRel_PairHandle pair, 01134 /**< [in] Relation pair handle being queried */ 01135 int* err 01136 /**< [out] Returned Error status (see iBase_ErrorType) */ 01137 ); 01138 01139 /***************************************************************************/ /** 01140 * \brief Infer 01141 *relations and 01142 *relation type 01143 *between entities in 01144 *specified pair of 01145 *interfaces 01146 * 01147 * Infer relations 01148 *between entities in 01149 *specified pair of 01150 *interfaces, and the 01151 * relation type used 01152 *by this iRel 01153 *implementation. The 01154 *criteria used to 01155 * infer these 01156 *relations depends on 01157 *the interfaces in 01158 *the pair, the iRel 01159 * implementation, and 01160 *the source of the 01161 *data in those 01162 *interfaces. 01163 ******************************************************************************/ 01164 void iRel_inferAllRelationsAndType( iRel_Instance instance, 01165 /**< [in] iRel instance handle */ 01166 iRel_PairHandle* pair, 01167 /**< [in] Relation pair handle created by implementation */ 01168 int* err 01169 /**< [out] Returned Error status (see iBase_ErrorType) */ 01170 ); 01171 01172 /***************************************************************************/ /** 01173 * \brief Infer 01174 *relations 01175 *corresponding to 01176 *specified entity and 01177 *relation pair 01178 * 01179 * Infer relations 01180 *corresponding to 01181 *specified entity and 01182 *relation pair. The 01183 * criteria used to 01184 *infer these 01185 *relations depends on 01186 *the interfaces in 01187 * the pair, the iRel 01188 *implementation, and 01189 *the source of the 01190 *data in those 01191 * interfaces. 01192 ******************************************************************************/ 01193 void iRel_inferEntRelations( iRel_Instance instance, 01194 /**< [in] iRel instance handle */ 01195 iRel_PairHandle pair, 01196 /**< [in] Relation pair handle being queried */ 01197 iBase_EntityHandle entity, 01198 /**< [in] Entity whose relations are being inferred */ 01199 int iface_no, 01200 /**< [in] Entity corresponds to 1st (=0) or 2nd (=1) interface in 01201 relation pair */ 01202 int* err 01203 /**< [out] Returned Error status (see iBase_ErrorType) */ 01204 ); 01205 01206 /***************************************************************************/ /** 01207 * \brief Brief 01208 *unavailable 01209 * 01210 * Description 01211 *unavailable 01212 ******************************************************************************/ 01213 void iRel_inferSetRelations( iRel_Instance instance, 01214 /**< [in] iRel instance handle */ 01215 iRel_PairHandle pair, 01216 /**< [in] description unknown */ 01217 iBase_EntitySetHandle entity_set, 01218 /**< [in] description unknown */ 01219 int iface_no, 01220 /**< [in] description unknown */ 01221 int* err 01222 /**< [out] Returned Error status (see iBase_ErrorType) */ 01223 ); 01224 01225 /***************************************************************************/ /** 01226 * \brief Infer 01227 *relations 01228 *corresponding to 01229 *specified entities 01230 *and relation pair 01231 * 01232 * Infer relations 01233 *corresponding to 01234 *specified entities 01235 *and relation pair. 01236 * The criteria used 01237 *to infer these 01238 *relations depends on 01239 *the interfaces in 01240 * the pair, the iRel 01241 *implementation, and 01242 *the source of the 01243 *data in those 01244 * interfaces. 01245 ******************************************************************************/ 01246 void iRel_inferEntArrRelations( iRel_Instance instance, 01247 /**< [in] iRel instance handle */ 01248 iRel_PairHandle pair, 01249 /**< [in] Relation pair handle being queried */ 01250 iBase_EntityHandle* entities, 01251 /**< [in] Array of entities whose relation are being inferred */ 01252 int entities_size, 01253 /**< [in] Number of entities in array */ 01254 int iface_no, 01255 /**< [in] Entities correspond to 1st (=0) or 2nd (=1) interface in 01256 relation pair */ 01257 int* err 01258 /**< [out] Returned Error status (see iBase_ErrorType) */ 01259 ); 01260 01261 /***************************************************************************/ /** 01262 * \brief Brief 01263 *unavailable 01264 * 01265 * Description 01266 *unavailable 01267 ******************************************************************************/ 01268 void iRel_inferSetArrRelations( iRel_Instance instance, 01269 /**< [in] iRel instance handle */ 01270 iRel_PairHandle pair, 01271 /**< [in] description unknown */ 01272 iBase_EntitySetHandle* entity_sets, 01273 /**< [in] description unknown */ 01274 int entities_size, 01275 /**< [in] description unknown */ 01276 int iface_no, 01277 /**< [in] description unknown */ 01278 int* err 01279 /**< [out] Returned Error status (see iBase_ErrorType) */ 01280 ); 01281 01282 /** \mainpage The ITAPS Relations Interface iRel 01283 * 01284 * Each ITAPS interface encapsulates functionality that "belongs" 01285 * together, for example mesh or geometric model functionality. In 01286 * some cases, however, data in several of these interfaces need to 01287 * be related together. For example, a collection of mesh faces 01288 * should be related to the geometric model face which they 01289 * discretize. The ITAPS Relations interface accomplishes this in a 01290 * way which allows the lower-level interfaces to remain 01291 * independent. 01292 * 01293 * iRel defines relations as pairwise relations between entities 01294 * or entity sets. Related entities can be in the same or different 01295 * interfaces. A given relation is created for a given pair of 01296 * interfaces and returned in the form of a \em Relation \em Handle. 01297 * After a specific relation pair has been created, concrete 01298 * relations for that pair can be assigned and retrieved for 01299 * specific entities using set and get functions on the iRel 01300 * interface. A given interface instance can appear in one or many 01301 * relation pairs, each identified by the relation pair handle. 01302 * 01303 * \section Types Relation Types 01304 * 01305 * Relations are also distinguished by a pair of relation types. 01306 * For each interface in a relation pair, a corresponding type 01307 * indicates whether the relation applies to entities, entity sets, 01308 * or both entities and sets in the corresponding interface in the 01309 * pair. If only one of the interfaces in a given pair has a 01310 * 'both'-type, entities and entity sets in that 01311 * interface are each related to either entities or sets in the other 01312 * interface in the pair. If both of the sides of a relation are of 01313 * 'both'-type, entities and sets on one side of a relation point to 01314 * sets on the other side. 01315 * 01316 * \section Status Relation Status 01317 * 01318 * Relations are also distinguished by a pair of relation statuses. 01319 * For each interface in a relation pair, a corresponding status indicates 01320 * whether the relation on that side is kept up to date, or stored at all. 01321 * Allowable values for status are iRel_ACTIVE, iRel_INACTIVE, and iRel_NOTEXIST, 01322 * defined in the iRel_RelationStatus enumeration. Status for a given side 01323 * can be changed from iRel_ACTIVE to iRel_INACTIVE and vice versa, or from 01324 * either of those to iRel_NOTEXIST. However, once changed to iRel_NOTEXIST 01325 * (or created that way), a side cannot be changed back to the other two. 01326 * Changing a side to be iRel_INACTIVE can be used when frequent changes to 01327 * the underlying entities are being made, e.g. during adaptive mesh refinement. 01328 * Changing from iRel_INACTIVE to iRel_ACTIVE implies a traversal of all entities 01329 * on the iRel_ACTIVE side to recover which entities on the iRel_INACTIVE side 01330 * must have their relations updated. 01331 * 01332 * \section ArgOrder Argument Order 01333 * 01334 * Many functions in the iRel interface take as input two entities, 01335 * or two lists of entities, along with a relation pair handle. For 01336 * these functions, the entities or lists are assumed to be in the 01337 * same order as the interfaces used to create that relation pair. 01338 * For example, if a relation pair is created by calling: 01339 * \code 01340 * iRel_createRelation(instance, iface1, ent_or_set1, type1, 01341 * iface2, ent_or_set2, type2, 01342 * &relation_handle, &ierr) 01343 * \endcode 01344 * and relations set by calling 01345 * \code 01346 * iRel_setEntEntRelation(instance, relation_handle, 01347 * ent1, is_set1, ent2, is_set2, &ierr) 01348 * \endcode 01349 * it is assumed that ent1 is contained in iface1 and ent2 in 01350 * iface2. 01351 * 01352 * For functions taking only one entity or list as input, and 01353 * returning an entity or list, an additional argument indicates 01354 * whether the input entity or list belongs to the first or second 01355 * interface in that relation pair. 01356 * 01357 */ 01358 01359 #ifdef __cplusplus 01360 } /* extern "C" */ 01361 #endif 01362 01363 #endif /* #ifndef _ITAPS_iRel */