cgma
|
#include <PartitionLoop.hpp>
Definition at line 19 of file PartitionLoop.hpp.
Definition at line 17 of file PartitionLoop.cpp.
: mySurface(0), firstCoedge( 0 ), nextInSurface( 0 ), numCoedges( 0 ) { }
PartitionLoop::~PartitionLoop | ( | ) | [virtual] |
Definition at line 52 of file PartitionLoop.cpp.
{ if( mySurface ) { mySurface->remove( this ); mySurface = 0; } CubitStatus s = remove_all_coedges(); assert( s ); if (CUBIT_SUCCESS != s) { PRINT_ERROR("Failed to remove all coedges.\n"); } }
PartitionLoop::PartitionLoop | ( | const PartitionLoop & | ) | [private] |
void PartitionLoop::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [virtual] |
PartitionCoEdge * PartitionLoop::first_coedge | ( | ) | [inline] |
Definition at line 77 of file PartitionLoop.hpp.
{ return firstCoedge; }
void PartitionLoop::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [virtual] |
Implements TopologyBridge.
Definition at line 219 of file PartitionLoop.cpp.
{ PartitionCoEdge* coedge = firstCoedge; if( coedge ) do { children.append( coedge ); coedge = next_coedge( coedge ); } while( coedge != firstCoedge ); }
GeometryQueryEngine * PartitionLoop::get_geometry_query_engine | ( | ) | const [virtual] |
Implements TopologyBridge.
Definition at line 252 of file PartitionLoop.cpp.
{ return VirtualQueryEngine::instance(); }
void PartitionLoop::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [virtual] |
Implements TopologyBridge.
Definition at line 206 of file PartitionLoop.cpp.
CubitStatus PartitionLoop::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | ) | [virtual] |
Implements TopologyBridge.
Definition at line 270 of file PartitionLoop.cpp.
{ return CUBIT_FAILURE; }
CubitStatus PartitionLoop::get_simple_attribute | ( | const CubitString & | , |
DLIList< CubitSimpleAttrib > & | |||
) | [virtual] |
Implements TopologyBridge.
Definition at line 272 of file PartitionLoop.cpp.
{ return CUBIT_FAILURE; }
PartitionSurface * PartitionLoop::get_surface | ( | ) | const [inline] |
Definition at line 74 of file PartitionLoop.hpp.
{ return mySurface; }
CubitStatus PartitionLoop::insert_after | ( | PartitionCoEdge * | coedge, |
PartitionCoEdge * | after | ||
) |
Definition at line 76 of file PartitionLoop.cpp.
{ if( insert->myLoop != 0 ) return CUBIT_FAILURE; if( numCoedges == 0 ) { if( after ) return CUBIT_FAILURE; insert->loopNext = insert; insert->loopPrev = insert; firstCoedge = insert; } else { if( !after || after->myLoop != this ) return CUBIT_FAILURE; insert->loopPrev = after; insert->loopNext = after->loopNext; insert->loopNext->loopPrev = insert; insert->loopPrev->loopNext = insert; } insert->myLoop = this; numCoedges++; return CUBIT_SUCCESS; }
CubitStatus PartitionLoop::insert_before | ( | PartitionCoEdge * | coedge, |
PartitionCoEdge * | before | ||
) |
Definition at line 106 of file PartitionLoop.cpp.
{ if( insert->myLoop != 0 ) return CUBIT_FAILURE; if( numCoedges == 0 ) { if( before ) return CUBIT_FAILURE; insert->loopNext = insert; insert->loopPrev = insert; firstCoedge = insert; } else { if( !before || before->myLoop != this ) return CUBIT_FAILURE; insert->loopNext = before; insert->loopPrev = before->loopPrev; insert->loopNext->loopPrev = insert; insert->loopPrev->loopNext = insert; } insert->myLoop = this; numCoedges++; return CUBIT_SUCCESS; }
CubitBoolean PartitionLoop::is_external | ( | ) | [virtual] |
Definition at line 32 of file PartitionLoop.cpp.
{ PRINT_ERROR( "This command is not supported with this engine.\n"); return CUBIT_FAILURE; }
int PartitionLoop::layer | ( | ) | const [virtual] |
Reimplemented from TopologyBridge.
Definition at line 240 of file PartitionLoop.cpp.
{ return get_surface()->layer(); }
LoopType PartitionLoop::loop_type | ( | ) | [virtual] |
PartitionCoEdge * PartitionLoop::next_coedge | ( | PartitionCoEdge * | after_this | ) | [inline] |
Definition at line 83 of file PartitionLoop.hpp.
{ return prev->myLoop == this ? prev->loopNext : 0; }
int PartitionLoop::num_coedges | ( | ) | [inline] |
Definition at line 80 of file PartitionLoop.hpp.
{ return numCoedges; }
PartitionCoEdge * PartitionLoop::prev_coedge | ( | PartitionCoEdge * | before_this | ) | [inline] |
Definition at line 86 of file PartitionLoop.hpp.
{ return next->myLoop == this ? next->loopPrev : 0; }
void PartitionLoop::print_debug_info | ( | const char * | line_prefix = 0 | ) |
Definition at line 301 of file PartitionLoop.cpp.
{ /* if( line_prefix == 0 ) line_prefix = ""; char* new_prefix = new char[strlen(line_prefix)+3]; strcpy( new_prefix, line_prefix ); strcat( new_prefix, " " ); PRINT_INFO("%sPartitionLoop @ %p : \n", line_prefix, this ); PartitionCoEdge* coedge = first_coedge(); if( !coedge ) PRINT_INFO("%s No CoEdges!!\n"); else do { coedge->print_debug_info( new_prefix ); coedge = next_coedge( coedge ); } while( coedge != first_coedge() ); delete [] new_prefix; */ }
CubitStatus PartitionLoop::remove | ( | PartitionCoEdge * | coedge | ) |
Definition at line 146 of file PartitionLoop.cpp.
{ if( coedge->myLoop != this ) return CUBIT_FAILURE; if( numCoedges == 1 ) { assert( coedge->loopNext == coedge && coedge->loopPrev == coedge ); firstCoedge = 0; } else { coedge->loopNext->loopPrev = coedge->loopPrev; coedge->loopPrev->loopNext = coedge->loopNext; if( firstCoedge == coedge ) firstCoedge = coedge->loopNext; } numCoedges--; coedge->myLoop = 0; coedge->loopNext = 0; coedge->loopPrev = 0; return CUBIT_SUCCESS; }
CubitStatus PartitionLoop::remove_all_coedges | ( | DLIList< PartitionCoEdge * > * | removed = 0 | ) |
Definition at line 185 of file PartitionLoop.cpp.
{ while( firstCoedge ) { if( list ) list->append( firstCoedge ); remove( firstCoedge ); } return CUBIT_SUCCESS; }
void PartitionLoop::remove_all_simple_attribute_virt | ( | ) | [virtual] |
void PartitionLoop::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [virtual] |
void PartitionLoop::reverse | ( | ) |
Definition at line 287 of file PartitionLoop.cpp.
{ PartitionCoEdge* coedge = firstCoedge; if( coedge ) do { PartitionCoEdge* temp = coedge->loopNext; coedge->loopNext = coedge->loopPrev; coedge->loopPrev = temp; coedge->reverse_sense(); coedge = temp; } while( coedge != firstCoedge ); }
friend class PartitionSurface [friend] |
Definition at line 21 of file PartitionLoop.hpp.
PartitionCoEdge* PartitionLoop::firstCoedge [private] |
Definition at line 69 of file PartitionLoop.hpp.
PartitionSurface* PartitionLoop::mySurface [private] |
Definition at line 68 of file PartitionLoop.hpp.
PartitionLoop* PartitionLoop::nextInSurface [private] |
Definition at line 70 of file PartitionLoop.hpp.
int PartitionLoop::numCoedges [private] |
Definition at line 71 of file PartitionLoop.hpp.