CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Fireworks/Core/src/FWEDProductRepresentationChecker.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Core
00004 // Class  :     FWEDProductRepresentationChecker
00005 //
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Tue Nov 11 15:20:10 EST 2008
00011 // $Id: FWEDProductRepresentationChecker.cc,v 1.5 2010/06/02 22:55:42 chrjones Exp $
00012 //
00013 
00014 // system include files
00015 #include "TClass.h"
00016 
00017 // user include files
00018 #include "Fireworks/Core/interface/FWEDProductRepresentationChecker.h"
00019 
00020 #include "Fireworks/Core/interface/FWRepresentationInfo.h"
00021 //
00022 // constants, enums and typedefs
00023 //
00024 
00025 //
00026 // static data member definitions
00027 //
00028 
00029 //
00030 // constructors and destructor
00031 //
00032 FWEDProductRepresentationChecker::FWEDProductRepresentationChecker(const std::string& iTypeidName,
00033                                                                    const std::string& iPurpose,
00034                                                                    unsigned int iBitPackedViews,
00035                                                                    bool iRepresentsSubPart) :
00036    FWRepresentationCheckerBase(iPurpose, iBitPackedViews,iRepresentsSubPart),
00037    m_typeidName(iTypeidName)
00038 {
00039 }
00040 
00041 // FWEDProductRepresentationChecker::FWEDProductRepresentationChecker(const FWEDProductRepresentationChecker& rhs)
00042 // {
00043 //    // do actual copying here;
00044 // }
00045 
00046 //FWEDProductRepresentationChecker::~FWEDProductRepresentationChecker()
00047 //{
00048 //}
00049 
00050 //
00051 // assignment operators
00052 //
00053 // const FWEDProductRepresentationChecker& FWEDProductRepresentationChecker::operator=(const FWEDProductRepresentationChecker& rhs)
00054 // {
00055 //   //An exception safe implementation is
00056 //   FWEDProductRepresentationChecker temp(rhs);
00057 //   swap(rhs);
00058 //
00059 //   return *this;
00060 // }
00061 
00062 //
00063 // member functions
00064 //
00065 
00066 //
00067 // const member functions
00068 //
00069 FWRepresentationInfo
00070 FWEDProductRepresentationChecker::infoFor(const std::string& iTypeName) const
00071 {
00072    TClass* clss = TClass::GetClass(iTypeName.c_str());
00073    if(0==clss || clss->GetTypeInfo()==0) {
00074       return FWRepresentationInfo();
00075    }
00076    if(clss->GetTypeInfo()->name() == m_typeidName) {
00077       return FWRepresentationInfo(purpose(),0,bitPackedViews(), representsSubPart());
00078    }
00079    return FWRepresentationInfo();
00080 }
00081 
00082 //
00083 // static member functions
00084 //