Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:03

0001 #ifndef Fireworks_Core_FWRepresentationInfo_h
0002 #define Fireworks_Core_FWRepresentationInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWRepresentationInfo
0007 //
0008 /**\class FWRepresentationInfo FWRepresentationInfo.h Fireworks/Core/interface/FWRepresentationInfo.h
0009 
0010    Description: Collection of information about how a particular representation matches a data type
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue Nov 11 13:12:28 EST 2008
0019 //
0020 
0021 // system include files
0022 #include <string>
0023 
0024 // user include files
0025 
0026 // forward declarations
0027 
0028 class FWRepresentationInfo {
0029 public:
0030   FWRepresentationInfo(const std::string& iPurpose,
0031                        unsigned int iProximity,
0032                        unsigned int iBitPackedViews,
0033                        bool iRepresentsSubPart,
0034                        bool iRequiresFF)
0035       : m_purpose(iPurpose),
0036         m_proximity(iProximity),
0037         m_bitPackedViews(iBitPackedViews),
0038         m_representsSubPart(iRepresentsSubPart),
0039         m_requiresFF(iRequiresFF) {}
0040 
0041   FWRepresentationInfo()
0042       : m_purpose(), m_proximity(0xFFFFFFFF), m_bitPackedViews(0), m_representsSubPart(false), m_requiresFF(false) {}
0043 
0044   // ---------- const member functions ---------------------
0045 
0046   const std::string& purpose() const { return m_purpose; }
0047 
0048   ///measures how 'close' this representation is to the type in question, the large the number the farther away
0049   unsigned int proximity() const { return m_proximity; }
0050 
0051   bool isValid() const { return !m_purpose.empty(); }
0052 
0053   bool representsSubPart() const { return m_representsSubPart; }
0054 
0055   bool requiresFF() const { return m_requiresFF; }
0056 
0057   unsigned int bitPackedViews() const { return m_bitPackedViews; }
0058 
0059   // ---------- static member functions --------------------
0060 
0061   // ---------- member functions ---------------------------
0062 
0063 private:
0064   //FWRepresentationInfo(const FWRepresentationInfo&); // stop default
0065 
0066   //const FWRepresentationInfo& operator=(const FWRepresentationInfo&); // stop default
0067 
0068   // ---------- member data --------------------------------
0069   std::string m_purpose;
0070   unsigned int m_proximity;
0071   unsigned int m_bitPackedViews;
0072 
0073   bool m_representsSubPart;
0074   bool m_requiresFF;
0075 };
0076 
0077 #endif