cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : RefCollection.cc 00003 // 00004 // Purpose : Implementation of the RefCollection class. 00005 // 00006 // 00007 // Special Notes : Created to support Pro/E assemblies, parts and features 00008 // 00009 // Creator : Steve Storm 00010 // 00011 // Creation Date : 07/16/97 00012 // 00013 // Owner : Steve Storm 00014 //------------------------------------------------------------------------- 00015 00016 #include "RefCollection.hpp" 00017 #include "CollectionEntity.hpp" 00018 00019 RefCollection::RefCollection() 00020 : collectionEntityPtr(NULL) 00021 {} 00022 00023 RefCollection::~RefCollection() 00024 {} 00025 00026 00027 //------------------------------------------------------------------------- 00028 // Purpose : Sets the associated CollectionEntity 00029 // 00030 // Special Notes : 00031 // 00032 // Creator : Steve Storm 00033 // 00034 // Creation Date : 07/31/96 00035 //------------------------------------------------------------------------- 00036 CubitStatus RefCollection::set_collection_entity_ptr( 00037 CollectionEntity* collection_entity_ptr ) 00038 { 00039 // Make sure that a CUBIT OWNER attribute is attached to the solid 00040 // model entity underlying the CollectionEntity. This attribute contains 00041 // a (back)pointer to this VGI GroupingEntity. 00042 00043 CubitStatus status = collection_entity_ptr->set_owner_attribute( this ); 00044 00045 if (status == CUBIT_SUCCESS) 00046 { 00047 collectionEntityPtr = collection_entity_ptr ; 00048 } 00049 else 00050 { 00051 PRINT_ERROR("In RefCollection::set_collection_entity_ptr\n" 00052 " Unable to set owner attribute\n" ); 00053 } 00054 00055 return status ; 00056 }