LCOV - code coverage report
Current view: top level - src/mesquite/Wrappers - Wrapper.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 2 2 100.0 %
Date: 2020-07-18 00:09:26 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* *****************************************************************
       2                 :            :     MESQUITE -- The Mesh Quality Improvement Toolkit
       3                 :            : 
       4                 :            :     Copyright 2009 Sandia National Laboratories.  Developed at the
       5                 :            :     University of Wisconsin--Madison under SNL contract number
       6                 :            :     624796.  The U.S. Government and the University of Wisconsin
       7                 :            :     retain certain rights to this software.
       8                 :            : 
       9                 :            :     This library is free software; you can redistribute it and/or
      10                 :            :     modify it under the terms of the GNU Lesser General Public
      11                 :            :     License as published by the Free Software Foundation; either
      12                 :            :     version 2.1 of the License, or (at your option) any later version.
      13                 :            : 
      14                 :            :     This library is distributed in the hope that it will be useful,
      15                 :            :     but WITHOUT ANY WARRANTY; without even the implied warranty of
      16                 :            :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17                 :            :     Lesser General Public License for more details.
      18                 :            : 
      19                 :            :     You should have received a copy of the GNU Lesser General Public License
      20                 :            :     (lgpl.txt) along with this library; if not, write to the Free Software
      21                 :            :     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      22                 :            : 
      23                 :            :     (2009) [email protected]
      24                 :            : 
      25                 :            :   ***************************************************************** */
      26                 :            : 
      27                 :            : /** \file Wrapper.hpp
      28                 :            :  *  \brief Common interface implemented by wrappers.
      29                 :            :  *  \author Jason Kraftcheck
      30                 :            :  */
      31                 :            : 
      32                 :            : #ifndef MSQ_WRAPPER_HPP
      33                 :            : #define MSQ_WRAPPER_HPP
      34                 :            : 
      35                 :            : #include "Mesquite.hpp"
      36                 :            : #include "IQInterface.hpp"
      37                 :            : 
      38                 :            : namespace MBMesquite
      39                 :            : {
      40                 :            : 
      41                 :            : class QualityAssessor;
      42                 :            : 
      43                 :            : /**\brief Interface for wrappers.
      44                 :            :  *
      45                 :            :  * Interaface implemented by wrappers.  In addition to implementing
      46                 :            :  * IQInterface, also provide access to QualityAssessor instance so
      47                 :            :  * that caller can modify QA output.
      48                 :            :  */
      49                 :            : class MESQUITE_EXPORT Wrapper : public IQInterface
      50                 :            : {
      51                 :            :   public:
      52                 :            :     Wrapper();
      53                 :            : 
      54                 :            :     virtual ~Wrapper();
      55                 :            : 
      56                 :            :     /** Get the quality assessor associated with this wrapper */
      57                 :         17 :     inline QualityAssessor& quality_assessor()
      58                 :            :     {
      59                 :         17 :         return *qualAssessor;
      60                 :            :     }
      61                 :            : 
      62                 :            :     /** Get the quality assessor associated with this wrapper */
      63                 :            :     inline const QualityAssessor& quality_asssessor() const
      64                 :            :     {
      65                 :            :         return *qualAssessor;
      66                 :            :     }
      67                 :            : 
      68                 :            :   protected:
      69                 :            :     /** Function inherited from IQInterface that we implement here */
      70                 :            :     void run_common( MeshDomainAssoc* mesh_and_domain, ParallelMesh* pmesh, Settings* settings, MsqError& err );
      71                 :            : 
      72                 :            :     /** Function that each wrapper must implement */
      73                 :            :     virtual void run_wrapper( MeshDomainAssoc* mesh_and_domain, ParallelMesh* pmesh, Settings* settings,
      74                 :            :                               QualityAssessor* quality_assessor, MsqError& err ) = 0;
      75                 :            : 
      76                 :            :   private:
      77                 :            :     QualityAssessor* qualAssessor;
      78                 :            : };
      79                 :            : 
      80                 :            : }  // namespace MBMesquite
      81                 :            : 
      82                 :            : #endif

Generated by: LCOV version 1.11