cgma
ToolDataUser Class Reference

#include <ToolDataUser.hpp>

Inheritance diagram for ToolDataUser:
CoEdge FacetEntity GeoNode GeoTet RefEntity CubitFacet CubitFacetEdge CubitPoint CubitQuadFacet BasicTopologyEntity Body RefCollection CubitFacetData FaceterFacetData CubitFacetEdgeData CubitPointData FaceterPointData ImprintPointData CubitQuadFacetData RefEdge RefFace RefVertex RefVolume RefGroup

List of all members.

Public Member Functions

 ToolDataUser ()
virtual ~ToolDataUser ()
virtual CubitBoolean delete_TD (IdentityFn specified_type)
virtual CubitBoolean delete_TD (ToolData *td)
virtual ToolDataremove_TD (IdentityFn specified_type)
virtual ToolDataremove_TD (ToolData *td)
virtual void add_TD (ToolData *new_td)
virtual ToolDataget_TD (IdentityFn specified_type)
virtual ToolData const * get_TD (IdentityFn specified_type) const
virtual void get_all_TDs (IdentityFn specified_type, DLIList< ToolData * > *all_tds) const
virtual void get_all_TDs (DLIList< ToolData * > *all_tds) const

Private Member Functions

 ToolDataUser (const ToolDataUser &)
void operator= (const ToolDataUser &)
void tool_data (ToolData *set_data)
ToolDatatool_data () const

Private Attributes

ToolDatatoolData

Detailed Description

Definition at line 20 of file ToolDataUser.hpp.


Constructor & Destructor Documentation

ToolDataUser::ToolDataUser ( const ToolDataUser ) [private]

Definition at line 37 of file ToolDataUser.hpp.

{ toolData = NULL; }

Definition at line 119 of file ToolDataUser.cpp.

{
  //delete all ToolData's chained off this user.
  ToolData *td = tool_data();
  while ( td ) {
    ToolData *next = td->next_tool_data();
    delete td;
    td = next;
  }

    // set the first TD to NULL
  tool_data(NULL);
}

Member Function Documentation

void ToolDataUser::add_TD ( ToolData new_td) [virtual]

Definition at line 68 of file ToolDataUser.cpp.

{
  assert( new_td != NULL );
  new_td->next_tool_data( toolData );
  toolData = new_td;
}
CubitBoolean ToolDataUser::delete_TD ( IdentityFn  specified_type) [virtual]

Definition at line 46 of file ToolDataUser.cpp.

{
  ToolData *td = remove_TD( specified_type );
  if (td)
  {
    delete td;
    return CUBIT_TRUE;
  }
  return CUBIT_FALSE;
}

Definition at line 57 of file ToolDataUser.cpp.

{
  ToolData *td = remove_TD( td_remove );
  if (td)
  {
    delete td;
    return CUBIT_TRUE;
  }
  return CUBIT_FALSE;
}
void ToolDataUser::get_all_TDs ( IdentityFn  specified_type,
DLIList< ToolData * > *  all_tds 
) const [virtual]

Definition at line 97 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  while (td) 
  {
    if ( (*specified_type)(td) ) 
      all_tds->append(td);
    td = td->next_tool_data();
  }  
}
void ToolDataUser::get_all_TDs ( DLIList< ToolData * > *  all_tds) const [virtual]

Definition at line 109 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  while (td) 
  {
    all_tds->append(td);
    td = td->next_tool_data();
  }  
}
ToolData * ToolDataUser::get_TD ( IdentityFn  specified_type) [virtual]

Definition at line 75 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  while (td) {
    if ( (*specified_type)(td) ) 
      return td;
    td = td->next_tool_data();
  }
  return NULL;
}
ToolData const * ToolDataUser::get_TD ( IdentityFn  specified_type) const [virtual]

Definition at line 86 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  while (td) {
    if ( (*specified_type)(td) ) 
      return td;
    td = td->next_tool_data();
  }
  return NULL;
}
void ToolDataUser::operator= ( const ToolDataUser ) [private]
ToolData * ToolDataUser::remove_TD ( IdentityFn  specified_type) [virtual]

Definition at line 8 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  ToolData *td_prev = NULL;
  while (td) {
    if ( (*specified_type)(td) ) {
      if (td_prev)
        td_prev->next_tool_data( td->next_tool_data() );
      else
        toolData = td->next_tool_data();
      td->next_tool_data( NULL );
      return td;
    }
    td_prev = td;
    td = td->next_tool_data();
  }
  return NULL;
}
ToolData * ToolDataUser::remove_TD ( ToolData td) [virtual]

Definition at line 27 of file ToolDataUser.cpp.

{
  ToolData *td = tool_data();
  ToolData *td_prev = NULL;
  while (td) {
    if ( td_remove == td ) {
      if (td_prev)
        td_prev->next_tool_data( td->next_tool_data() );
      else
        toolData = td->next_tool_data();
      td->next_tool_data( NULL );
      return td;
    }
    td_prev = td;
    td = td->next_tool_data();
  }
  return NULL;
}
void ToolDataUser::tool_data ( ToolData set_data) [inline, private]

Definition at line 31 of file ToolDataUser.hpp.

{toolData = set_data;}
ToolData* ToolDataUser::tool_data ( ) const [inline, private]

Definition at line 32 of file ToolDataUser.hpp.

{return toolData;}

Member Data Documentation

Definition at line 27 of file ToolDataUser.hpp.


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