LCOV - code coverage report
Current view: top level - math - FGPropertyValue.cpp (source / functions) Hit Total Coverage
Test: JSBSim-Coverage-Statistics Lines: 6 11 54.5 %
Date: 2010-08-24 Functions: 5 8 62.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 4 75.0 %

           Branch data     Line data    Source code
       1                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       2                 :            : 
       3                 :            : Module: FGPropertyValue.cpp
       4                 :            : Author: Jon Berndt
       5                 :            : Date started: 12/10/2004
       6                 :            : Purpose: Stores property values
       7                 :            : 
       8                 :            :  ------------- Copyright (C) 2001  Jon S. Berndt (jon@jsbsim.org) -------------
       9                 :            : 
      10                 :            :  This program is free software; you can redistribute it and/or modify it under
      11                 :            :  the terms of the GNU Lesser General Public License as published by the Free Software
      12                 :            :  Foundation; either version 2 of the License, or (at your option) any later
      13                 :            :  version.
      14                 :            : 
      15                 :            :  This program is distributed in the hope that it will be useful, but WITHOUT
      16                 :            :  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      17                 :            :  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      18                 :            :  details.
      19                 :            : 
      20                 :            :  You should have received a copy of the GNU Lesser General Public License along with
      21                 :            :  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
      22                 :            :  Place - Suite 330, Boston, MA  02111-1307, USA.
      23                 :            : 
      24                 :            :  Further information about the GNU Lesser General Public License can also be found on
      25                 :            :  the world wide web at http://www.gnu.org.
      26                 :            : 
      27                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      28                 :            : INCLUDES
      29                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      30                 :            : 
      31                 :            : #include "FGPropertyValue.h"
      32                 :            : 
      33                 :            : namespace JSBSim {
      34                 :            : 
      35                 :            : static const char *IdSrc = "$Id: FGPropertyValue.cpp,v 1.6 2010/08/24 10:30:14 jberndt Exp $";
      36                 :            : static const char *IdHdr = ID_PROPERTYVALUE;
      37                 :            : 
      38                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      39                 :            : CLASS IMPLEMENTATION
      40                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      41                 :            : 
      42                 :         25 : FGPropertyValue::FGPropertyValue(FGPropertyManager* propNode) : PropertyManager(propNode)
      43                 :            : {
      44                 :         25 : }
      45                 :            : 
      46                 :            : //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      47                 :            : 
      48                 :          0 : FGPropertyValue::FGPropertyValue(std::string propName) : PropertyManager(0L)
      49                 :            : {
      50                 :          0 :   PropertyName = propName;
      51                 :          0 : }
      52                 :            : 
      53                 :            : //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      54                 :            : 
      55                 :    1728170 : double FGPropertyValue::GetValue(void) const
      56                 :            : {
      57                 :            :   double val;
      58                 :            :   try {
      59                 :    1728170 :     val = PropertyManager->getDoubleValue();
      60                 :          0 :   } catch (...) {
      61                 :          0 :     throw(PropertyName);
      62                 :            :   }
      63                 :            : 
      64                 :    1728170 :   return val;
      65                 :            : }
      66                 :            : 
      67 [ +  + ][ +  - ]:         12 : }

Generated by: LCOV version 1.9