cgma
TDVGFacetOwner.cpp
Go to the documentation of this file.
00001 #include "TDVGFacetOwner.hpp"
00002 #include "ToolDataUser.hpp"
00003 
00004 PartitionEntity* TDVGFacetOwner::get( ToolDataUser* user )
00005 {
00006   ToolData* td = user->get_TD( &is_vg_facet_owner );
00007   return td ? dynamic_cast<TDVGFacetOwner*>(td)->owner() : 0;
00008 }
00009 
00010 void TDVGFacetOwner::set( ToolDataUser* user, PartitionEntity* owner )
00011 {
00012   ToolData* td = user->get_TD( &is_vg_facet_owner );
00013   if( td )
00014   {
00015     dynamic_cast<TDVGFacetOwner*>(td)->mOwner = owner;
00016   }
00017   else
00018   {
00019     td = new TDVGFacetOwner( owner );
00020     user->add_TD( td );
00021   }
00022 }
00023 
00024 void TDVGFacetOwner::remove( ToolDataUser* user )
00025 {
00026   delete user->remove_TD( &is_vg_facet_owner );
00027 }
00028 
00029   
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines