LTP GCOV extension - code coverage report
Current view: directory - src/cpp/prod/lib - skelinfo.cpp
Test: YAORB-0.2.info
Date: 2006-02-27 Instrumented lines: 17
Code covered: 23.5 % Executed lines: 4

       1                 : //==============================================================================
       2                 : // File <$/src/cpp/prod/lib/skelinfo.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                 : // Portability
      23                 : #include "yaorb/config.h"
      24                 : #include "src/cpp/prod/port/port_stdc.h"
      25                 : 
      26                 : #include <yaorb/CORBA.h>
      27                 : #include <yaorb/YAORB.h>
      28                 : 
      29                 : #include "src/cpp/prod/tool/DEVELOPMENT.h"
      30                 : #include "src/cpp/prod/tool/Assert.h"
      31                 : 
      32                 : YAORB::SkelInfo::SkelInfo(
      33                 :    const ClassInfo* classInfo,
      34                 :    const LocalOp * localOpList,
      35              23 :    const SkelInfo ** parentSkelList)
      36                 :  : _classInfo(classInfo),
      37                 :    _localOpList(localOpList),
      38              23 :    _parentSkelList(parentSkelList)
      39                 : {
      40              23 :    SkelMgr::RegisterSkelInfo(this) ;
      41                 : }
      42                 : 
      43               0 : YAORB::SkelInfo::~SkelInfo()
      44                 : {
      45               0 :    NON_DEV("YAORB::SkelInfo::~SkelInfo") ;
      46               0 : }
      47                 : 
      48                 : const YAORB::ClassInfo*
      49              16 : YAORB::SkelInfo::GetClassInfo(void) const
      50                 : {
      51                 :    return _classInfo ;
      52                 : }
      53                 : 
      54                 : const YAORB::SkelInfo::LocalOp *
      55                 : YAORB::SkelInfo::findOperation(
      56               0 :    const char* opName) const
      57                 : {
      58                 :    const LocalOp * op = NULL ;
      59                 :    const LocalOp * current = NULL ;
      60                 :    const SkelInfo * parent = NULL ;
      61                 :    const SkelInfo ** currentParent = NULL ;
      62                 : 
      63                 :    // Search the list of local operations
      64                 : 
      65               0 :    current = _localOpList ;
      66                 : 
      67               0 :    if (current != NULL)
      68                 :    {
      69               0 :       while (current->_name != NULL)
      70                 :       {
      71               0 :          if (strcmp(current->_name, opName) == 0)
      72                 :          {
      73                 :             return current ;
      74                 :          }
      75                 : 
      76               0 :          current ++ ;
      77                 :       }
      78                 :    }
      79                 : 
      80                 :    // Search the list of inherited classes
      81                 : 
      82               0 :    currentParent = _parentSkelList ;
      83                 : 
      84               0 :    if (currentParent != NULL)
      85                 :    {
      86                 :       parent = * currentParent ;
      87                 : 
      88               0 :       op = parent->findOperation(opName) ;
      89                 : 
      90               0 :       if (op != NULL)
      91                 :       {
      92                 :          return op ;
      93                 :       }
      94                 : 
      95                 :       currentParent ++ ;
      96                 :    }
      97                 : 
      98                 :    return NULL ;
      99                 : }
     100                 : 

Generated by: LTP GCOV extension version 1.4