LTP GCOV extension - code coverage report
Current view: directory - src/cpp/dev/idlc - string_value.cpp
Test: YAORB-0.2.info
Date: 2006-02-27 Instrumented lines: 23
Code covered: 78.3 % Executed lines: 18

       1                 : //==============================================================================
       2                 : // File <$/src/cpp/dev/idlc/string_value.cpp>
       3                 : // This file is part of YaOrb : Yet Another Object Request Broker,
       4                 : // Copyright (c) 2000-2003, Marc Alff.
       5                 : //
       6                 : // This program is free software; you can redistribute it and/or
       7                 : // modify it under the terms of the GNU General Public License
       8                 : // as published by the Free Software Foundation; either version 2
       9                 : // of the License, or (at your option) any later version.
      10                 : //
      11                 : // This program is distributed in the hope that it will be useful,
      12                 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 : // GNU General Public License for more details.
      15                 : //
      16                 : // You should have received a copy of the GNU General Public License
      17                 : // along with this program; if not, write to the Free Software
      18                 : // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
      19                 : //
      20                 : //==============================================================================
      21                 : 
      22                 : #include <stdio.h>
      23                 : 
      24                 : #include "src/cpp/prod/tool/DEVELOPMENT.h"
      25                 : #include "src/cpp/prod/tool/Assert.h"
      26                 : #include "src/cpp/prod/tool/String.h"
      27                 : 
      28                 : #include "src/cpp/dev/idlc/string_value.h"
      29                 : #include "src/cpp/dev/idlc/yyutils.h"
      30                 : 
      31              48 : static IDLStringType global_type ;
      32                 : 
      33               0 : IDLType* IDLStringValue::GetValueType(void) const
      34                 : {
      35                 :    return & global_type ;
      36                 : }
      37                 : 
      38               4 : IDLStringValue::IDLStringValue(const String& s)
      39               4 : : IDLValue(idl_string), _value(s)
      40               0 : {}
      41                 : 
      42               4 : IDLStringValue::IDLStringValue(const IDLStringValue& v)
      43               4 : : IDLValue(v), _value(v._value)
      44               0 : {}
      45                 : 
      46               8 : IDLStringValue::~IDLStringValue()
      47               8 : {}
      48                 : 
      49               0 : const String& IDLStringValue::GetString(void)
      50                 : {
      51                 :    return _value ;
      52                 : }
      53                 : 
      54               4 : IDLValue* IDLStringValue::copy(void)
      55                 : {
      56               4 :    return new IDLStringValue(*this) ;
      57                 : }
      58                 : 
      59               7 : void IDLStringValue::print(std::ostream &str) const
      60                 : {
      61               7 :    if (IsError())
      62                 :    {
      63               3 :       str << "idl string <error>" ;
      64                 :    }
      65                 :    else
      66                 :    {
      67               4 :       str << "idl string \"" << _value << "\"" ;
      68                 :    }
      69                 : }
      70                 : 
      71               4 : void IDLStringValue::convert(IDLType *type)
      72                 : {
      73               4 :    if (type->isA() != idl_string)
      74                 :    {
      75               4 :       typeConvertionError(type) ;
      76                 :    }
      77              48 : }
      78              48 : 

Generated by: LTP GCOV extension version 1.4