cgma
SenseEntity Class Reference

#include <SenseEntity.hpp>

Inheritance diagram for SenseEntity:
TopologyEntity CubitObservable CoEdge CoFace CoVertex CoVolume

List of all members.

Public Member Functions

 SenseEntity ()
virtual ~SenseEntity ()
BasicTopologyEntityget_basic_topology_entity_ptr ()
GroupingEntityget_grouping_entity_ptr ()
BasicTopologyEntityget_parent_basic_topology_entity_ptr ()
CubitStatus attach_basic_topology_entity (BasicTopologyEntity *basicTopologyEntityPtr)
CubitStatus switch_basic_topology_entity (BasicTopologyEntity *new_bte)
void set_sense (CubitSense sense)
void reverse_sense ()
CubitSense get_sense () const
SenseEntitynext ()
SenseEntityprevious ()
SenseEntitynext_on_bte ()
virtual int get_parents (DLIList< TopologyEntity * > *list=0) const
virtual int get_children (DLIList< TopologyEntity * > *list=0) const

Protected Member Functions

virtual CubitBoolean query_append_parents (DLIList< TopologyEntity * > &list)
virtual CubitBoolean query_append_children (DLIList< TopologyEntity * > &list)
virtual CubitStatus remove_child_link (TopologyEntity *)
CubitStatus disconnect_all_children (DLIList< TopologyEntity * > *children=0)
CubitStatus disconnect_all_parents (DLIList< TopologyEntity * > *parents=0)

Private Member Functions

CubitStatus gpe_insert_after (SenseEntity *prev_ptr)
CubitStatus gpe_insert_before (SenseEntity *next_ptr)
CubitStatus gpe_remove ()
CubitStatus set_grouping_entity_ptr (GroupingEntity *gpe_ptr)
void swap_gpe_list_ptrs ()
SenseEntityset_bte_next (SenseEntity *next_ptr)
CubitStatus set_basic_topology_entity_ptr (BasicTopologyEntity *bte_ptr)
 SenseEntity (const SenseEntity &)
void operator= (const SenseEntity &)

Private Attributes

CubitSense mySense
GroupingEntitymyParent
SenseEntitynextInParent
SenseEntityprevInParent
BasicTopologyEntitymyChild
SenseEntitynextInChild

Friends

class GroupingEntity
class BasicTopologyEntity

Detailed Description

Definition at line 38 of file SenseEntity.hpp.


Constructor & Destructor Documentation

Definition at line 153 of file SenseEntity.hpp.

Definition at line 56 of file SenseEntity.cpp.

SenseEntity::SenseEntity ( const SenseEntity ) [private]

Member Function Documentation

Definition at line 75 of file SenseEntity.cpp.

{
  return basic_topology_entity_ptr->add_sense_entity( this );
}
CubitStatus SenseEntity::disconnect_all_children ( DLIList< TopologyEntity * > *  children = 0) [protected, virtual]

Implements TopologyEntity.

Definition at line 233 of file SenseEntity.cpp.

{
  if (!myChild)
    return CUBIT_SUCCESS;
  
  if (list)
    list->append(myChild);
  
  return myChild->remove_sense_entity(this);
}
CubitStatus SenseEntity::disconnect_all_parents ( DLIList< TopologyEntity * > *  parents = 0) [protected, virtual]

Implements TopologyEntity.

Definition at line 213 of file SenseEntity.cpp.

{
  if (!myParent)
    return CUBIT_SUCCESS;
  
  if (list)
    list->append(myParent);
  
  return myParent->remove_sense_entity(this);
}

Definition at line 162 of file SenseEntity.hpp.

  { return myChild; }
int SenseEntity::get_children ( DLIList< TopologyEntity * > *  list = 0) const [virtual]

Implements TopologyEntity.

Definition at line 161 of file SenseEntity.cpp.

{
  if (!myChild)
    return 0;
  
  if (list)
    list->append(myChild);
  
  return 1;
}

Definition at line 165 of file SenseEntity.hpp.

  { return myParent; }
int SenseEntity::get_parents ( DLIList< TopologyEntity * > *  list = 0) const [virtual]

Implements TopologyEntity.

Definition at line 141 of file SenseEntity.cpp.

{
  if (!myParent)
    return 0;
  
  if (list)
    list->append(myParent);
  
  return 1;
}
CubitSense SenseEntity::get_sense ( ) const [inline]

Definition at line 171 of file SenseEntity.hpp.

  { return mySense; }
CubitStatus SenseEntity::gpe_insert_after ( SenseEntity prev_ptr) [inline, private]

Definition at line 183 of file SenseEntity.hpp.

{
  nextInParent = prev_ptr->nextInParent;
  if (nextInParent)
    nextInParent->prevInParent = this;
  prevInParent = prev_ptr;
  prev_ptr->nextInParent = this;
  return CUBIT_SUCCESS;
}  
CubitStatus SenseEntity::gpe_insert_before ( SenseEntity next_ptr) [inline, private]

Definition at line 193 of file SenseEntity.hpp.

{
  prevInParent = next_ptr->prevInParent;
  if (prevInParent)
    prevInParent->nextInParent = this;
  nextInParent = next_ptr;
  next_ptr->prevInParent = this;
  return CUBIT_SUCCESS;
}  

Definition at line 174 of file SenseEntity.hpp.

  { return nextInParent; }

Definition at line 180 of file SenseEntity.hpp.

  { return nextInChild; }
void SenseEntity::operator= ( const SenseEntity ) [private]

Definition at line 177 of file SenseEntity.hpp.

  { return prevInParent; }

Implements TopologyEntity.

Definition at line 263 of file SenseEntity.cpp.

{
  if (myChild && !ModelQueryEngine::instance()->encountered(myChild))
  {
    list.append(myChild);
    return CUBIT_TRUE;
  }
  
  return CUBIT_FALSE;
}

Implements TopologyEntity.

Definition at line 253 of file SenseEntity.cpp.

{
  if (myParent && !ModelQueryEngine::instance()->encountered(myParent))
  {
    list.append(myParent);
    return CUBIT_TRUE;
  }
  
  return CUBIT_FALSE;
}
CubitStatus SenseEntity::remove_child_link ( TopologyEntity entity_ptr) [protected, virtual]

Implements TopologyEntity.

Definition at line 181 of file SenseEntity.cpp.

{
  if (entity_ptr != myChild)
    return CUBIT_FAILURE;
  
  BasicTopologyEntity* bte_ptr = static_cast<BasicTopologyEntity*>(entity_ptr);
  return bte_ptr->remove_sense_entity(this);
}

Definition at line 118 of file SenseEntity.cpp.

{ 
  switch (mySense)
  {
    case CUBIT_FORWARD : mySense = CUBIT_REVERSED; break;
    case CUBIT_REVERSED: mySense = CUBIT_FORWARD ; break;
    default            : mySense = CUBIT_UNKNOWN ; break;
  }
}

Definition at line 233 of file SenseEntity.hpp.

{
  if (myChild && bte_ptr) 
    { assert(0); return CUBIT_FAILURE; }
    
  myChild = bte_ptr;
  return CUBIT_SUCCESS;
}
SenseEntity * SenseEntity::set_bte_next ( SenseEntity next_ptr) [inline, private]

Definition at line 226 of file SenseEntity.hpp.

{
  SenseEntity* old_val = nextInChild;
  nextInChild = next_ptr;
  return old_val;
}

Definition at line 220 of file SenseEntity.hpp.

{
  myParent = gpe_ptr;
  return CUBIT_SUCCESS;
}
void SenseEntity::set_sense ( CubitSense  sense) [inline]

Definition at line 168 of file SenseEntity.hpp.

  { mySense = sense; }
void SenseEntity::swap_gpe_list_ptrs ( ) [inline, private]

Definition at line 213 of file SenseEntity.hpp.

Definition at line 92 of file SenseEntity.cpp.

{
  if (new_bte->dag_type().parent() != dag_type())
    return CUBIT_FAILURE;
  
  if (!myChild->remove_sense_entity(this))
    return CUBIT_FAILURE;
    
  if (!new_bte->add_sense_entity(this))
    return CUBIT_FAILURE; 
    
  return CUBIT_SUCCESS;
}

Friends And Related Function Documentation

friend class BasicTopologyEntity [friend]

Definition at line 135 of file SenseEntity.hpp.

friend class GroupingEntity [friend]

Definition at line 127 of file SenseEntity.hpp.


Member Data Documentation

Definition at line 145 of file SenseEntity.hpp.

Definition at line 141 of file SenseEntity.hpp.

Definition at line 139 of file SenseEntity.hpp.

Definition at line 146 of file SenseEntity.hpp.

Definition at line 142 of file SenseEntity.hpp.

Definition at line 143 of file SenseEntity.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines