CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
FWSimpleRepresentationChecker.cc File Reference
#include <iostream>
#include "TClass.h"
#include "FWCore/Utilities/interface/BaseWithDict.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 edm::TypeWithDict &iChild, const std::string &iParentTypeName, unsigned int &distance)
 

Function Documentation

static bool inheritsFrom ( const edm::TypeWithDict iChild,
const std::string &  iParentTypeName,
unsigned int &  distance 
)
static

Definition at line 75 of file FWSimpleRepresentationChecker.cc.

References newFWLiteAna::base, edm::TypeBases::size(), and edm::TypeWithDict::typeInfo().

Referenced by FWSimpleRepresentationChecker::infoFor().

77  {
78  if(iChild.typeInfo().name() == iParentTypeName) {
79  return true;
80  }
81  edm::TypeBases bases(iChild);
82  if(bases.size() == 0) {
83  return false;
84  }
85  ++distance;
86  for(auto const& base : bases) {
87  if(inheritsFrom(edm::BaseWithDict(base).typeOf(),iParentTypeName,distance)) {
88  return true;
89  }
90  }
91  --distance;
92  return false;
93 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
static bool inheritsFrom(const edm::TypeWithDict &iChild, const std::string &iParentTypeName, unsigned int &distance)
std::type_info const & typeInfo() const