cgma
CompositeLoop.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : CompositeLoop.hpp
00003 //
00004 // Purpose       : LoopSM used by composite geometry
00005 //
00006 // Special Notes : 
00007 //
00008 // Creator       : Jason Kraftcheck
00009 //
00010 // Creation Date : 01/11/02
00011 //-------------------------------------------------------------------------
00012 
00013 #ifndef COMPOSITE_LOOP_HPP
00014 #define COMPOSITE_LOOP_HPP
00015 
00016 #include "LoopSM.hpp"
00017 #include "CompositeCoEdge.hpp"
00018 
00019 class CompositeSurface;
00020 
00021 class CompositeLoop : public LoopSM
00022 {
00023 friend class CompositeSurface;
00024 public:
00025 
00026   CompositeLoop();
00027   virtual ~CompositeLoop();
00028   
00029   CompositeSurface* get_surface() const;
00030   CompositeLoop* next_loop() const;
00031   
00032   CompositeCoEdge* first_coedge( ) const;
00033   CompositeCoEdge* next_coedge( CompositeCoEdge* after_this ) const;
00034   CompositeCoEdge* prev_coedge( CompositeCoEdge* before_this ) const;
00035   int num_coedges() const;
00036   
00037   CubitStatus insert_after( CompositeCoEdge* coedge, CompositeCoEdge* after );
00038   CubitStatus insert_before( CompositeCoEdge* coedge, CompositeCoEdge* before );
00039   CubitStatus remove( CompositeCoEdge* coedge );
00040   CubitStatus remove_all_coedges( DLIList<CompositeCoEdge*>* removed = 0);
00041   
00042   void get_parents_virt( DLIList<TopologyBridge*>& parents );
00043   void get_children_virt( DLIList<TopologyBridge*>& children );
00044   GeometryQueryEngine* get_geometry_query_engine() const;
00045   int layer() const { return COMPOSITE_LAYER; }
00046   
00047   virtual LoopType loop_type() ;
00048   virtual CubitBoolean is_external() ;
00049     //R CubitBoolean
00050     //R- CUBIT_TRUE/CUBIT_FALSE
00051     //- Returns CUBIT_TRUE if the Loop is an external Loop and CUBIT_FALSE
00052     //- otherwise.
00053 
00054   void append_simple_attribute_virt( const CubitSimpleAttrib& );
00055   void remove_simple_attribute_virt( const CubitSimpleAttrib& );
00056   void remove_all_simple_attribute_virt();
00057   CubitStatus get_simple_attribute( DLIList<CubitSimpleAttrib>& );
00058   CubitStatus get_simple_attribute( const CubitString& name,
00059                                     DLIList<CubitSimpleAttrib>& attrib_list );
00060 
00061   // reverse the direction of the loop
00062   // if b_reverse_coedges is true, the function will also reverse the coedges
00063   // but if b_reverse_coedges is false, the caller needs to make sure coedges
00064   // get reversed properly
00065   void reverse(bool b_reverse_coedges);
00066 
00067   void print_debug_info( const char* line_prefix = 0 );
00068 
00069 private:
00070 
00071   CompositeSurface* mySurface;
00072   CompositeCoEdge* myCoedge;
00073   CompositeLoop* loopNext;
00074   int numCoedges;
00075 };
00076 
00077 inline CompositeSurface* CompositeLoop::get_surface() const
00078   { return mySurface; }
00079 
00080 inline CompositeLoop* CompositeLoop::next_loop() const
00081   { return loopNext; }
00082 
00083 inline CompositeCoEdge* CompositeLoop::first_coedge( ) const
00084   { return myCoedge; }
00085 
00086 inline int CompositeLoop::num_coedges() const
00087   { return numCoedges; }
00088 
00089 inline CompositeCoEdge* CompositeLoop::next_coedge( CompositeCoEdge* prev ) const
00090   { return prev->myLoop == this ? prev->nextCoedge : 0; }
00091 
00092 inline CompositeCoEdge* CompositeLoop::prev_coedge( CompositeCoEdge* next ) const
00093   { return next->myLoop == this ? next->prevCoedge : 0; }
00094   
00095 
00096 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines