LCOV - code coverage report
Current view: top level - util/cgm - ToolData.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 4 4 100.0 %
Date: 2020-06-30 00:58:45 Functions: 3 3 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : //- Class: ToolData
       2                 :            : //- Owner: Scott Mitchell
       3                 :            : //- Description: This is tool specific data that should chain off of CubitNode.
       4                 :            : //-              This is the generic form, all instances should be
       5                 :            : //-              more specific.
       6                 :            : //- Checked By: 
       7                 :            : //- Version: $Id: 
       8                 :            : 
       9                 :            : #ifndef TOOL_DATA_HPP
      10                 :            : #define TOOL_DATA_HPP
      11                 :            : 
      12                 :            : #include "CubitDefines.h"
      13                 :            : #include "CGMUtilConfigure.h"
      14                 :            : #include <cassert>
      15                 :            : 
      16                 :            : class ToolDataUser;
      17                 :            : 
      18                 :            : class CUBIT_UTIL_EXPORT ToolData
      19                 :            : {
      20                 :            :   private:
      21                 :            : 
      22                 :            :     ToolData *nextToolData;
      23                 :            :     //- next tool_data in the chain. Last one has this member NULL.
      24                 :            : 
      25                 :            :   protected:
      26                 :            : 
      27                 :       6966 :     ToolData() {nextToolData = NULL;}
      28                 :            :     //- protected constructor to eliminate creation by other than
      29                 :            :     //- derived classes
      30                 :            : 
      31                 :            :   public:
      32                 :            : 
      33                 :            :     virtual ~ToolData();
      34                 :            :     //- destructor
      35                 :            :  
      36                 :      48472 :     ToolData* next_tool_data()               { return nextToolData; }
      37         [ -  + ]:      24818 :     void      next_tool_data(ToolData *data) { assert( data != this );
      38                 :      12409 :     nextToolData = data; }
      39                 :            :     //- access to next tooldata in chain
      40                 :            :   
      41                 :            :     // handy for ToolDataUser::delete_TD, see e.g. DoubletPillower.cc
      42                 :            : 
      43                 :            :         
      44                 :            :     virtual ToolData* propogate(ToolDataUser* new_td_user);
      45                 :            :     //- propogate() receives the ToolData User that has been copied or split off from the 
      46                 :            :     //- ToolDataUser this TD is on and returns the ToolData that should be put on the new 
      47                 :            :     //- ToolDataUser.  If no new TD should be created, it returns NULL.
      48                 :            : 
      49                 :            :     virtual ToolData* merge(ToolDataUser* other_td_user);
      50                 :            :     //- merge() receives a ToolDataUser that is about to be merged with the ToolDataUser that this
      51                 :            :     //- TD is on.  It should process what should happen to this and any similar tooldata on the
      52                 :            :     //- other ToolDataUser and return the TD that should be assigned to the merged entity.
      53                 :            :     //- Note: ToolDataUser deletes any TD that is on it when itself is deleted.  The calling function
      54                 :            :     //- should probably remove any TD returned by this function from the entities before deleting them.
      55                 :            :   
      56                 :            : };
      57                 :            : // ********** BEGIN INLINE FUNCTIONS       **********
      58                 :            : 
      59                 :            : // ********** END INLINE FUNCTIONS       **********
      60                 :            : 
      61                 :            : 
      62                 :            : #endif // TOOL_DATA_HPP
      63                 :            : 
      64                 :            : 
      65                 :            : 
      66                 :            : 
      67                 :            : 
      68                 :            : 
      69                 :            : 
      70                 :            : 

Generated by: LCOV version 1.11