cgma
TDChordal Class Reference

#include <TDChordal.hpp>

Inheritance diagram for TDChordal:
ToolData

List of all members.

Public Member Functions

 TDChordal ()
virtual ~TDChordal ()
CubitStatus flag_boundary_edge (int index)
void set_tritype (TriType new_type)
TriType get_tritype ()
CubitStatus determine_tritype ()
void get_non_boundary_edges (DLIList< int > &edge_index)
void mark_visited ()
void unmark_visited ()
bool get_visited ()

Static Public Member Functions

static int is_chordal (const ToolData *td)

Private Attributes

bool boundaryEdge [3]
TriType triGenre
int numOfBoundaryEdges
bool visited

Detailed Description

Definition at line 21 of file TDChordal.hpp.


Constructor & Destructor Documentation

Definition at line 11 of file TDChordal.cpp.

                    {
  int ii;
  for (ii = 0; ii < 3; ii++){
    boundaryEdge[ii] = false;
  }
  triGenre = UNDEFINED;
  numOfBoundaryEdges = 0;
  visited = FALSE;

}
TDChordal::~TDChordal ( ) [virtual]

Definition at line 22 of file TDChordal.cpp.

                     {

}

Member Function Documentation

Definition at line 27 of file TDChordal.cpp.

                                        {
  
  switch(numOfBoundaryEdges){
  case 0: 
    triGenre = JUNCTION;
    break;
  case 1:
    triGenre = SLEEVE;
    break;
  case 2:
    triGenre = TERMINATED;
    break;
  case 3:
    triGenre = DISCARDED;
    break;
  default:
    return CUBIT_FAILURE;
    break;
  }
  
  return CUBIT_SUCCESS;

}
CubitStatus TDChordal::flag_boundary_edge ( int  index) [inline]

Definition at line 60 of file TDChordal.hpp.

                                                         { 
  assert(index >=0 && index < 3);
  
  //should only be flag once.
  if(boundaryEdge[index])
    return CUBIT_FAILURE;
  
  boundaryEdge[index] = true;
  numOfBoundaryEdges++;
  
  return CUBIT_SUCCESS;
}
void TDChordal::get_non_boundary_edges ( DLIList< int > &  edge_index)

Definition at line 51 of file TDChordal.cpp.

                                                               {
  int ii = 0;
  for(ii = 0; ii<3; ii++){
    if(!boundaryEdge[ii]){
      edge_index.append(ii);
    }
  }

}

Definition at line 44 of file TDChordal.hpp.

{ return triGenre; }
bool TDChordal::get_visited ( ) [inline]

Definition at line 54 of file TDChordal.hpp.

{ return visited; }
static int TDChordal::is_chordal ( const ToolData td) [inline, static]

Definition at line 37 of file TDChordal.hpp.

  { return ((dynamic_cast<const TDChordal*> (td)) != NULL); }
void TDChordal::mark_visited ( ) [inline]

Definition at line 50 of file TDChordal.hpp.

{ visited = TRUE; }
void TDChordal::set_tritype ( TriType  new_type) [inline]

Definition at line 42 of file TDChordal.hpp.

{ triGenre = new_type; }
void TDChordal::unmark_visited ( ) [inline]

Definition at line 52 of file TDChordal.hpp.

{ visited = FALSE; }

Member Data Documentation

bool TDChordal::boundaryEdge[3] [private]

Definition at line 25 of file TDChordal.hpp.

Definition at line 28 of file TDChordal.hpp.

Definition at line 27 of file TDChordal.hpp.

bool TDChordal::visited [private]

Definition at line 29 of file TDChordal.hpp.


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