#include <Fireworks/Core/interface/FWSimpleRepresentationChecker.h>
Public Member Functions | |
FWSimpleRepresentationChecker (const std::string &iTypeidName, const std::string &iPurpose, unsigned int iBitPackedViews, bool iRepresentsSubPart) | |
virtual FWRepresentationInfo | infoFor (const std::string &iTypeName) const |
virtual | ~FWSimpleRepresentationChecker () |
Private Member Functions | |
FWSimpleRepresentationChecker (const FWSimpleRepresentationChecker &) | |
const FWSimpleRepresentationChecker & | operator= (const FWSimpleRepresentationChecker &) |
Private Attributes | |
const std::string | m_typeidName |
Description: Used to check to see if a Simple proxy builder could be used to represent a particular type
Usage: <usage>
Definition at line 30 of file FWSimpleRepresentationChecker.h.
FWSimpleRepresentationChecker::FWSimpleRepresentationChecker | ( | const std::string & | iTypeidName, |
const std::string & | iPurpose, | ||
unsigned int | iBitPackedViews, | ||
bool | iRepresentsSubPart | ||
) |
Definition at line 38 of file FWSimpleRepresentationChecker.cc.
: FWRepresentationCheckerBase(iPurpose,iBitPackedViews,iRepresentsSubPart), m_typeidName(iTypeName) { }
FWSimpleRepresentationChecker::~FWSimpleRepresentationChecker | ( | ) | [virtual] |
Definition at line 52 of file FWSimpleRepresentationChecker.cc.
{ }
FWSimpleRepresentationChecker::FWSimpleRepresentationChecker | ( | const FWSimpleRepresentationChecker & | ) | [private] |
FWRepresentationInfo FWSimpleRepresentationChecker::infoFor | ( | const std::string & | iTypeName | ) | const [virtual] |
Implements FWRepresentationCheckerBase.
Definition at line 98 of file FWSimpleRepresentationChecker.cc.
References FWItemAccessorFactory::accessorFor(), FWRepresentationCheckerBase::bitPackedViews(), inheritsFrom(), m_typeidName, FWRepresentationCheckerBase::purpose(), and FWRepresentationCheckerBase::representsSubPart().
Referenced by FWDetailViewManager::findViewersFor().
{ unsigned int distance=1; FWItemAccessorFactory factory; //std::cout<<"checker infoFor"<<iTypeName<<std::endl; TClass* clss = TClass::GetClass(iTypeName.c_str()); //Class could be unknown if the dictionary for it has not been loaded if(0==clss || 0==clss->GetTypeInfo()) { return FWRepresentationInfo(); } boost::shared_ptr<FWItemAccessorBase> accessor = factory.accessorFor(clss); const TClass* modelClass = accessor->modelType(); //std::cout <<" "<<modelClass->GetName()<<" "<< bool(modelClass == clss)<< std::endl; if(0==modelClass || 0 == modelClass->GetTypeInfo()) { //some containers e.g. vector<int> do not have known TClasses for their elements // or the contained type may be unknown to ROOT return FWRepresentationInfo(); } Reflex::Type modelType = Reflex::Type::ByTypeInfo( *(modelClass->GetTypeInfo())); //see if the modelType inherits from our type if(inheritsFrom(modelType,m_typeidName,distance) ) { return FWRepresentationInfo(purpose(),distance,bitPackedViews(), representsSubPart()); } return FWRepresentationInfo(); }
const FWSimpleRepresentationChecker& FWSimpleRepresentationChecker::operator= | ( | const FWSimpleRepresentationChecker & | ) | [private] |
const std::string FWSimpleRepresentationChecker::m_typeidName [private] |
Definition at line 52 of file FWSimpleRepresentationChecker.h.
Referenced by infoFor().