CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Fireworks/Core/src/FWSimpleRepresentationChecker.cc File Reference

#include <iostream>
#include "TClass.h"
#include "Reflex/Base.h"
#include "Fireworks/Core/interface/FWSimpleRepresentationChecker.h"
#include "Fireworks/Core/interface/FWRepresentationInfo.h"
#include "Fireworks/Core/interface/FWItemAccessorFactory.h"
#include "Fireworks/Core/interface/FWItemAccessorBase.h"

Go to the source code of this file.

Functions

static bool inheritsFrom (const ROOT::Reflex::Type &iChild, const std::string &iParentTypeName, unsigned int &distance)

Function Documentation

static bool inheritsFrom ( const ROOT::Reflex::Type &  iChild,
const std::string &  iParentTypeName,
unsigned int &  distance 
) [static]

Definition at line 75 of file FWSimpleRepresentationChecker.cc.

Referenced by FWSimpleRepresentationChecker::infoFor().

                                                 {
   if(iChild.TypeInfo().name() == iParentTypeName) {
      return true;
   }
   if(iChild.BaseSize() == 0) {
      return false;
   }
   ++distance;
   for(ROOT::Reflex::Base_Iterator it = iChild.Base_Begin(),
                                   itEnd = iChild.Base_End();
       it != itEnd;
       ++it) {
      if(inheritsFrom(it->ToType(),iParentTypeName,distance)) {
         return true;
      }
   }
   --distance;
   return false;
}