LCOV - code coverage report
Current view: top level - algs/AdvFront - AF2RuleNewVertex.cpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 10 21 47.6 %
Date: 2020-07-01 15:24:36 Functions: 3 5 60.0 %
Branches: 1 4 25.0 %

           Branch data     Line data    Source code
       1                 :            : #include "meshkit/AF2RuleNewVertex.hpp"
       2                 :            : 
       3                 :       2148 : AF2RuleNewVertex::AF2RuleNewVertex(AF2Point2D const & rfrncPoint,
       4                 :       2148 :         const AF2PointTransform* const & pntTrnsfrm)
       5                 :            : {
       6                 :       2148 :   referencePoint = rfrncPoint;
       7                 :       2148 :   pointTransform = pntTrnsfrm->clone();
       8                 :       2148 : }
       9                 :            : 
      10                 :       2148 : AF2RuleNewVertex::~AF2RuleNewVertex()
      11                 :            : {
      12         [ +  - ]:       2148 :   delete pointTransform;
      13                 :       2148 : }
      14                 :            : 
      15                 :          0 : AF2RuleNewVertex::AF2RuleNewVertex(const AF2RuleNewVertex & toCopy)
      16                 :            : {
      17                 :          0 :   referencePoint = toCopy.referencePoint;
      18                 :          0 :   pointTransform = toCopy.pointTransform->clone();
      19                 :          0 : }
      20                 :            : 
      21                 :          0 : AF2RuleNewVertex& AF2RuleNewVertex::operator=(
      22                 :            :     const AF2RuleNewVertex & rhs)
      23                 :            : {
      24                 :            :   // directly copy members that are not using a pointer
      25                 :          0 :   referencePoint = rhs.referencePoint;
      26                 :            : 
      27                 :            :   // copy constructor functionality,
      28                 :            :   // but to other parts of memory, not yet to this
      29                 :            :   AF2PointTransform* otherPointTransform;
      30                 :          0 :   otherPointTransform = rhs.pointTransform->clone();
      31                 :            : 
      32                 :            :   // destructor functionality
      33         [ #  # ]:          0 :   delete pointTransform;
      34                 :            : 
      35                 :            :   // transfer ownership from other parts of memory to this object
      36                 :          0 :   pointTransform = otherPointTransform;
      37                 :          0 :   otherPointTransform = NULL; // not necessary, but to be explicit
      38                 :            : 
      39                 :            :   // return this
      40                 :          0 :   return *this;
      41                 :            : }
      42                 :            : 
      43                 :      56606 : AF2Point2D AF2RuleNewVertex::getLocation(
      44                 :            :     AF2Binding const & vertexBinding) const
      45                 :            : {
      46                 :      56606 :   return pointTransform->transformPoint(referencePoint, vertexBinding);
      47                 :            : }

Generated by: LCOV version 1.11