cgma
|
#include <CompositeShell.hpp>
Definition at line 23 of file CompositeShell.hpp.
Definition at line 19 of file CompositeShell.cpp.
: myLump(0), lumpNext(0), firstCoSurf(0) { }
CompositeShell::~CompositeShell | ( | ) | [virtual] |
Definition at line 24 of file CompositeShell.cpp.
{ // if( myLump ) // myLump->remove( this ); while( firstCoSurf ) { CompositeCoSurf* cosurf = firstCoSurf; remove( cosurf ); if( cosurf->get_surface() ) cosurf->get_surface()->remove( cosurf ); delete cosurf; } assert( !myLump ); }
CubitStatus CompositeShell::add | ( | CompositeCoSurf * | cosurf | ) |
Definition at line 51 of file CompositeShell.cpp.
{ if( cosurf->myShell ) return CUBIT_FAILURE; cosurf->shellNext = firstCoSurf; firstCoSurf = cosurf; cosurf->myShell = this; return CUBIT_SUCCESS; }
CompositeCoSurf * CompositeShell::add | ( | CompositeSurface * | surface, |
CubitSense | sense | ||
) |
Definition at line 85 of file CompositeShell.cpp.
{ CompositeCoSurf* cosurf = new CompositeCoSurf( sense ); if( !surface->add( cosurf ) || !add( cosurf ) ) { delete cosurf; cosurf = 0; } return cosurf; }
void CompositeShell::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | simple_attrib_ptr | ) | [virtual] |
CompositeCoSurf * CompositeShell::find_first | ( | const CompositeSurface * | surface | ) | const |
Definition at line 97 of file CompositeShell.cpp.
{ CompositeCoSurf* cosurf = firstCoSurf; while( cosurf && cosurf->get_surface() != surf ) cosurf = cosurf->shellNext; return cosurf; }
CompositeCoSurf * CompositeShell::find_next | ( | const CompositeCoSurf * | prev | ) | const |
Definition at line 105 of file CompositeShell.cpp.
{ CompositeCoSurf* cosurf = prev->shellNext; while( cosurf && cosurf->get_surface() != prev->get_surface() ) cosurf = cosurf->shellNext; return cosurf; }
CubitSense CompositeShell::find_sense | ( | const CompositeSurface * | surface | ) | const |
Definition at line 113 of file CompositeShell.cpp.
{ CompositeCoSurf* first = find_first( surf ); if( !first ) return CUBIT_UNKNOWN; CompositeCoSurf* next = first; while( (next = find_next( next )) ) if( next->sense() != first->sense() ) return CUBIT_UNKNOWN; return first->sense(); }
CompositeCoSurf * CompositeShell::first_co_surf | ( | ) | const [inline] |
Definition at line 75 of file CompositeShell.hpp.
{ return firstCoSurf; }
void CompositeShell::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [virtual] |
Implements TopologyBridge.
Definition at line 135 of file CompositeShell.cpp.
{ for( CompositeCoSurf* c = firstCoSurf; c; c = c->next_in_shell() ) children.append( c->get_surface() ); }
GeometryQueryEngine * CompositeShell::get_geometry_query_engine | ( | ) | const [virtual] |
Implements TopologyBridge.
Definition at line 152 of file CompositeShell.cpp.
{ return VirtualQueryEngine::instance(); }
CompositeLump * CompositeShell::get_lump | ( | ) | const [inline] |
Definition at line 72 of file CompositeShell.hpp.
{ return myLump; }
void CompositeShell::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [virtual] |
Implements TopologyBridge.
Definition at line 132 of file CompositeShell.cpp.
CubitStatus CompositeShell::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | attrib_list | ) | [virtual] |
Implements TopologyBridge.
Definition at line 171 of file CompositeShell.cpp.
{ return CUBIT_FAILURE; }
CubitStatus CompositeShell::get_simple_attribute | ( | const CubitString & | name, |
DLIList< CubitSimpleAttrib > & | attrib_list | ||
) | [virtual] |
Implements TopologyBridge.
Definition at line 173 of file CompositeShell.cpp.
{ return CUBIT_FAILURE; }
int CompositeShell::layer | ( | ) | const [inline, virtual] |
Reimplemented from TopologyBridge.
Definition at line 60 of file CompositeShell.hpp.
{ return COMPOSITE_LAYER; }
CompositeCoSurf * CompositeShell::next_co_surf | ( | CompositeCoSurf * | prev | ) | const |
Definition at line 41 of file CompositeShell.cpp.
{ if (0 == prev) return firstCoSurf; else if (this == prev->myShell) return prev->shellNext; else return 0; }
CompositeShell* CompositeShell::next_shell | ( | ) | const |
void CompositeShell::print_debug_info | ( | const char * | line_prefix = 0 | ) |
Definition at line 187 of file CompositeShell.cpp.
{ if( prefix == 0 ) prefix = ""; PRINT_INFO("%sCompositeShell @ %p : \n", prefix, (void*)this ); char* new_prefix = new char[strlen(prefix)+3]; strcpy( new_prefix, prefix ); strcat( new_prefix, " " ); CompositeCoSurf* cosurf = first_co_surf(); if( !cosurf ) PRINT_INFO("%sNo Surfaces!!\n", prefix); else for (; cosurf; cosurf = next_co_surf( cosurf )) cosurf->print_debug_info( new_prefix ); delete [] new_prefix; }
CubitStatus CompositeShell::remove | ( | CompositeCoSurf * | cosurf | ) |
Definition at line 63 of file CompositeShell.cpp.
{ if( cosurf->myShell != this ) return CUBIT_FAILURE; if( firstCoSurf == cosurf ) firstCoSurf = cosurf->shellNext; else { CompositeCoSurf* prev = firstCoSurf; while( prev && prev->shellNext != cosurf ) prev = prev->shellNext; assert( prev != 0 ); prev->shellNext = cosurf->shellNext; } cosurf->myShell = 0; cosurf->shellNext = 0; return CUBIT_SUCCESS; }
void CompositeShell::remove_all_simple_attribute_virt | ( | ) | [virtual] |
void CompositeShell::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | simple_attrib_ptr | ) | [virtual] |
friend class CompositeLump [friend] |
Definition at line 25 of file CompositeShell.hpp.
CompositeCoSurf* CompositeShell::firstCoSurf [private] |
Definition at line 69 of file CompositeShell.hpp.
CompositeShell* CompositeShell::lumpNext [private] |
Definition at line 67 of file CompositeShell.hpp.
CompositeLump* CompositeShell::myLump [private] |
Definition at line 66 of file CompositeShell.hpp.