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 "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 Reflex::Type &iChild, const std::string &iParentTypeName, unsigned int &distance)
 

Function Documentation

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

Definition at line 75 of file FWSimpleRepresentationChecker.cc.

Referenced by FWSimpleRepresentationChecker::infoFor().

77  {
78  if(iChild.TypeInfo().name() == iParentTypeName) {
79  return true;
80  }
81  if(iChild.BaseSize() == 0) {
82  return false;
83  }
84  ++distance;
85  for(Reflex::Base_Iterator it = iChild.Base_Begin(),
86  itEnd = iChild.Base_End();
87  it != itEnd;
88  ++it) {
89  if(inheritsFrom(it->ToType(),iParentTypeName,distance)) {
90  return true;
91  }
92  }
93  --distance;
94  return false;
95 }
static bool inheritsFrom(const Reflex::Type &iChild, const std::string &iParentTypeName, unsigned int &distance)