CMS 3D CMS Logo

FWModelId.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWModelId_h
2 #define Fireworks_Core_FWModelId_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWModelId
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri Jan 18 12:44:26 EST 2008
19 //
20 
21 // system include files
22 
23 // user include files
24 class FWEventItem;
25 
26 // forward declarations
27 
28 class FWModelId
29 {
30 
31 public:
32  enum { kContainerIndex=-1};
33  FWModelId(const FWEventItem* iItem=0,
34  int iIndex=kContainerIndex) : m_item(iItem),m_index(iIndex) {
35  }
36  //virtual ~FWModelId();
37 
38  // ---------- const member functions ---------------------
39  bool operator<(const FWModelId& iRHS) const
40  {
41  return m_item == iRHS.m_item ? m_index<iRHS.m_index : m_item<iRHS.m_item;
42  }
43 
44  const FWEventItem* item() const
45  {
46  return m_item;
47  }
48 
49  int index() const
50  {
51  return m_index;
52  }
53  // ---------- static member functions --------------------
54 
55  // ---------- member functions ---------------------------
56  void unselect() const ;
57  void select() const;
58  void toggleSelect() const;
59  void setIndex(int iIndex) {
60  m_index=iIndex;
61  }
62 private:
63  //FWModelId(const FWModelId&); // stop default
64 
65  //const FWModelId& operator=(const FWModelId&); // stop default
66 
67  // ---------- member data --------------------------------
69  int m_index;
70 
71 };
72 
73 
74 #endif
void setIndex(int iIndex)
Definition: FWModelId.h:59
bool operator<(const FWModelId &iRHS) const
Definition: FWModelId.h:39
const FWEventItem * m_item
Definition: FWModelId.h:68
void unselect() const
Definition: FWModelId.cc:67
int index() const
Definition: FWModelId.h:49
void select() const
Definition: FWModelId.cc:71
int m_index
Definition: FWModelId.h:69
void toggleSelect() const
Definition: FWModelId.cc:76
FWModelId(const FWEventItem *iItem=0, int iIndex=kContainerIndex)
Definition: FWModelId.h:33
const FWEventItem * item() const
Definition: FWModelId.h:44