CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: FWModelId.h,v 1.6 2009/01/23 21:35:41 amraktad Exp $
20 //
21 
22 // system include files
23 
24 // user include files
25 class FWEventItem;
26 
27 // forward declarations
28 
29 class FWModelId
30 {
31 
32 public:
33  enum { kContainerIndex=-1};
34  FWModelId(const FWEventItem* iItem=0,
35  int iIndex=kContainerIndex) : m_item(iItem),m_index(iIndex) {
36  }
37  //virtual ~FWModelId();
38 
39  // ---------- const member functions ---------------------
40  bool operator<(const FWModelId& iRHS) const
41  {
42  return m_item == iRHS.m_item ? m_index<iRHS.m_index : m_item<iRHS.m_item;
43  }
44 
45  const FWEventItem* item() const
46  {
47  return m_item;
48  }
49 
50  int index() const
51  {
52  return m_index;
53  }
54  // ---------- static member functions --------------------
55 
56  // ---------- member functions ---------------------------
57  void unselect() const ;
58  void select() const;
59  void toggleSelect() const;
60  void setIndex(int iIndex) {
61  m_index=iIndex;
62  }
63 private:
64  //FWModelId(const FWModelId&); // stop default
65 
66  //const FWModelId& operator=(const FWModelId&); // stop default
67 
68  // ---------- member data --------------------------------
70  int m_index;
71 
72 };
73 
74 
75 #endif
void setIndex(int iIndex)
Definition: FWModelId.h:60
bool operator<(const FWModelId &iRHS) const
Definition: FWModelId.h:40
const FWEventItem * m_item
Definition: FWModelId.h:69
void unselect() const
Definition: FWModelId.cc:68
int index() const
Definition: FWModelId.h:50
void select() const
Definition: FWModelId.cc:72
int m_index
Definition: FWModelId.h:70
void toggleSelect() const
Definition: FWModelId.cc:77
FWModelId(const FWEventItem *iItem=0, int iIndex=kContainerIndex)
Definition: FWModelId.h:34
const FWEventItem * item() const
Definition: FWModelId.h:45