MeshKit  1.0
iBase.hpp
Go to the documentation of this file.
00001 
00002 #ifndef IBSH
00003 #define IBSH(h) reinterpret_cast<iBase_EntitySetHandle>(h)
00004 #endif    
00005 
00006 #ifndef IBSHR
00007 #define IBSHR(h) reinterpret_cast<iBase_EntitySetHandle&>(h)
00008 #endif    
00009 
00010 #ifndef IBEH
00011 #define IBEH(h) reinterpret_cast<iBase_EntityHandle>(h)
00012 #endif    
00013 
00014 #ifndef IBEHR
00015 #define IBEHR(h) reinterpret_cast<iBase_EntityHandle&>(h)
00016 #endif    
00017 
00018 #define PFX__(A,B) A ## B
00019 #define PFX_(A,B) PFX__(A,B)
00020 #define PFX(B) PFX_( ITAPS_PREFIX, B )
00021 
00022 class PFX(Base) {
00023   protected:
00024     PFX(_Instance) mInstance;
00025 
00026   public:  
00027     typedef iBase_EntitySetHandle EntitySetHandle;
00028     typedef iBase_EntityHandle EntityHandle;
00029     typedef iBase_TagHandle TagHandle;
00030     typedef iBase_ErrorType Error;
00031     typedef iBase_EntityType EntityType;
00032     typedef iBase_StorageOrder StorageOrder;
00033     typedef iBase_TagValueType TagValueType;
00034 
00035     inline PFX(_Instance) instance();
00036     
00037     inline Error getErrorType() const;
00038     
00039     inline std::string getDescription() const;
00040     
00041     inline EntitySetHandle getRootSet() const;
00042 
00043     inline Error createEntSet( bool is_list, EntitySetHandle& handle_out );
00044     inline Error destroyEntSet( EntitySetHandle handle );
00045     inline Error isList( EntitySetHandle handle, bool& is_list ) const;
00046     
00047     inline Error getNumEntSets( EntitySetHandle set, int num_hops, int& num_sets_out ) const;
00048     inline Error getEntSets( EntitySetHandle set, int num_hops,
00049                              std::vector<EntitySetHandle>& contained_sets_out ) const;
00050     
00051     inline Error addEntToSet( EntityHandle entity, EntitySetHandle set );
00052     inline Error rmvEntFromSet( EntityHandle entity, EntitySetHandle set );
00053     
00054     inline Error addEntArrToSet( const EntityHandle* entity_handles,
00055                                  int entity_handles_size,
00056                                  EntitySetHandle entity_set );
00057     inline Error rmvEntArrFromSet( const EntityHandle* entity_handles,
00058                                    int entity_handles_size,
00059                                    EntitySetHandle entity_set );
00060     
00061     inline Error addEntSet( EntitySetHandle to_add, EntitySetHandle add_to );
00062     inline Error rmvEntSet( EntitySetHandle to_rmv, EntitySetHandle rmv_from );
00063     
00064     inline Error isEntContained( EntitySetHandle set, EntityHandle ent, bool& contained_out ) const;
00065     inline Error isEntArrContained( EntitySetHandle containing_set,
00066                                     const EntityHandle* entity_handles,
00067                                     int num_entity_handles,
00068                                     bool* is_contained_out ) const;
00069     inline Error isEntSetContained( EntitySetHandle containing_set, 
00070                                     EntitySetHandle contained_set, 
00071                                     bool& contained_out ) const;
00072     
00073     inline Error addPrntChld( EntitySetHandle parent, EntitySetHandle child );
00074     inline Error rmvPrntChld( EntitySetHandle parent, EntitySetHandle child );
00075     inline Error isChildOf( EntitySetHandle parent, EntitySetHandle child, bool& is_child_out ) const;
00076     inline Error getNumChld( EntitySetHandle parent, int num_hops, int& num_child_out ) const;
00077     inline Error getNumPrnt( EntitySetHandle child, int num_hops, int& num_parent_out ) const;
00078     inline Error getChldn( EntitySetHandle parent, int num_hops, 
00079                            std::vector<EntitySetHandle>& children_out ) const;
00080     inline Error getPrnts( EntitySetHandle child, int num_hops, 
00081                            std::vector<EntitySetHandle>& parents_out ) const;
00082     
00083     inline Error subtract( EntitySetHandle set1, EntitySetHandle set2,
00084                            EntitySetHandle& result_set_out );
00085     inline Error intersect( EntitySetHandle set1, EntitySetHandle set2,
00086                             EntitySetHandle& result_set_out );
00087     inline Error unite( EntitySetHandle set1, EntitySetHandle set2,
00088                         EntitySetHandle& result_set_out );
00089 
00090     inline Error createTag( const char* tag_name,
00091                             int tag_num_type_values,
00092                             TagValueType tag_type,
00093                             TagHandle& tag_handle_out );
00094     
00095     inline Error destroyTag( TagHandle tag_handle, bool forced );
00096     inline Error getTagName( TagHandle tag_handle, std::string& name_out ) const;
00097     inline Error getTagSizeValues( TagHandle tag_handle, int& size_out ) const;
00098     inline Error getTagSizeBytes( TagHandle tag_handle, int& size_out ) const;
00099     inline Error getTagHandle( const char* name, TagHandle& handle_out ) const;
00100     inline Error getTagType( TagHandle tag_handle, TagValueType& type_out ) const;
00101     
00102     inline Error setEntSetData( EntitySetHandle set_handle,
00103                                 TagHandle tag_handle,
00104                                 const void* tag_value );
00105     inline Error setEntSetIntData( EntitySetHandle set_handle,
00106                                    TagHandle tag_handle,
00107                                    int value );
00108     inline Error setEntSetDblData( EntitySetHandle set_handle,
00109                                    TagHandle tag_handle,
00110                                    double value );
00111     inline Error setEntSetEHData( EntitySetHandle set_handle,
00112                                   TagHandle tag_handle,
00113                                   EntityHandle value );
00114     inline Error setEntSetESHData( EntitySetHandle set_handle,
00115                                    TagHandle tag_handle,
00116                                    EntitySetHandle value );
00117     
00118     inline Error getEntSetData( EntitySetHandle set_handle,
00119                                 TagHandle tag_handle,
00120                                 void* tag_value_out ) const;
00121     inline Error getEntSetIntData( EntitySetHandle set_handle,
00122                                    TagHandle tag_handle,
00123                                    int& value_out ) const;
00124     inline Error getEntSetDblData( EntitySetHandle set_handle,
00125                                    TagHandle tag_handle,
00126                                    double& value_out ) const;
00127     inline Error getEntSetEHData( EntitySetHandle set_handle,
00128                                   TagHandle tag_handle,
00129                                   EntityHandle& value_out ) const;
00130     inline Error getEntSetESHData( EntitySetHandle set_handle,
00131                                    TagHandle tag_handle,
00132                                    EntitySetHandle& value_out ) const;
00133     
00134     inline Error getAllEntSetTags( EntitySetHandle set,
00135                                    std::vector<TagHandle>& tags_out ) const;
00136     inline Error getAllTags( EntityHandle entity,
00137                              std::vector<TagHandle>& tags_out ) const;
00138                                    
00139     inline Error rmvEntSetTag( EntitySetHandle set, TagHandle tag );
00140     inline Error rmvTag( EntityHandle entity, TagHandle tag );
00141     inline Error rmvArrTag( const EntityHandle* handles, int size, TagHandle tag );
00142     
00143     inline Error getArrData( const EntityHandle* entity_handles,
00144                              int entity_handles_size,
00145                              TagHandle tag_handle,
00146                              void* tag_values_out ) const;
00147     inline Error getIntArrData( const EntityHandle* entity_handles,
00148                                 int entity_handles_size,
00149                                 TagHandle tag_handle,
00150                                 int* tag_values_out ) const;
00151     inline Error getDblArrData( const EntityHandle* entity_handles,
00152                                 int entity_handles_size,
00153                                 TagHandle tag_handle,
00154                                 double* tag_values_out ) const;
00155     inline Error getEHArrData( const EntityHandle* entity_handles,
00156                                int entity_handles_size,
00157                                TagHandle tag_handle,
00158                                EntityHandle* tag_values_out ) const;
00159     inline Error getESHArrData( const EntityHandle* entity_handles,
00160                                 int entity_handles_size,
00161                                 TagHandle tag_handle,
00162                                 EntitySetHandle* tag_values_out ) const;
00163     
00164     inline Error setArrData( const EntityHandle* entity_handles,
00165                              int entity_handles_size,
00166                              TagHandle tag_handle,
00167                              const void* tag_values );
00168     inline Error setIntArrData( const EntityHandle* entity_handles,
00169                                 int entity_handles_size,
00170                                 TagHandle tag_handle,
00171                                 const int* tag_values );
00172     inline Error setDblArrData( const EntityHandle* entity_handles,
00173                                 int entity_handles_size,
00174                                 TagHandle tag_handle,
00175                                 const double* tag_values );
00176     inline Error setEHArrData( const EntityHandle* entity_handles,
00177                                int entity_handles_size,
00178                                TagHandle tag_handle,
00179                                const EntityHandle* tag_values );
00180     inline Error setESHArrData( const EntityHandle* entity_handles,
00181                                 int entity_handles_size,
00182                                 TagHandle tag_handle,
00183                                 const EntitySetHandle* tag_values );
00184     
00185     
00186     inline Error setData( EntityHandle entity_handle,
00187                           TagHandle tag_handle,
00188                           const void* tag_value );
00189     inline Error setIntData( EntityHandle entity_handle,
00190                              TagHandle tag_handle,
00191                              int value );
00192     inline Error setDblData( EntityHandle entity_handle,
00193                              TagHandle tag_handle,
00194                              double value );
00195     inline Error setEHData( EntityHandle entity_handle,
00196                             TagHandle tag_handle,
00197                             EntityHandle value );
00198     inline Error setESHData( EntityHandle entity_handle,
00199                              TagHandle tag_handle,
00200                              EntitySetHandle value );
00201     
00202     inline Error getData( EntityHandle entity_handle,
00203                           TagHandle tag_handle,
00204                           void* tag_value_out ) const;
00205     inline Error getIntData( EntityHandle entity_handle,
00206                              TagHandle tag_handle,
00207                              int& value_out ) const;
00208     inline Error getDblData( EntityHandle entity_handle,
00209                              TagHandle tag_handle,
00210                              double& value_out ) const;
00211     inline Error getEHData( EntityHandle entity_handle,
00212                             TagHandle tag_handle,
00213                             EntityHandle& value_out ) const;
00214     inline Error getESHData( EntityHandle entity_handle,
00215                              TagHandle tag_handle,
00216                              EntitySetHandle& value_out ) const;
00217 };
00218 
00219 
00220 inline PFX(_Instance) PFX(Base)::instance() 
00221 {
00222   return mInstance;
00223 }
00224     
00225 inline PFX(Base)::Error 
00226 PFX(Base)::getErrorType() const
00227 {
00228   int err;
00229   PFX(_getErrorType)( mInstance, &err);
00230   return (Error)err;
00231 }
00232 
00233 inline std::string 
00234 PFX(Base)::getDescription() const
00235 {
00236   std::vector<char> buffer(1024);
00237   PFX(_getDescription)( mInstance, &buffer[0], buffer.size() );
00238   return std::string(&buffer[0]);
00239 }
00240 
00241 
00242 
00243 
00244 inline PFX(Base)::EntitySetHandle 
00245 PFX(Base)::getRootSet() const
00246 {
00247   int err;
00248   EntitySetHandle result;
00249   PFX(_getRootSet)( mInstance, &result, &err );
00250   return iBase_SUCCESS == err ? result : 0;
00251 }
00252 
00253 
00254 
00255 inline PFX(Base)::Error
00256 PFX(Base)::createEntSet( bool is_list, EntitySetHandle& handle_out )
00257 {
00258   int err;
00259   PFX(_createEntSet)( mInstance, is_list, &handle_out, &err );
00260   return (Error)err;
00261 }
00262 
00263 inline PFX(Base)::Error
00264 PFX(Base)::destroyEntSet( EntitySetHandle handle )
00265 {
00266   int err;
00267   PFX(_destroyEntSet)( mInstance, handle, &err );
00268   return (Error)err;
00269 }
00270 
00271 inline PFX(Base)::Error
00272 PFX(Base)::isList( EntitySetHandle handle, bool& is_list ) const
00273 {
00274   int err, result;
00275   PFX(_isList)( mInstance, handle, &result, &err );
00276   is_list = (result != 0);
00277   return (Error)err;
00278 }
00279 
00280 inline PFX(Base)::Error
00281 PFX(Base)::getNumEntSets( EntitySetHandle set, int num_hops, int& num_sets_out ) const
00282 {
00283   int err;
00284   PFX(_getNumEntSets)( mInstance, set, num_hops, &num_sets_out, &err );
00285   return (Error)err;
00286 }
00287 
00288 inline PFX(Base)::Error
00289 PFX(Base)::getEntSets( EntitySetHandle set, int num_hops,
00290                    std::vector<EntitySetHandle>& contained_sets_out ) const
00291 {
00292   int err, count;
00293   PFX(_getNumEntSets)( mInstance, set, num_hops, &count, &err );
00294   if (iBase_SUCCESS != err)
00295     return (Error)err;
00296   contained_sets_out.resize(count);
00297   int alloc = contained_sets_out.size(), size;
00298   EntitySetHandle* ptr = &contained_sets_out[0];
00299   PFX(_getEntSets)( mInstance, set, num_hops, &ptr, &alloc, &size, &err );
00300   return (Error)err;
00301 }
00302 
00303 inline PFX(Base)::Error
00304 PFX(Base)::addEntToSet( EntityHandle entity, EntitySetHandle set )
00305 {
00306   int err;
00307   PFX(_addEntToSet)( mInstance, entity,set, &err );
00308   return (Error)err;
00309 }
00310 
00311 inline PFX(Base)::Error
00312 PFX(Base)::rmvEntFromSet( EntityHandle entity, EntitySetHandle set )
00313 {
00314   int err;
00315   PFX(_rmvEntFromSet)( mInstance, entity,set, &err );
00316   return (Error)err;
00317 }
00318 
00319 inline PFX(Base)::Error
00320 PFX(Base)::addEntArrToSet( const EntityHandle* entity_handles,
00321                              int entity_handles_size,
00322                              EntitySetHandle entity_set )
00323 {
00324   int err;
00325   PFX(_addEntArrToSet)( mInstance, entity_handles, entity_handles_size, entity_set, &err );
00326   return (Error)err;
00327 }
00328 
00329 inline PFX(Base)::Error
00330 PFX(Base)::rmvEntArrFromSet( const EntityHandle* entity_handles,
00331                                int entity_handles_size,
00332                                EntitySetHandle entity_set )
00333 {
00334   int err;
00335   PFX(_rmvEntArrFromSet)( mInstance, entity_handles, entity_handles_size, entity_set, &err );
00336   return (Error)err;
00337 }
00338 
00339 inline PFX(Base)::Error
00340 PFX(Base)::addEntSet( EntitySetHandle to_add, EntitySetHandle add_to )
00341 {
00342   int err;
00343   PFX(_addEntSet)( mInstance, to_add, add_to, &err );
00344   return (Error)err;
00345 }
00346 
00347 inline PFX(Base)::Error
00348 PFX(Base)::rmvEntSet( EntitySetHandle to_rmv, EntitySetHandle rmv_from )
00349 {
00350   int err;
00351   PFX(_rmvEntSet)( mInstance, to_rmv, rmv_from, &err );
00352   return (Error)err;
00353 }
00354 
00355 inline PFX(Base)::Error
00356 PFX(Base)::isEntContained( EntitySetHandle set, EntityHandle ent, bool& contained_out ) const
00357 {
00358   int err, result;
00359   PFX(_isEntContained)( mInstance, set, ent, &result, &err );
00360   contained_out = (result != 0);
00361   return (Error)err;
00362 }
00363 
00364 inline PFX(Base)::Error
00365 PFX(Base)::isEntArrContained( EntitySetHandle containing_set,
00366                                 const EntityHandle* entity_handles,
00367                                 int num_entity_handles,
00368                                 bool* is_contained_out ) const
00369 {
00370   int err, *ptr = 0, alloc = 0, size = 0;
00371   PFX(_isEntArrContained)( mInstance, containing_set,
00372                            entity_handles, num_entity_handles,
00373                            &ptr, &alloc, &size, &err );
00374   if (iBase_SUCCESS != err)
00375     return (Error)err;
00376   for (int i = 0; i < num_entity_handles; ++i)
00377     is_contained_out[i] = (ptr[i] != 0);
00378   free(ptr);
00379   return iBase_SUCCESS;
00380 }
00381 
00382 inline PFX(Base)::Error
00383 PFX(Base)::isEntSetContained( EntitySetHandle containing_set, 
00384                           EntitySetHandle contained_set, 
00385                           bool& contained_out ) const
00386 {
00387   int err, result;
00388   PFX(_isEntSetContained)( mInstance, containing_set, contained_set, &result, &err );
00389   contained_out = (result != 0);
00390   return (Error)err;
00391 }
00392 
00393 inline PFX(Base)::Error
00394 PFX(Base)::addPrntChld( EntitySetHandle parent, EntitySetHandle child )
00395 {
00396   int err;
00397   PFX(_addPrntChld)( mInstance, parent, child, &err );
00398   return (Error)err;
00399 }
00400 
00401 inline PFX(Base)::Error
00402 PFX(Base)::rmvPrntChld( EntitySetHandle parent, EntitySetHandle child )
00403 {
00404   int err;
00405   PFX(_rmvPrntChld)( mInstance, parent, child, &err );
00406   return (Error)err;
00407 }
00408 
00409 inline PFX(Base)::Error
00410 PFX(Base)::isChildOf( EntitySetHandle parent, EntitySetHandle child, bool& is_child_out ) const
00411 {
00412   int err, result;
00413   PFX(_isChildOf)( mInstance, parent, child, &result, &err );
00414   is_child_out = (result != 0);
00415   return (Error)err;
00416 }
00417 
00418 inline PFX(Base)::Error
00419 PFX(Base)::getNumChld( EntitySetHandle parent, int num_hops, int& num_child_out ) const
00420 {
00421   int err;
00422   PFX(_getNumChld)( mInstance, parent, num_hops, &num_child_out, &err );
00423   return (Error)err;
00424 }
00425 
00426 inline PFX(Base)::Error
00427 PFX(Base)::getNumPrnt( EntitySetHandle child, int num_hops, int& num_parent_out ) const
00428 {
00429   int err;
00430   PFX(_getNumPrnt)( mInstance, child, num_hops, &num_parent_out, &err );
00431   return (Error)err;
00432 }
00433 
00434 inline PFX(Base)::Error
00435 PFX(Base)::getChldn( EntitySetHandle parent, int num_hops, 
00436                  std::vector<EntitySetHandle>& children_out ) const
00437 {
00438   int err, count;
00439   PFX(_getNumChld)( mInstance, parent, num_hops, &count, &err );
00440   if (iBase_SUCCESS != err)
00441     return (Error)err;
00442   children_out.resize(count);
00443   int alloc = children_out.size(), size;
00444   EntitySetHandle* ptr = &children_out[0];
00445   PFX(_getEntSets)( mInstance, parent, num_hops, &ptr, &alloc, &size, &err );
00446   return (Error)err;
00447 }
00448 
00449 inline PFX(Base)::Error
00450 PFX(Base)::getPrnts( EntitySetHandle child, int num_hops, 
00451                  std::vector<EntitySetHandle>& parents_out ) const
00452 {
00453   int err, count;
00454   PFX(_getNumPrnt)( mInstance, child, num_hops, &count, &err );
00455   if (iBase_SUCCESS != err)
00456     return (Error)err;
00457   parents_out.resize(count);
00458   int alloc = parents_out.size(), size;
00459   EntitySetHandle* ptr = &parents_out[0];
00460   PFX(_getEntSets)( mInstance, child, num_hops, &ptr, &alloc, &size, &err );
00461   return (Error)err;
00462 }
00463 
00464 
00465 inline PFX(Base)::Error
00466 PFX(Base)::subtract( EntitySetHandle set1, EntitySetHandle set2,
00467                  EntitySetHandle& result_set_out )
00468 {
00469   int err;
00470   PFX(_subtract)( mInstance, set1, set1, &result_set_out, &err );
00471   return (Error)err;
00472 }
00473 
00474 inline PFX(Base)::Error
00475 PFX(Base)::intersect( EntitySetHandle set1, EntitySetHandle set2,
00476                   EntitySetHandle& result_set_out )
00477 {
00478   int err;
00479   PFX(_intersect)( mInstance, set1, set1, &result_set_out, &err );
00480   return (Error)err;
00481 }
00482 
00483 inline PFX(Base)::Error
00484 PFX(Base)::unite( EntitySetHandle set1, EntitySetHandle set2,
00485               EntitySetHandle& result_set_out )
00486 {
00487   int err;
00488   PFX(_unite)( mInstance, set1, set1, &result_set_out, &err );
00489   return (Error)err;
00490 }
00491 
00492                        
00493 inline PFX(Base)::Error
00494 PFX(Base)::createTag( const char* tag_name,
00495                   int tag_num_type_values,
00496                   TagValueType tag_type,
00497                   TagHandle& tag_handle_out )
00498 {
00499   int err;
00500   PFX(_createTag)( mInstance, tag_name, tag_num_type_values, tag_type,
00501                    &tag_handle_out, &err, strlen(tag_name) );
00502   return (Error)err;
00503 }
00504 
00505 
00506 inline PFX(Base)::Error
00507 PFX(Base)::destroyTag( TagHandle tag_handle, bool forced )
00508 {
00509   int err;
00510   PFX(_destroyTag)( mInstance, tag_handle, forced, &err );
00511   return (Error)err;
00512 }
00513 
00514 inline PFX(Base)::Error
00515 PFX(Base)::getTagName( TagHandle tag_handle, std::string& name_out ) const
00516 {
00517   int err;
00518   char buffer[1024];
00519   memset( buffer, 0, sizeof(buffer) );
00520   PFX(_getTagName)( mInstance, tag_handle, buffer, &err, sizeof(buffer) );
00521   name_out = buffer;
00522   return (Error)err;
00523 }
00524 
00525 inline PFX(Base)::Error
00526 PFX(Base)::getTagSizeValues( TagHandle tag_handle, int& size_out ) const
00527 {
00528   int err;
00529   PFX(_getTagSizeValues)( mInstance, tag_handle, &size_out, &err );
00530   return (Error)err;
00531 }
00532 
00533 inline PFX(Base)::Error
00534 PFX(Base)::getTagSizeBytes( TagHandle tag_handle, int& size_out ) const
00535 {
00536   int err;
00537   PFX(_getTagSizeBytes)( mInstance, tag_handle, &size_out, &err );
00538   return (Error)err;
00539 }
00540 
00541 inline PFX(Base)::Error
00542 PFX(Base)::getTagHandle( const char* name, TagHandle& handle_out ) const
00543 {
00544   int err;
00545   PFX(_getTagHandle)( mInstance, name, &handle_out, &err, strlen(name) );
00546   return (Error)err;
00547 }
00548 
00549 inline PFX(Base)::Error
00550 PFX(Base)::getTagType( TagHandle tag_handle, TagValueType& type_out ) const
00551 {
00552   int err, result;
00553   PFX(_getTagType)( mInstance, tag_handle, &result, &err );
00554   type_out = (TagValueType)result;
00555   return (Error)err;
00556 }
00557 
00558 
00559 inline PFX(Base)::Error
00560 PFX(Base)::setEntSetData( EntitySetHandle set_handle,
00561                           TagHandle tag_handle,
00562                           const void* tag_value )
00563 {
00564   int err, size = 1;
00565   PFX(_getTagSizeBytes)( mInstance, tag_handle, &size, &err );
00566   PFX(_setEntSetData)( mInstance, set_handle, tag_handle, 
00567                        (const char*)tag_value, size, &err);
00568   return (Error)err;
00569 }
00570 
00571 inline PFX(Base)::Error
00572 PFX(Base)::setEntSetIntData( EntitySetHandle set_handle,
00573                              TagHandle tag_handle,
00574                              int value )
00575 {
00576   int err;
00577   PFX(_setEntSetIntData)( mInstance, set_handle, tag_handle, value, &err );
00578   return (Error)err;
00579 }
00580 
00581 inline PFX(Base)::Error
00582 PFX(Base)::setEntSetDblData( EntitySetHandle set_handle,
00583                              TagHandle tag_handle,
00584                              double value )
00585 {
00586   int err;
00587   PFX(_setEntSetDblData)( mInstance, set_handle, tag_handle, value, &err );
00588   return (Error)err;
00589 }
00590 
00591 inline PFX(Base)::Error
00592 PFX(Base)::setEntSetEHData( EntitySetHandle set_handle,
00593                             TagHandle tag_handle,
00594                             EntityHandle value )
00595 
00596 {
00597   int err;
00598   PFX(_setEntSetEHData)( mInstance, set_handle, tag_handle, value, &err );
00599   return (Error)err;
00600 }
00601 
00602 inline PFX(Base)::Error
00603 PFX(Base)::setEntSetESHData( EntitySetHandle set_handle,
00604                              TagHandle tag_handle,
00605                              EntitySetHandle value )
00606 
00607 {
00608   int err;
00609   PFX(_setEntSetESHData)( mInstance, set_handle, tag_handle, value, &err );
00610   return (Error)err;
00611 }
00612 
00613 inline PFX(Base)::Error
00614 PFX(Base)::getEntSetData( EntitySetHandle set_handle,
00615                           TagHandle tag_handle,
00616                           void* tag_value_out ) const
00617 {
00618   int err, alloc = std::numeric_limits<int>::max(), size;
00619   PFX(_getEntSetData)( mInstance, set_handle, tag_handle, 
00620                       &tag_value_out, &alloc, &size, &err);
00621   return (Error)err;
00622 }
00623 
00624 inline PFX(Base)::Error
00625 PFX(Base)::getEntSetIntData( EntitySetHandle set_handle,
00626                              TagHandle tag_handle,
00627                              int& value_out ) const
00628 {
00629   int err;
00630   PFX(_getEntSetIntData)( mInstance, set_handle, tag_handle, &value_out, &err );
00631   return (Error)err;
00632 }
00633 
00634 inline PFX(Base)::Error
00635 PFX(Base)::getEntSetDblData( EntitySetHandle set_handle,
00636                              TagHandle tag_handle,
00637                              double& value_out ) const
00638 {
00639   int err;
00640   PFX(_getEntSetDblData)( mInstance, set_handle, tag_handle, &value_out, &err );
00641   return (Error)err;
00642 }
00643 
00644 inline PFX(Base)::Error
00645 PFX(Base)::getEntSetEHData( EntitySetHandle set_handle,
00646                             TagHandle tag_handle,
00647                             EntityHandle& value_out ) const
00648 
00649 {
00650   int err;
00651   PFX(_getEntSetEHData)( mInstance, set_handle, tag_handle, &value_out, &err );
00652   return (Error)err;
00653 }
00654 
00655 inline PFX(Base)::Error
00656 PFX(Base)::getEntSetESHData( EntitySetHandle set_handle,
00657                              TagHandle tag_handle,
00658                              EntitySetHandle& value_out ) const
00659 
00660 {
00661   int err;
00662   PFX(_getEntSetESHData)( mInstance, set_handle, tag_handle, &value_out, &err );
00663   return (Error)err;
00664 }
00665 
00666 inline PFX(Base)::Error
00667 PFX(Base)::getAllEntSetTags( EntitySetHandle set,
00668                          std::vector<TagHandle>& tags_out ) const
00669 {
00670   if (tags_out.capacity() == 0)
00671     tags_out.resize( 32 );
00672   else
00673     tags_out.resize( tags_out.capacity() );
00674   
00675   int err, alloc = tags_out.size(), size = 0;
00676   TagHandle* ptr = &tags_out[0];
00677   PFX(_getAllEntSetTags)( mInstance, set, &ptr, &alloc, &size, &err );
00678   tags_out.resize(size);
00679   
00680   if (iBase_BAD_ARRAY_DIMENSION == err || iBase_BAD_ARRAY_SIZE == err) {
00681     alloc = tags_out.size();
00682     ptr = &tags_out[0];
00683     PFX(_getAllEntSetTags)( mInstance, set, &ptr, &alloc, &size, &err );
00684   }
00685   
00686   return (Error)err;
00687 }
00688 
00689 inline PFX(Base)::Error
00690 PFX(Base)::getAllTags( EntityHandle entity,
00691                    std::vector<TagHandle>& tags_out ) const
00692                                
00693 {
00694   if (tags_out.capacity() == 0)
00695     tags_out.resize( 32 );
00696   else
00697     tags_out.resize( tags_out.capacity() );
00698   
00699   int err, alloc = tags_out.size(), size = 0;
00700   TagHandle* ptr = &tags_out[0];
00701   PFX(_getAllTags)( mInstance, entity, &ptr, &alloc, &size, &err );
00702   tags_out.resize(size);
00703   
00704   if (iBase_BAD_ARRAY_DIMENSION == err || iBase_BAD_ARRAY_SIZE == err) {
00705     alloc = tags_out.size();
00706     ptr = &tags_out[0];
00707     PFX(_getAllTags)( mInstance, entity, &ptr, &alloc, &size, &err );
00708   }
00709   
00710   return (Error)err;
00711 }
00712 
00713 inline PFX(Base)::Error
00714 PFX(Base)::rmvEntSetTag( EntitySetHandle set, TagHandle tag )
00715 {
00716   int err;
00717   PFX(_rmvEntSetTag)( mInstance, set, tag, &err );
00718   return (Error)err;
00719 }
00720 
00721 inline PFX(Base)::Error
00722 PFX(Base)::rmvTag( EntityHandle entity, TagHandle tag )
00723 {
00724   int err;
00725   PFX(_rmvTag)( mInstance, entity, tag, &err );
00726   return (Error)err;
00727 }
00728 
00729 inline PFX(Base)::Error
00730 PFX(Base)::rmvArrTag( const EntityHandle* handles, int size, TagHandle tag )
00731 {
00732   int err;
00733   PFX(_rmvArrTag)( mInstance, handles, size, tag, &err );
00734   return (Error)err;
00735 }
00736 
00737 
00738 inline PFX(Base)::Error
00739 PFX(Base)::getArrData( const EntityHandle* entity_handles,
00740                        int entity_handles_size,
00741                        TagHandle tag_handle,
00742                        void* tag_values_out ) const
00743 {
00744   int err, alloc = std::numeric_limits<int>::max(), size;
00745   PFX(_getArrData)( mInstance, entity_handles, entity_handles_size, tag_handle, 
00746                     &tag_values_out, &alloc, &size, &err);
00747   return (Error)err;
00748 }
00749 
00750 inline PFX(Base)::Error
00751 PFX(Base)::getIntArrData( const EntityHandle* entity_handles,
00752                           int entity_handles_size,
00753                           TagHandle tag_handle,
00754                           int* tag_values_out ) const
00755 {
00756   int err, alloc = std::numeric_limits<int>::max(), size;
00757   PFX(_getIntArrData)( mInstance, entity_handles, entity_handles_size, tag_handle, 
00758                        &tag_values_out, &alloc, &size, &err);
00759   return (Error)err;
00760 }
00761 
00762 inline PFX(Base)::Error
00763 PFX(Base)::getDblArrData( const EntityHandle* entity_handles,
00764                           int entity_handles_size,
00765                           TagHandle tag_handle,
00766                           double* tag_values_out ) const
00767 {
00768   int err, alloc = std::numeric_limits<int>::max(), size;
00769   PFX(_getDblArrData)( mInstance, entity_handles, entity_handles_size, tag_handle, 
00770                        &tag_values_out, &alloc, &size, &err);
00771   return (Error)err;
00772 }
00773 
00774 inline PFX(Base)::Error
00775 PFX(Base)::getEHArrData( const EntityHandle* entity_handles,
00776                          int entity_handles_size,
00777                          TagHandle tag_handle,
00778                          EntityHandle* tag_values_out ) const
00779 
00780 {
00781   int err, alloc = std::numeric_limits<int>::max(), size;
00782   PFX(_getEHArrData)( mInstance, entity_handles, entity_handles_size, tag_handle, 
00783                       &tag_values_out, &alloc, &size, &err);
00784   return (Error)err;
00785 }
00786 
00787 inline PFX(Base)::Error
00788 PFX(Base)::getESHArrData( const EntityHandle* entity_handles,
00789                           int entity_handles_size,
00790                           TagHandle tag_handle,
00791                           EntitySetHandle* tag_values_out ) const
00792 
00793 {
00794   int err, alloc = std::numeric_limits<int>::max(), size;
00795   PFX(_getESHArrData)( mInstance, entity_handles, entity_handles_size, tag_handle, 
00796                       &tag_values_out, &alloc, &size, &err);
00797   return (Error)err;
00798 }
00799 
00800 inline PFX(Base)::Error
00801 PFX(Base)::setArrData( const EntityHandle* entity_handles,
00802                        int entity_handles_size,
00803                        TagHandle tag_handle,
00804                        const void* tag_values )
00805 {
00806   int err, size = 1;
00807   PFX(_getTagSizeBytes)( mInstance, tag_handle, &size, &err );
00808   PFX(_setArrData)( mInstance, entity_handles, entity_handles_size, tag_handle,
00809                     (const char*)tag_values, size*entity_handles_size, 
00810                     &err );
00811   return (Error)err;
00812 }
00813 
00814 inline PFX(Base)::Error
00815 PFX(Base)::setIntArrData( const EntityHandle* entity_handles,
00816                           int entity_handles_size,
00817                           TagHandle tag_handle,
00818                           const int* tag_values )
00819 {
00820   int err, size = 1;
00821   PFX(_getTagSizeValues)( mInstance, tag_handle, &size, &err );
00822   PFX(_setIntArrData)( mInstance, entity_handles, entity_handles_size, tag_handle,
00823                        tag_values, size*entity_handles_size, &err );
00824   return (Error)err;
00825 }
00826 
00827 inline PFX(Base)::Error
00828 PFX(Base)::setDblArrData( const EntityHandle* entity_handles,
00829                           int entity_handles_size,
00830                           TagHandle tag_handle,
00831                           const double* tag_values )
00832 {
00833   int err, size = 1;
00834   PFX(_getTagSizeValues)( mInstance, tag_handle, &size, &err );
00835   PFX(_setDblArrData)( mInstance, entity_handles, entity_handles_size, tag_handle,
00836                        tag_values, size*entity_handles_size, &err );
00837   return (Error)err;
00838 }
00839 
00840 inline PFX(Base)::Error
00841 PFX(Base)::setEHArrData( const EntityHandle* entity_handles,
00842                          int entity_handles_size,
00843                          TagHandle tag_handle,
00844                          const EntityHandle* tag_values )
00845 {
00846   int err, size = 1;
00847   PFX(_getTagSizeValues)( mInstance, tag_handle, &size, &err );
00848   PFX(_setEHArrData)( mInstance, entity_handles, entity_handles_size, tag_handle,
00849                       tag_values, size*entity_handles_size, &err );
00850   return (Error)err;
00851 }
00852 
00853 inline PFX(Base)::Error
00854 PFX(Base)::setESHArrData( const EntityHandle* entity_handles,
00855                           int entity_handles_size,
00856                           TagHandle tag_handle,
00857                           const EntitySetHandle* tag_values )
00858 {
00859   int err, size = 1;
00860   PFX(_getTagSizeValues)( mInstance, tag_handle, &size, &err );
00861   PFX(_setESHArrData)( mInstance, entity_handles, entity_handles_size, tag_handle,
00862                       tag_values, size*entity_handles_size, &err );
00863   return (Error)err;
00864 }
00865 
00866 
00867 
00868 inline PFX(Base)::Error
00869 PFX(Base)::setData( EntityHandle entity_handle,
00870                     TagHandle tag_handle,
00871                     const void* tag_value )
00872 {
00873   int err, size = 1;
00874   PFX(_getTagSizeBytes)( mInstance, tag_handle, &size, &err );
00875   PFX(_setData)( mInstance, entity_handle, tag_handle, 
00876                  (const char*)tag_value, size, &err);
00877   return (Error)err;
00878   return (Error)err;
00879 }
00880 
00881 inline PFX(Base)::Error
00882 PFX(Base)::setIntData( EntityHandle entity_handle,
00883                        TagHandle tag_handle,
00884                        int value )
00885 {
00886   int err;
00887   PFX(_setIntData)( mInstance, entity_handle, tag_handle, value, &err );
00888   return (Error)err;
00889 }
00890 
00891 inline PFX(Base)::Error
00892 PFX(Base)::setDblData( EntityHandle entity_handle,
00893                        TagHandle tag_handle,
00894                        double value )
00895 {
00896   int err;
00897   PFX(_setDblData)( mInstance, entity_handle, tag_handle, value, &err );
00898   return (Error)err;
00899 }
00900 
00901 inline PFX(Base)::Error
00902 PFX(Base)::setEHData( EntityHandle entity_handle,
00903                       TagHandle tag_handle,
00904                       EntityHandle value )
00905 
00906 {
00907   int err;
00908   PFX(_setEHData)( mInstance, entity_handle, tag_handle, value, &err );
00909   return (Error)err;
00910 }
00911 
00912 inline PFX(Base)::Error
00913 PFX(Base)::setESHData( EntityHandle entity_handle,
00914                        TagHandle tag_handle,
00915                        EntitySetHandle value )
00916 
00917 {
00918   int err;
00919   PFX(_setESHData)( mInstance, entity_handle, tag_handle, value, &err );
00920   return (Error)err;
00921 }
00922 
00923 inline PFX(Base)::Error
00924 PFX(Base)::getData( EntityHandle entity_handle,
00925                     TagHandle tag_handle,
00926                     void* tag_value_out ) const
00927 {
00928   int err, alloc = std::numeric_limits<int>::max(), size;
00929   PFX(_getData)( mInstance, entity_handle, tag_handle, 
00930                 &tag_value_out, &alloc, &size, &err);
00931   return (Error)err;
00932 }
00933 
00934 inline PFX(Base)::Error
00935 PFX(Base)::getIntData( EntityHandle entity_handle,
00936                        TagHandle tag_handle,
00937                        int& value_out ) const
00938 {
00939   int err;
00940   PFX(_getIntData)( mInstance, entity_handle, tag_handle, &value_out, &err );
00941   return (Error)err;
00942 }
00943 
00944 inline PFX(Base)::Error
00945 PFX(Base)::getDblData( EntityHandle entity_handle,
00946                        TagHandle tag_handle,
00947                        double& value_out ) const
00948 {
00949   int err;
00950   PFX(_getDblData)( mInstance, entity_handle, tag_handle, &value_out, &err );
00951   return (Error)err;
00952 }
00953 
00954 inline PFX(Base)::Error
00955 PFX(Base)::getEHData( EntityHandle entity_handle,
00956                       TagHandle tag_handle,
00957                       EntityHandle& value_out ) const
00958 {
00959   int err;
00960   PFX(_getEHData)( mInstance, entity_handle, tag_handle, &value_out, &err );
00961   return (Error)err;
00962 }
00963 
00964 inline PFX(Base)::Error
00965 PFX(Base)::getESHData( EntityHandle entity_handle,
00966                        TagHandle tag_handle,
00967                        EntitySetHandle& value_out ) const
00968 {
00969   int err;
00970   PFX(_getESHData)( mInstance, entity_handle, tag_handle, &value_out, &err );
00971   return (Error)err;
00972 }
00973 
00974 #undef PFX__
00975 #undef PFX_
00976 #undef PFX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines